MCP Trigger
Expose this workflow as an MCP tool callable by external AI agents (Claude Desktop, Cursor, Windsurf, etc.).
Use MCP Trigger when:
- You want external AI agents to discover and call your workflow as a tool
- You need to expose business logic (search, create, lookup) to MCP-compatible clients
- Other agents should invoke your workflow and receive a structured response via a Return node
For connecting your workflow's AI Agent to external MCP servers, use MCP Tool Provider instead.
| Handle | Type | Description |
|---|---|---|
mcp | object | MCP tool call context |
The mcp (accessed as {{ mcp.* }}) shape:
| Field | Type | Description |
|---|---|---|
tool_name | string | The tool name from the MCP call |
arguments | any | Full arguments object passed by the calling agent |
call_id | string | Unique identifier for this tool invocation |
| Setting | Type | Default | Description |
|---|---|---|---|
tool_name | string | — | The name external agents see when discovering this tool (e.g. create_invoice, search_docs). Required. |
tool_description | text | — | Help agents understand when and how to use this tool. Be descriptive. Required. |
parameters | code editor (JSON) | JSON Schema with query property | JSON Schema defining what parameters the tool accepts. External agents validate arguments against this schema. Required. |
| Setting | Type | Default | Description |
|---|---|---|---|
responseMode | select | use-workflow-response | use-workflow-response waits for the workflow Return node and sends the result back to the agent. ack-immediately returns a success message instantly. |
timeout | number | 30 | Maximum seconds to wait for workflow response before timing out (only applies in use-workflow-response mode). |
| Setting | Type | Default | Description |
|---|---|---|---|
mockPayload | code editor (JSON) | — | JSON body to inject when running this workflow locally for testing. |
A documentation search tool exposed to MCP clients:
- Set
tool_nametosearch_docs - Set
tool_descriptionto "Search the documentation knowledge base and return relevant results" - Set
parametersto a JSON Schema withquery(string, required) andlimit(number, optional) - Connect the
mcpoutput to your search logic, then wire a Return node
Access tool call data in downstream nodes:
{{ mcp.arguments.query }}
{{ mcp.arguments.limit }}
{{ mcp.call_id }}
After deploying, add the tool to your MCP client config:
{
"mcpServers": {
"tensorify-tools": {
"url": "https://mcp.tensorify.io/v1/triggers",
"headers": {
"Authorization": "Bearer tfk_your_api_key_here"
}
}
}
}
Or run tensorify mcp config to generate the config automatically.
import mcp from @tensorify/mcp-trigger:1.0.0
import http_request from @tensorify/http-request:3.0.0
import return_node from @tensorify/return:3.0.0
node trigger @tensorify/mcp-trigger:1.0.0 {
tool_name = "search_docs"
tool_description = "Search the documentation knowledge base"
parameters = "{\"type\": \"object\", \"properties\": {\"query\": {\"type\": \"string\"}}, \"required\": [\"query\"]}"
responseMode = "use-workflow-response"
timeout = 30
}
node search @tensorify/http-request:3.0.0 {
method = "GET"
url = "https://api.example.com/search?q={{ mcp.arguments.query }}"
}
node respond @tensorify/return:3.0.0 {
returnMode = "simple"
}
trigger.mcp -> search.body
search.response -> respond.input
- When
responseModeisuse-workflow-response, you must connect a Return node — otherwise the agent's call times out aftertimeoutseconds. tool_name,tool_description, andparametersare all required. Agents use the description and schema to decide when and how to call your tool.parametersmust be valid JSON Schema. Invalid schema prevents agents from calling the tool correctly.- MCP Trigger exposes your workflow as a tool (server role). MCP Tool Provider connects your AI Agent to external tools (client role).
- MCP Tool Provider — connect your AI Agent to external MCP servers
- Return — send results back to the calling agent
- AI Agent — build agent workflows that process tool inputs
- Deploying Workflows — activate the MCP endpoint
