MCP Gateway

Conecta a servidores MCP externos (modo cliente) e/ou expõe webhooks do n8n como ferramentas MCP (modo servidor).

MCP Gateway

AI-generated

Summary

Connect to external MCP servers as a client to retrieve and call AI tools, expose n8n workflows as MCP tools by HTTP webhooks on server mode, or do both simultaneously.

Inputs

  • mode (required) — Select operation mode: 'client' to connect to an MCP server; 'server' to expose n8n workflows as tools; or 'both' to do both.
  • serverUrl — MCP server SSE endpoint URL to connect to (required in client or both modes).
  • authType — Authentication method when connecting as client: none, Bearer token, or custom header.
  • bearerToken — Bearer token value if using Bearer token authentication (client or both modes).
  • headerName — Custom header name for authentication if selected (client or both modes).
  • headerValue — Custom header value for authentication if selected (client or both modes).
  • toolFilter — Filter to include all, selected, or all except specified tools from the MCP server (client or both modes).
  • toolNames — Comma-separated list of tool names to include or exclude based on toolFilter setting (client or both modes).
  • exposedWorkflows — Collection of n8n workflows to expose as MCP tools with their tool name, description, and webhook URL (server or both modes).

Output shape

a list of AI tools objects each with name, description, input schema, and an async call function

The output is a list of tools available from the external MCP server, the exposed n8n workflows, or both, depending on mode. Tools provide a call method to invoke them with input arguments; errors in connecting, listing, or calling tools are thrown as errors. The call results are typically JSON strings (for client mode) or raw text (for server-exposed workflows). No input data is consumed; configuration via parameters controls behavior.

Links

Discussion