Overview
n8n can sit in front of a hosted MCP server as a lightweight workflow layer. A common pattern is:- Trigger the workflow from a Webhook, Manual Trigger, or Schedule Trigger.
- Normalize the incoming JSON, form data, or uploaded CSV in Code nodes.
- Call the MCP endpoint with an n8n MCP Client node or with HTTP Request nodes.
- Resolve stored outputs with
result_getwhen a tool returns aresult_id. - Assemble a JSON, log, email, or chat response from sanitized result fields.
Safe Workflow Exports
Workflow exports can include API keys, credential IDs, email addresses, chat recipients, webhook paths, and delivery-service settings. Do not publish raw n8n workflow JSON unless it has been reviewed and scrubbed. When sharing a workflow:- Keep secrets in n8n Credentials or environment variables.
- Replace webhook paths with examples such as
my-factor-report. - Remove credential
id/nameblocks from exported nodes. - Remove delivery recipients and bot/channel identifiers.
- Keep only endpoint URLs, tool names, request shapes, and routing notes.
MCP Client Node Pattern
Use this when your n8n installation has an MCP Client node that supports streamable HTTP.| Field | Value |
|---|---|
| Connection type | HTTP / Streamable HTTP |
| Endpoint URL | Server-specific MCP URL |
| Operation | Execute tool |
| Tool name | Server-specific tool name |
| Tool parameters | {"request": {...}} |
complete-panel-factor-extractor-fit, swfactor-extractor-fit, or bmfactor-extractor-fit through separate MCP Client nodes.
HTTP Request Node Pattern
Use this when you want explicit session control or need to call helper tools such asresult_get.
1. Initialize
mcp-session-id response header.
2. Send Initialized
MCP-Session-Id header.
3. Call a Tool
Content-Type: application/json and Accept: application/json, text/event-stream on every HTTP Request node. If the endpoint is protected, add the Authorization header through n8n Credentials instead of hard-coding it.
Webhook Pattern
For user-facing workflows, configure a Webhook Trigger withPOST and responseMode: responseNode.
Typical body shapes:
{"ok": false, "error": "..."}.
Server Examples
| Server | Trigger shape | MCP calls |
|---|---|---|
| Fama-French Replicate | Manual, scheduled, or webhook portfolio report | get-proxy-ff-factors, get-loadings-and-alpha, result_get |
| Statistical Factor Models | Webhook or manual panel fit | complete-panel-factor-extractor-*, swfactor-extractor-*, bmfactor-extractor-*, result_get |
| Jump Models | Scheduled or webhook regime report | Dataloader fetch-ohlcvs, jump-model-create, jump-model-fit, jump-model-predict-proba-online, jump-model-predict, result_get |
| EP Ratio Screener | Scheduled or webhook ticker screen | load_skills, screen-tickers |
Delivery
Keep delivery separate from MCP calls. The MCP nodes should produce structured JSON; delivery nodes can then send:- webhook JSON response;
- n8n execution logs;
- email report;
- chat or bot notification;
- saved CSV or image artifact.
Checklist
- The MCP URL is the server-specific
/mcp/...URL, not the/healthURL. - Every tool payload is wrapped as
{"request": {...}}. - Direct HTTP Request flows keep and reuse
MCP-Session-Id. - Stored outputs are resolved with
result_getbefore formatting reports. - Workflow exports are scrubbed before they are shared or committed.