Docs · static mirror — the interactive version loads with JavaScript.

n8n

Connect Runstack MCP in n8n — MCP Client Tool for agents (consume Runstack) and MCP Server Trigger (expose workflows).

Source: https://runstack.engineer/docs/mcp-n8n

n8n

n8n can consume Runstack as an MCP server (AI Agent → Runstack tools) and expose workflows as MCP tools for external clients like Claude/Cursor. Runstack endpoint is https://app.runstack.engineer/mcp (Streamable HTTP + SSE; Authorization: Bearer rnsk_…). Get a key at API Keys.

Option A — Consume Runstack from n8n (most common)

Let an n8n AI Agent call Runstack's four MCP tools (search_tools, check_authentication, initiate_connection, execute_tool).

  1. In n8n, add an AI Agent node to your workflow.
  2. Add an MCP Client Tool node (n8n-nodes-langchain.toolmcp) and connect it to the agent's Tools input.
  3. Configure the node:
FieldValue
SSE Endpointhttps://app.runstack.engineer/mcp (n8n labels it SSE; it supports Streamable HTTP too)
AuthenticationHeader Auth or Bearer Auth: Authorization: Bearer rnsk_YOUR_API_KEY
Tools to IncludeAll (or Selected to expose only search_tools/execute_tool)
  1. The agent can now search_tools({ pattern: "github" }) and execute_tool({ toolName, args }) via Runstack. OAuth for Gmail/GitHub routes through Runstack — initiate_connection returns the consent link.

If your self-hosted n8n stores credentials centrally, create a credential of type HTTP Header with Authorization: Bearer rnsk_… and link it in the MCP Client Tool.

Option B — Expose n8n workflows as MCP tools

Make n8n tools available to external MCP clients (Claude Desktop, Cursor, Windsurf, etc.) via MCP Server Trigger.

  1. Add MCP Server Trigger node (n8n-nodes-langchain.mcptrigger) as workflow trigger.
  2. Connect it to Tool nodes (or Custom n8n Workflow Tool to expose a whole workflow).
  3. Set:
  • MCP URL → Path — keep auto-generated /mcp/... or set a custom path
  • Authentication — None, Bearer auth, or Header auth (for clients connecting to your n8n URL)
  • Test URL vs Production URL — publish workflow to register Production URL; Test URL shows execution data in canvas.
  1. From an external client (e.g. Claude Desktop), add your n8n URL:
{
  "mcpServers": {
    "n8n": {
      "command": "npx",
      "args": ["mcp-remote", "https://YOUR_N8N_HOST/mcp/YOUR_PATH", "--header", "Authorization: Bearer YOUR_N8N_TOKEN"],
      "env": { "AUTH_TOKEN": "YOUR_N8N_TOKEN" }
    }
  }
}

Or if the client supports HTTP directly, use url: https://YOUR_N8N_HOST/mcp/YOUR_PATH with headers.Authorization.

Mixing both (Runstack + n8n tools)

An n8n AI Agent can have multiple MCP Client Tool nodes: one for Runstack (https://app.runstack.engineer/mcp) and others for internal services. The agent discovers all tools and chooses the right one — scope with Tools to Include: Selected if context gets too large.

Scaling & reverse proxy

  • Queue mode: With multiple webhook replicas, route all /mcp* requests to a single dedicated webhook replica; otherwise SSE/streamable connections break.
  • nginx: Disable proxy_buffering, gzip, chunked_transfer_encoding; set Connection '' for /mcp/ location. See n8n MCP docs.

Verify

Consume test: Run the workflow containing the AI Agent + MCP Client Tool; prompt the agent “Use Runstack to search for Slack tools” and confirm search_tools returns matches.

Expose test: Publish the MCP Server Trigger workflow, copy Production URL, connect from an MCP client and call tools/list → your n8n tools should appear.

Related