Connect n8n to Claude and ChatGPT with MCP
Expose n8n workflows as MCP tools for Claude and ChatGPT, or use MCP tools in n8n agents. Auth, test URLs and safe read-only tools.
MCP (Model Context Protocol) lets AI assistants call tools. n8n works in both directions: the MCP Server Trigger exposes your workflows as tools for Claude, ChatGPT and other clients, and the MCP Client tool lets n8n agents use tools from other MCP servers.
- MCP Server Trigger: your workflows become tools for assistants.
- MCP Client tool: your n8n agents use other servers' tools.
- Always set authentication; start with read-only tools.
- Test with the test URL, then publish for production.
Checked 4 November 2026 (CET) against n8n documentation and the n8n pricing page. n8n ships updates often and node options, plan limits and prices change, so confirm in your own instance and on the pricing page. "Our view" marks MentionX opinion. Ledgerline is a fictional company used for illustration.
01Why connect n8n to an assistant?
Marketers already ask Claude and ChatGPT questions all day. If those assistants can call your n8n workflows, they can answer with your real data: last week's KPIs, current AI visibility, the latest competitor changes. You control exactly what each tool does, because the logic lives in your workflow.
The Claude MCP connectors lesson explains MCP from the assistant side. This lesson covers the n8n side.
02The two directions
| Direction | n8n part | Use case |
|---|---|---|
| Assistant calls n8n | MCP Server Trigger | Claude asks for weekly KPIs from your workflow |
| n8n calls an MCP server | MCP Client tool on an AI Agent | Your agent uses tools from another service's MCP server |
03Setting up the MCP Server Trigger
According to the n8n docs, the MCP Server Trigger has a test URL and a production URL. Test mode shows calls in the editor, while production runs when the workflow is published. The trigger only connects to tool nodes, not to regular nodes. To expose your own workflow logic, use the Custom n8n Workflow Tool.
Authentication options include Bearer, Header auth and, from version 2, n8n User Auth via OAuth2. The docs also describe how to connect Claude Desktop through a gateway (they show mcp-remote) for clients that need it.
If you self-host behind a reverse proxy, the docs note SSE needs proxy buffering turned off.
04Using the assistant side
In Claude, you add custom connectors with a remote MCP server URL; available options depend on your plan, so check Anthropic's current help pages. ChatGPT supports custom MCP connectors on some plans. The ChatGPT track's work agent lesson covers ChatGPT-side workflows.
Once connected, ask questions in plain language. The assistant reads tool descriptions to decide when to call them, so clear names and descriptions matter.
Our view: MCP is the easiest way to give your team AI access to clean marketing data without giving the AI direct access to every tool. Keep the logic and permissions in n8n.
05Safety rules
- Use Bearer or OAuth, never None, for real data.
- Read-only tools first. Write tools need human review (lesson 9) or shouldn't be exposed.
- Don't return personal data unless the use is approved.
- Rotate tokens when people leave.
06MCP Server Trigger settings
| Setting | Options | Notes |
|---|---|---|
| URLs | Test and production | Test shows calls in the editor; production runs when published |
| Authentication | None, Bearer, Header, n8n User Auth (OAuth2, v2+) | Never use None for anything sensitive |
| Transport | SSE and streamable HTTP | Supported by the trigger, per the docs |
| Instructions | Text for the client | Describe what the tools do |
| Tools | Tool nodes attached to the trigger | Use Custom n8n Workflow Tool for your own workflows |
07Tools that suit MCP for marketers
| Tool | What it returns |
|---|---|
| get_weekly_kpis | Last week's GA4 and Ads numbers (from lesson 14's workflow) |
| get_ai_visibility | Latest mention rates (lesson 12) |
| get_competitor_changes | Recent rows from the competitor table (lesson 13) |
| find_contact_company | HubSpot company lookup, read-only |
Return compact JSON. Long outputs cost tokens and confuse the assistant.
08Writing tool descriptions
Assistants decide when to call a tool from its name and description. Good descriptions say:
- What it returns: "Last full week's sessions, key events and paid spend for Ledgerline, Monday to Sunday, Berlin time."
- When to use it: "Use for questions about recent marketing performance."
- What it doesn't cover: "No data older than 12 weeks; no revenue."
- Inputs and formats: "Optional week_start as YYYY-MM-DD."
09Troubleshooting connections
| Problem | Check |
|---|---|
| Client can't connect | Production URL used, workflow published, auth header correct |
| Works in test, not production | Using the test URL in the client |
| Tool never called | Description too vague |
| Slow answers | Tool returns too much data |
| Streaming issues behind a proxy | Proxy buffering off for the MCP path |
Start with one tool, then add more as people ask for them.
10A sub-workflow tool, step by step
The tool the assistant calls is a normal workflow:
| Node | Settings | ||
|---|---|---|---|
| When Executed by Another Workflow | Input data mode: define fields such as week_start (string) | ||
| Edit Fields | Default week_start to last Monday if empty: `{{ $json.week_start | $now.minus({weeks: 1}).startOf('week').toISODate() }}` | |
| Google Analytics | Report Get for that week | ||
| Edit Fields | Keep only sessions, key_events, top_page |
In the MCP workflow, the Custom n8n Workflow Tool points at this workflow. Give it a name such as get_weekly_kpis and a description saying what it returns and the accepted input. Use the tool's input schema so the assistant knows week_start is optional and formatted YYYY-MM-DD.
11Client configuration
For clients that only support local stdio servers, the n8n MCP docs show a gateway setup using mcp-remote in the Claude Desktop config, along these lines:
{
"mcpServers": {
"n8n": {
"command": "npx",
"args": ["mcp-remote", "YOUR_PRODUCTION_URL", "--header", "Authorization: Bearer ${AUTH_TOKEN}"],
"env": { "AUTH_TOKEN": "your-token" }
}
}
}Check the docs for the exact current format. Clients that support remote MCP servers directly can use the production URL without a gateway.
12Cost math
Each tool call is a workflow execution: the MCP Server Trigger workflow and the sub-workflow it calls. If ten people each ask three questions a day on working days, that's around 600 tool calls a month. On Starter's 2,500 monthly executions, that's a meaningful share, so check how your plan counts sub-workflow runs and watch usage in the first month.
13Ledgerline walkthrough: rollout
Ledgerline is a fictional accounts-payable software company. Details are illustrative.
Marketing ops piloted the tools with three people for two weeks before sharing the URL more widely. They rotated the Bearer token once after a pilot user pasted their config into a shared document by mistake. The log table showed most questions were about last week's numbers, so they added a 30-minute cache in a data table to avoid repeated GA4 calls.
14Worked example: Ledgerline's KPIs inside Claude
Ledgerline is a fictional accounts-payable software company. Details are illustrative.
Ledgerline's team used Claude daily. Marketing ops exposed three read-only tools through an MCP Server Trigger with Bearer auth: weekly KPIs, AI visibility and competitor changes.
The first version returned whole GA4 reports, which made answers slow and rambling. Trimming outputs to a few fields fixed it. A log table showed the KPI tool used most, mainly before Monday stand-ups. A request for a "create campaign" tool was declined until a human review step could be added.
Walkthrough
- Build a sub-workflow "get_weekly_kpis" that starts with When Executed by Another Workflow and returns a small JSON object.
- Create a new workflow with an MCP Server Trigger. Set authentication to Bearer and generate a long token.
- Attach a Custom n8n Workflow Tool pointing to get_weekly_kpis, with a clear name and description.
- Write Instructions: "Tools for Ledgerline marketing data. Numbers are weekly, Berlin time."
- Test with the test URL from an MCP client. Then publish and use the production URL.
- Connect from Claude using a custom connector, following Anthropic's current guidance, or from ChatGPT if your plan supports custom MCP connectors.
- Ask: "How did last week compare with the week before?" Check the tool call in n8n's executions.
15Try it yourself
Expose one read-only tool through an MCP Server Trigger with Bearer auth. Connect it to one assistant and ask three questions. Check executions to confirm each call, then decide what a second tool should be.
16Quick quiz
1. How do you expose your own workflow as an MCP tool?
Answer: Attach a Custom n8n Workflow Tool to the MCP Server Trigger.
2. Which URL works without publishing?
Answer: The test URL.
3. What should tools return?
Answer: Compact JSON with only what the assistant needs.
17What should you check before the next lesson?
- The trigger has authentication set.
- Tools are read-only and return compact JSON.
- Calls are visible in executions.
Next: Error handling, retries and rate limits. Or return to the n8n for Marketers track.
18Common questions
Do I need to self-host for MCP? No. The MCP Server Trigger works on Cloud with a public URL.
Can ChatGPT use my n8n tools? If your ChatGPT plan supports custom MCP connectors. Check OpenAI's current docs.
Is MCP secure? It's as secure as your auth and your tools. Use Bearer or OAuth and read-only tools first.
Questions people ask
3 answersDo I need to self-host for MCP?
+
No. The MCP Server Trigger works on Cloud with a public URL.
Can ChatGPT use my n8n tools?
+
If your ChatGPT plan supports custom MCP connectors. Check OpenAI's current docs.
Is MCP secure?
+
It's as secure as your auth and your tools. Use Bearer or OAuth and read-only tools first.
Sources
- n8n Docs, MCP Server Triggerdocs.n8n.io
- n8n Docs, AI Agent nodedocs.n8n.io
- n8n Docs, Create and edit credentialsdocs.n8n.io
- n8n Docs, MCP Client Tool nodedocs.n8n.io
- All accessed 4 Nov 2026.