Provides MCP access to list, view, run, and monitor n8n workflows via an MCP client.
Configuration
View docs{
"mcpServers": {
"dopehunter-n8n_mcp_server_complete": {
"url": "http://localhost:3000/mcp",
"headers": {
"N8N_API_KEY": "YOUR_API_KEY",
"N8N_BASE_URL": "http://localhost:5678/api"
}
}
}
}You can manage n8n workflows directly from AI agents or LLMs through a dedicated MCP server. This server exposes a stable interface to list, view, execute, and monitor your n8n workflows, letting you pass data into workflows and orchestrate automation from your AI copilots.
You connect an MCP client to the server and use the available MCP methods to interact with your n8n instance. You can list all workflows, inspect details of a specific workflow, run a workflow with optional input data, and review execution history. You can also activate or deactivate workflows as needed. All actions are performed through the MCP interface, which you use from your AI agent to orchestrate automation tasks.
Prerequisites you need before starting:
Step by step commands to get up and running:
# Install the MCP server package
npm install @dopehunter/n8n-mcp-server
# Create environment configuration
cp .env.example .envEdit the environment file to point the MCP server at your n8n instance. You need the base URL for the n8n API and an API key with sufficient permissions.
# .env
N8N_BASE_URL=http://localhost:5678/api
N8N_API_KEY=your_n8n_api_key_hereStart the MCP server using the standard startup command.
npm startOnce the server is running, you can test basic MCP operations by issuing requests to the MCP endpoint exposed by the server.
curl -X POST http://localhost:3000/mcp -H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":"1","method":"mcp.tools.list","params":{}}'Connection issues often indicate the n8n instance is not reachable at the URL you configured. Double-check that N8N_BASE_URL points to a live n8n API and that the API key is correct and has the necessary permissions.
If you encounter permission or authentication problems, regenerate or verify your n8n API key and ensure it is correctly set in the .env file.
If you are running the server in a container, ensure the container has network access to your n8n instance and that any required environment variables are passed through.
Keep your API keys and base URL secure. Do not expose these values in logs or client-side configurations. Use proper secret management for production deployments.
List all workflows in the connected n8n instance. Returns the available workflows for selection or inspection.
Retrieve details for a specific workflow by its ID, including nodes and configuration.
Execute a specified workflow and optionally pass data to the workflow run.
Fetch the execution history for a given workflow, with an optional limit on results.
Activate a workflow to make it available for triggering.
Deactivate a workflow to prevent it from triggering.