MCP Server
Connect an external MCP server to an AI Agent — all tools from the server become available to the agent.
Use MCP Server when:
- You want to connect an agent to an existing MCP-compatible service (Stripe MCP, database MCP, etc.)
- You need tools that are defined and maintained externally
- You are integrating with third-party MCP tool providers
For tools that are Tensorify workflows themselves, connect action nodes directly to the agent's Tools handle instead. For direct API calls without MCP, use HTTP Request.
| Handle | Type | Description |
|---|---|---|
input | any | Tool connection handle. Connect from an AI Agent's Tools output — the agent registers this MCP server at runtime. |
None — MCP Server is a tool provider marker node. It does not emit data to the main workflow. Discovered MCP tools are invoked by the connected agent during its ReAct loop.
| Setting | Type | Default | Description |
|---|---|---|---|
serverUrl | string | — | MCP server URL (e.g. https://mcp.stripe.com or http://localhost:3100/mcp). Required. Supports {{ }} bindings. |
serverName | string | "" | Friendly name for this MCP server. Shown in logs and used as a prefix for discovered tool names. |
transportType | select | http | Transport protocol for communicating with the MCP server. Options: http (Streamable HTTP), sse (Server-Sent Events). |
SSE transport (transportType = "sse") is not yet implemented. Use http (Streamable HTTP) — it covers the majority of MCP servers.
Configure on the Environment Variables page:
| Variable | Required | Description |
|---|---|---|
MCP_API_KEY | No | API key for authenticating with the MCP server. Sent as a Bearer token on HTTP requests. This is a single global key shared across all MCP servers connected to an agent. |
Connect an agent to Stripe's MCP server:
- Add an API Endpoint trigger with
openai-chatprotocol - Add an AI Agent node and connect the trigger to the agent's
messageinput - Add an MCP Server node and connect the agent's
Toolshandle to the MCP node'sinputhandle - Configure MCP Server:
- Server URL:
https://mcp.stripe.com - Server Name:
stripe - Transport Type:
http
- Server URL:
- Add
MCP_API_KEYto Environment Variables with your Stripe secret key - Connect the agent's
responseoutput to a Return node
The agent discovers all tools exposed by the Stripe MCP server on the first request and can list customers, create charges, check subscription status, and use any other tool the server provides.
How it works:
- The transpiler emits module-scope code that registers the MCP server with the agent's tool registry
- On the first agent request, the runtime connects to the MCP server and discovers tools via the MCP
tools/listmethod - Each discovered tool is converted to a schema the LLM understands (name, description, parameters)
- During the ReAct loop, when the LLM calls an MCP tool, the runtime invokes it via the MCP
tools/callmethod - The tool result is passed back to the LLM for the next reasoning step
import api from @tensorify/api-trigger:1.0.0
import agent from @tensorify/ai-agent:1.0.0
import mcp from @tensorify/mcp-tool-provider:1.0.0
import respond from @tensorify/return:3.0.0
node api @tensorify/api-trigger:1.0.0 {
path = "/v1"
method = "POST"
responseMode = "use-workflow-response"
protocol = "openai-chat"
}
node agent @tensorify/ai-agent:1.0.0 {
provider = "openai"
model = "gpt-4o"
systemPrompt = "You can use Stripe tools to help with billing questions."
}
node mcp @tensorify/mcp-tool-provider:1.0.0 {
serverUrl = "https://mcp.stripe.com"
serverName = "stripe"
transportType = "http"
}
node respond @tensorify/return:3.0.0 {
returnMode = "simple"
}
api.payload -> agent.message
agent.tools -> mcp.input
agent.response -> respond.input
- Server must be reachable: The MCP server URL must be accessible from where the workflow runs (your runner's machine for CLI mode, or Tensorify cloud for Managed mode).
- Lazy tool discovery: MCP tools are discovered on the first agent request, not at workflow startup. If the MCP server adds new tools, restart the workflow to pick them up.
- Latency: Each MCP tool call is a network request to the external server. Factor this into your agent's timeout and
maxIterationssettings. - Single API key:
MCP_API_KEYis shared across all MCP Server nodes on an agent. Use separate agents if different MCP servers require different credentials. - SSE not supported: Setting
transportTypetosseraises a runtime error. Usehttpunless SSE support is added in a future release. - Tool limit: An agent accepts up to 20 tool connections. MCP Server nodes count as one connection but expose many tools from a single server.
- AI Agent — the agent that uses MCP tools
- HTTP Request — direct API calls without MCP
- Build an AI Agent — step-by-step guide including MCP setup
- Environment Variables — store MCP API keys safely
