Connect MCP servers to agents
Direct answer: Put credentials on Connections, drop one MCP Server node per server, aggregate them with MCP Registry, and wire the registry into the AI Agent tools handle. The compiler registers each linked MCP server for the agent at run time.
Tensorify keeps secrets off the canvas (workspace connections / env vars) and keeps the agent graph readable: one tools edge into a registry instead of many parallel tool edges.
[AI Agent] --tools--> [MCP Registry] --servers--> [MCP Server: Linear]
--servers--> [MCP Server: Flexx]
- On Connections, connect OAuth providers or create bearer env vars once.
- Drop MCP Registry and wire the agent tools handle to it.
- Drop MCP Server nodes (one per server), set provider/URL/auth, wire registry servers → each server.
- Export/compile walks registry → servers and registers each MCP for the agent.
In the app, open Connections (workspace-scoped):
- Add Linear, GitHub, Flexx, or a custom MCP URL
- Prefer OAuth where available; otherwise store a token as a workspace env var and reference it by name on the server node
Server nodes bind to a connector or env var name, not a pasted secret in the graph.
- Create or open a workflow
- Add an AI Agent node
- Configure model and system prompt as usual
- Add an MCP Registry node
- Connect AI Agent → tools to the registry
The registry aggregates servers so the agent config stays minimal (one tools edge).
Plugin: @tensorify/mcp-tool-provider (UI label: MCP Server).
For each external server:
- Drop an MCP Server node
- Choose a preset (Linear / GitHub / Flexx) or Custom URL
- Set auth: connector binding or
apiKeySecret= name of a workspace env var (not the raw token) - Connect MCP Registry → servers to this node
Repeat for every MCP server the agent should use.
- Use Run to selected on the agent with a prompt that should invoke a tool
- Inspect tool calls and outputs on the canvas
- Deploy (Managed or CLI runner)
- Wire an MCP Server directly to the agent tools handle (no registry)
- Agent
settings.mcpServersJSON still compiles until fully migrated — prefer the graph above
This guide is outbound MCP (your agent calls Linear/Flexx/etc.).
- Inbound — IDE manages Tensorify: Tensorify MCP Server for IDEs
- Inbound — other agents call your workflow: Expose a workflow as an MCP tool (MCP Trigger)
Persona overview: AI agents on Tensorify.
Why not put the API key on the node?
So secrets stay in Connections / env vars, rotate without editing the graph, and never ship inside exported TSL by accident.
Can one agent use multiple MCP servers?
Yes. One registry, many MCP Server nodes on the servers handle.
What if a tool does not appear?
Confirm the workflow is saved, the server node auth resolves, and the upstream MCP lists tools successfully. Check run logs on the agent node for registration errors.
Prefer MCP Registry (not legacy MCP Server / mcp-tool-provider):
import Api from @tensorify/api-trigger:1.0.0
import Agent from @tensorify/ai-agent:1.0.0
import Registry from @tensorify/mcp-registry:1.0.0
import Return from @tensorify/return:3.0.0
node api @tensorify/api-trigger:1.0.0 {
path = "/agent"
allowedMethods = ["POST"]
responseMode = "use-workflow-response"
}
node tools @tensorify/mcp-registry:1.0.0 {
# Configure server list / connection refs in UI; agents: get_plugin_manifest
}
node agent @tensorify/ai-agent:1.0.0 {
provider = "openai"
model = "gpt-4o"
systemPrompt = "You can use MCP tools from the registry."
maxIterationsMode = "unlimited"
_secret_bindings = { OPENAI_API_KEY: "OPENAI_API_KEY" }
}
node out @tensorify/return:3.0.0 {
returnMode = "simple"
}
api.POST -> agent.message
tools.tools -> agent.tools
agent.response -> out.input