n8n
A Model-Controller-Provider (MCP) server implementation for n8n workflow automation
claude mcp add --transport stdio s17s17-n8n-mcp-server node server.js \ --env N8N_URL="URL of your n8n instance API (e.g., https://n8n.example.com/api)" \ --env N8N_API_KEY="Your n8n API key" \ --env N8N_API_HEADER="Header name for API key (default: X-N8N-API-KEY)"
How to use
This MCP server exposes a JSON-RPC 2.0 API to manage and execute n8n workflows. It acts as a bridge between clients and an n8n instance, allowing you to initialize a connection, discover available workflow tools, and call specific tools to run workflows. The server authenticates requests using the configured n8n API key and forwards requests to your n8n instance, returning results or status information. Use the listTools method to see which workflow tools are available, and use callTool to run a particular workflow with the provided parameters. The initialize and shutdown methods help establish and terminate the connection lifecycle with the n8n backend, ensuring clean startup and teardown in your orchestration pipeline.
How to install
Prerequisites:
- Node.js >= 14.x
- npm or pnpm installed
- An accessible n8n instance and API key
Installation steps:
-
Clone the repository git clone https://github.com/S17S17/n8n-mcp-server.git cd n8n-mcp-server
-
Install dependencies npm install
-
Configure environment variables cp .env.example .env
Edit .env with your configuration (N8N_URL, N8N_API_KEY, N8N_API_HEADER, etc.)
-
Run the server npm start
Optional Docker usage: docker build -t n8n-mcp-server . docker run -p 3000:3000 --env-file .env n8n-mcp-server
Additional notes
Tips:
- Ensure your n8n instance is reachable from the MCP server host and that the API key has the necessary permissions.
- If you modify environment variables, restart the server for changes to take effect.
- Use the provided npm scripts (start, start:dev, start:simple, debug) to fit your development or production workflow.
- When running in Docker, consider mounting a volume for the .env file to manage configuration securely.
- If you encounter JSON-RPC errors, verify the API endpoint and headers configured in N8N_URL, N8N_API_KEY, and N8N_API_HEADER.
Related MCP Servers
zen
Selfhosted notes app. Single golang binary, notes stored as markdown within SQLite, full-text search, very low resource usage
MCP -Deepseek_R1
A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)
mcp-fhir
A Model Context Protocol implementation for FHIR
mcp
Inkdrop Model Context Protocol Server
mcp-appium-gestures
This is a Model Context Protocol (MCP) server providing resources and tools for Appium mobile gestures using Actions API..
dubco -npm
The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.