MCP Server

Connect Claude Code, Cursor, and other MCP clients to run your TogoFlow workflows from AI chat.

The TogoFlow MCP server lets external AI assistants call your published workflows as tools. Connect Claude Code, Cursor, or any MCP client that supports Streamable HTTP, then run workflows by chatting — for example, "Send my weekly sales report" or "List workflows I can run."

What the MCP server exposes

ToolPurpose
list_workflowsList published workflows enabled for MCP in your organization
run_workflowExecute a workflow by ID with optional input
get_execution_statusCheck whether an execution is still running (compact, no large output)
get_execution_resultFetch execution output (compact by default; optional full payload)

When you have 15 or fewer MCP-enabled workflows, each workflow may also appear as its own named tool (for example wf_weekly_sales_report). If you enable more than 15, only the meta-tools above are listed — use list_workflows and run_workflow instead.

Why meta-tools? AI clients work best with a small tool list. TogoFlow keeps the default set small and only adds per-workflow tools when the count stays manageable.

Prerequisites

  1. A TogoFlow account and organization.
  2. A published workflow with Expose to AI (MCP) enabled.
  3. An organization API key with MCP scopes (new keys include these by default).

Step 1 — Enable a workflow for MCP

  1. Open your workflow in the editor at app.togoflow.ai.
  2. Go to the AI / MCP tab.
  3. Turn on Expose to AI (MCP).
  4. Optionally set:
    • Tool name — override the auto-generated name (default: wf_ + slugified workflow name).
    • AI description — text the AI uses to decide when to call this workflow. If empty, TogoFlow uses your workflow description.
  5. Publish the workflow. Only published workflows are callable via MCP.

Step 2 — Create an API key

  1. Go to Settings → Credentials → API Keys.
  2. Click Create API Key.
  3. Copy the key immediately (wk_...) — it is only shown once.

New API keys are created with these scopes:

ScopeAllows
mcp:useConnect to the MCP endpoint
workflows:readCall list_workflows
workflows:executeCall run_workflow and named workflow tools
executions:readCall get_execution_status and get_execution_result

Existing keys without scopes cannot use MCP. Create a new key if yours was created before scoped keys were enforced.

See API Keys for general key management and security practices.

Step 3 — Connect your AI client

Endpoint

https://api.togoflow.ai/api/v1/mcp

Authentication is API-key only. Pass your key as:

Authorization: Bearer wk_YOUR_API_KEY

or:

X-API-Key: wk_YOUR_API_KEY

JWT session tokens are not accepted on the MCP endpoint.

Claude Code

Add to ~/.claude.json (or your project's Claude Code MCP config):

{
  "mcpServers": {
    "togoflow": {
      "type": "http",
      "url": "https://api.togoflow.ai/api/v1/mcp",
      "headers": {
        "Authorization": "Bearer wk_YOUR_API_KEY"
      }
    }
  }
}

Restart Claude Code, then ask it to list or run your workflows.

Cursor

  1. Open Cursor Settings → MCP.
  2. Add a new HTTP MCP server with the production URL above.
  3. Set the header Authorization: Bearer wk_YOUR_API_KEY.
  4. Save and reload MCP tools in the chat panel.

Other MCP clients

Any client that supports Streamable HTTP MCP can connect to POST /api/v1/mcp with the same URL and headers. The server is stateless — no session setup is required beyond the API key.

How workflow execution works

When the AI calls run_workflow (or a named workflow tool):

  1. TogoFlow verifies the workflow is published, MCP-enabled, and belongs to your organization.
  2. Execution limits and node credentials are checked (same as a manual run).
  3. The workflow runs in unattended mode (no approval prompts in the browser).
  4. The server waits up to 60 seconds by default for completion, then returns a compact result.
  5. If the workflow takes longer, you get an executionId and status running — poll with get_execution_status or get_execution_result.
ParameterDefaultMax
waitTimeoutMs on run_workflow60,000 ms300,000 ms

Passing input to a workflow

Use the input object on run_workflow (or the tool's own parameters for named workflow tools). Values are available inside the workflow as {{inputs.*}}.

Example request the AI might make:

run_workflow({
  "workflowId": "WRK_abc123",
  "input": {
    "recipient": "[email protected]",
    "reportDate": "2026-07-15"
  }
})

Input fields can also be inferred from your workflow's start node (webhook required fields) and workflow variables.

Result size

Tool results are kept compact (~4 KB) so they do not overwhelm the AI's context. If output is truncated, the response includes a message to call get_execution_result with includeFullOutput: true (up to ~32 KB).

Example conversation

Once connected, you can chat naturally:

  • "What TogoFlow workflows can I run?" → AI calls list_workflows
  • "Run the weekly sales report for last Monday" → AI calls run_workflow or wf_weekly_sales_report
  • "Is execution EXC_xyz still running?" → AI calls get_execution_status

Security

  • Opt-in exposure — workflows are hidden until you enable MCP on each one.
  • Published only — draft workflows cannot be executed.
  • Scoped API keys — revoke keys anytime in Settings; keys without mcp:use cannot connect.
  • Organization isolation — keys only see workflows in their organization.
  • Rate limiting — the MCP endpoint is throttled to prevent abuse.

Rotate keys periodically and revoke any key you no longer use.

Troubleshooting

ProblemFix
401 UnauthorizedUse a wk_... API key, not a JWT. Check the key is copied correctly.
403 Missing scopesCreate a new API key (includes MCP scopes by default) or add mcp:use, workflows:execute, executions:read.
Workflow not in list_workflowsPublish the workflow and enable Expose to AI (MCP) in the AI / MCP tab.
403 Workflow not enabled for MCPTurn on MCP exposure for that workflow.
Execution requires authenticationConnect OAuth or API credentials for nodes that need them, then re-run.
Result truncatedCall get_execution_result with includeFullOutput: true.
Tool not found (named tool)You may have more than 15 MCP workflows — use list_workflows + run_workflow instead.
Timeout / still runningPoll get_execution_status with the returned executionId.