MCP Server Trigger (Request Context)
AI-generatedSummary
Expose n8n tools as an MCP Server endpoint and inject incoming request context as $json.mcpRequest.
Inputs
- Tools (required) — Connected n8n tools (AI Tool connections) that will be exposed via MCP. Each tool receives the incoming MCP request information under the key
mcpRequestwhen invoked.
Output shape
When a tool is called via MCP, the node emits a single workflow item with JSON containing: mcpRequest (the normalized request object with headers, query, params, method, path), mcpToolCall (if a tool call occurred) with toolName, arguments (including mcpRequest), and sourceNodeName. If no tool call occurs, no workflow data is emitted.
The node provides three webhooks under the path defined by the
Pathproperty: GET (SSE setup), POST (message handling), and DELETE (session close). Authentication can be None, Bearer Auth, or Header Auth, using the corresponding credentials when selected.
Examples
Example 1: Call an n8n tool via an MCP client
Set Path to 'mcp', Authentication to 'none', connect an AI Tool (e.g., HTTP Request) to the node's Tools input. An MCP client connects to GET /mcp (SSE), then POSTs a CallToolRequest to /mcp. The node wraps the tool with request context, executes it, and returns a workflow item containing the tool call details and the original request info.