Expose a Workflow as an MCP Tool

Turn any Tensorify workflow into a tool that AI agents (Claude Desktop, Cursor, custom agents) can discover and call via the Model Context Protocol.

Prerequisites

  • A Tensorify account with an API key
  • A workflow you want to expose
  • An MCP-compatible client (Claude Desktop, Cursor, etc.)

Step 1: Create the Workflow

  1. Open the Tensorify canvas
  2. Drag the MCP Trigger node from the plugin panel
  3. Configure:
    • Tool Name: A snake_case identifier (e.g. search_knowledge_base)
    • Tool Description: Clear description of what the tool does
    • Input Parameters: JSON Schema defining accepted arguments

Step 2: Build the Logic

Connect the MCP Trigger output to your workflow logic. The trigger emits:

  • mcp.arguments — the full args object from the AI agent
  • mcp.arguments.* — individual parameters (e.g. mcp.arguments.query)

Use these in your workflow nodes via bindings.

Step 3: Return a Response

Add a Return node at the end of your workflow. The value you return gets sent back to the AI agent as the tool result.

{
  "results": [...],
  "count": 5
}

Step 4: Deploy

  1. Click Deploy in the workflow header
  2. Choose your execution mode (Cloud or Self-Hosted)
  3. After deployment, you'll see the MCP Server URL

Step 5: Configure Your MCP Client

Claude Desktop

Add to ~/.config/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "tensorify-tools": {
      "url": "https://mcp.tensorify.io/v1/triggers",
      "headers": {
        "Authorization": "Bearer tfk_your_api_key"
      }
    }
  }
}

Cursor

Add to .cursor/mcp.json in your project:

{
  "mcpServers": {
    "tensorify-tools": {
      "url": "https://mcp.tensorify.io/v1/triggers",
      "headers": {
        "Authorization": "Bearer tfk_your_api_key"
      }
    }
  }
}

CLI Helper

Run tensorify mcp config to generate these snippets automatically with your API key pre-filled.

Step 6: Test

Restart your MCP client. The tool should now appear in the available tools list. Ask the AI to use it:

"Search my knowledge base for information about pricing"

The AI will call your search_knowledge_base tool with the appropriate arguments.

Tips

  • Be descriptive: The tool description is what helps the AI decide when to use your tool. Write it like you're explaining it to a colleague.
  • Validate parameters: Use JSON Schema's required field and description on each property.
  • Set appropriate timeouts: If your workflow takes time (API calls, database queries), increase the timeout from the default 30 seconds.
  • Use response mode wisely: use-workflow-response is best for tools that return data. ack-immediately is for fire-and-forget operations.
On this page