Enables comprehensive management and monitoring of n8n workflows, including creating, updating, and deleting workflows, tracking execution history, managing credentials and environment variables, and conducting security audits.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@n8n MCP ServerShow me which workflows failed today"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
π€ n8n MCP Server - Control n8n with Claude AI
Give Claude AI full control over your n8n workflows through natural conversation
π― What This Does (In Plain English)
Instead of clicking through n8n's web interface, you can now talk to Claude and have it manage your workflows:
You say: "Show me all my workflows" Claude does: Lists all your n8n workflows with their status
You say: "Activate my Daily Report workflow" Claude does: Turns on that workflow for you
You say: "What workflows failed today?" Claude does: Shows you failed executions with error details
It's like having an AI assistant that knows how to use n8n for you.
β¨ What You'll Be Able To Do
Once set up, you can ask Claude to:
π Workflow Management
β List all your workflows
β Create new workflows
β Activate/deactivate workflows
β Update workflow settings
β Delete workflows
β Organize workflows with tags
β‘ Execution Monitoring
β See which workflows ran successfully
β Find failed executions
β Retry failed workflows
β Get detailed error information
β Track execution history
π§ Advanced Features
β Manage environment variables
β Handle credentials securely
β Manage users and projects
β Generate security audits
β Health check your n8n instance
Total: 42 different operations - all through natural conversation with Claude.
π€ Before You Start: What Are These Things?
What is MCP (Model Context Protocol)?
Think of it as a "universal connector" that lets Claude AI talk to other software. It's like teaching Claude how to use n8n by giving it a specialized plugin.
Official docs: https://modelcontextprotocol.io/
What is n8n?
n8n is a workflow automation tool (like Zapier, but self-hosted). It connects different apps and automates tasks. For example: "When I get an email, save it to Google Sheets and notify me on Slack."
n8n website: https://n8n.io/
What is Docker?
Docker packages software so it runs the same way on any computer. Think of it as a "container" for software - it includes everything needed to run, so you don't have to install dependencies manually.
Docker website: https://www.docker.com/
π Prerequisites (What You Need First)
Before starting, make sure you have:
1. Docker Desktop (Required)
Download: https://www.docker.com/products/docker-desktop
Install it and make sure it's running (you'll see the Docker icon in your system tray)
Test it works: Open terminal/command prompt and type:
docker --versionYou should see something like:
Docker version 24.0.0
2. n8n Instance with API Access (Required)
You need:
β A running n8n instance (self-hosted or cloud)
β The URL to your n8n (e.g.,
https://your-n8n.com)β An API key from n8n
How to get your n8n API key:
Log into your n8n instance
Click your profile icon (top right)
Go to "Settings" β "API"
Click "Create API Key"
Copy the key (starts with
eyJ...) - you'll need this later
3. Claude Desktop (Required)
Download: https://claude.ai/download
Install the desktop app (not just the web version)
4. Docker MCP Gateway (Required)
This is the "bridge" between Claude and Docker containers.
Install it:
# On macOS/Linux
curl -fsSL https://raw.githubusercontent.com/docker/mcp-gateway/main/install.sh | sh
# On Windows (PowerShell as Administrator)
irm https://raw.githubusercontent.com/docker/mcp-gateway/main/install.ps1 | iexVerify it installed:
docker mcp --versionOfficial docs: https://github.com/docker/mcp-gateway
5. Basic Terminal Knowledge (Helpful but not required)
You'll need to copy-paste commands into a terminal. Don't worry - we'll guide you through each one.
π Installation Guide (Step-by-Step)
Follow these steps exactly in order. Each step has a "β Success Check" so you know it worked.
Step 0: Enable Docker MCP Toolkit (IMPORTANT!)
Before anything else, you need to enable MCP support in Docker Desktop:
Open Docker Desktop
Click the Settings icon (gear icon, top right)
Go to Beta features (in the left sidebar)
Find "Enable Docker MCP Toolkit"
Check the box to enable it
Click "Apply & Restart"
Wait for Docker Desktop to restart
β Success Check: After restart, open terminal and run:
docker mcp --versionYou should see version information (not an error).
Step 1: Download This Project
Option A: Using Git (if you have it)
cd ~/Desktop
git clone https://github.com/Shravan1610/n8n-mcp-server.git
cd n8n-mcp-serverOption B: Download ZIP
Go to https://github.com/Shravan1610/n8n-mcp-server
Click the green "Code" button
Click "Download ZIP"
Unzip it to your Desktop
Open terminal and navigate to it:
cd ~/Desktop/n8n-mcp-server-main
β
Success Check: Run ls - you should see files like README.md, package.json, Dockerfile
Step 2: Configure Your n8n Connection
Create your environment file:
cp .env.example .envEdit the .env file:
On Mac/Linux:
nano .envOn Windows:
notepad .envFill in your n8n details:
N8N_API_KEY=paste_your_actual_n8n_api_key_here N8N_BASE_URL=https://your-n8n-instance.com/api/v1Important notes:
Replace
paste_your_actual_n8n_api_key_herewith the API key you got from n8nReplace
https://your-n8n-instance.comwith your actual n8n URLDO NOT add a trailing slash at the end of the URL
Keep
/api/v1at the end
Save the file:
In nano: Press
Ctrl+O, thenEnter, thenCtrl+XIn notepad: File β Save
Example .env file (with YOUR actual values):
N8N_API_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.your_actual_key_here
N8N_BASE_URL=https://your-actual-n8n-url.com/api/v1β
Success Check: Run cat .env (Mac/Linux) or type .env (Windows) - you should see your API key and URL (not the placeholder text)
Step 3: Build the Docker Container
This packages everything needed to run the MCP server.
Run the build script:
On Mac/Linux:
chmod +x build.sh
./build.shOn Windows:
docker build -t n8n-mcp-server:latest .This will take 2-3 minutes. You'll see lots of output - that's normal.
β
Success Check: Run docker images | grep n8n-mcp-server - you should see the image listed with "latest" tag
Step 4: Test the Server (Optional but Recommended)
Let's make sure it can connect to your n8n instance.
Run the test:
On Mac/Linux:
chmod +x test.sh
./test.shOn Windows:
docker run --rm -i --env-file .env n8n-mcp-server:latestThen paste this and press Enter:
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0.0"}}}Press Ctrl+C to exit.
β
Success Check: You should see a JSON response (not an error). If you see "Unexpected token" or connection errors, check your .env file.
Step 5: Set Up Docker MCP Gateway
Now we tell Docker MCP Gateway about our n8n server.
Initialize the gateway (first time only):
docker mcp catalog initAdd the n8n server configuration:
Edit the Docker MCP config file:
On Mac/Linux:
nano ~/.docker/mcp/docker-mcp.yamlOn Windows:
notepad %USERPROFILE%\.docker\mcp\docker-mcp.yamlAdd this configuration at the end:
n8n-server: image: n8n-mcp-server:latest environment: N8N_API_KEY: paste_your_actual_n8n_api_key_here N8N_BASE_URL: https://your-n8n-instance.com/api/v1 description: "n8n workflow automation MCP server"Replace the placeholder values:
Use the same API key from your
.envfileUse the same n8n URL from your
.envfile
Save the file
Enable the server:
docker mcp server enable n8n-serverβ
Success Check: Run docker mcp server list - you should see n8n-server with status "enabled"
Step 6: Connect to Claude Desktop
Option A: Automatic (Docker MCP Gateway handles it)
The Docker MCP Gateway should automatically configure Claude Desktop. Just completely quit and restart Claude Desktop.
Option B: Manual Configuration (if automatic doesn't work)
Find your Claude Desktop config file:
Mac:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Edit the file:
On Mac:
nano ~/Library/Application\ Support/Claude/claude_desktop_config.jsonOn Windows:
notepad %APPDATA%\Claude\claude_desktop_config.jsonAdd or update the configuration:
{ "mcpServers": { "docker-mcp-gateway": { "command": "docker", "args": ["run", "-i", "--rm", "docker-mcp-gateway"] } } }Save the file
Restart Claude Desktop:
Don't just close the window - fully quit the app:
Mac: Claude Desktop β Quit Claude Desktop (or Cmd+Q)
Windows: Right-click the system tray icon β Exit
Start Claude Desktop again
β Success Check: Open Claude Desktop and start a new conversation. Type "What n8n tools do you have?" - Claude should list the 42 available tools. If not, see troubleshooting below.
π You're Done! Now What?
Try asking Claude these things:
Basic Commands
"List all my n8n workflows"
"Show me the details of workflow [name]"
"What's the health status of my n8n instance?"Workflow Management
"Activate my [workflow name] workflow"
"Deactivate the [workflow name] workflow"
"Show me all inactive workflows"Execution Monitoring
"Show me all failed executions from today"
"What went wrong with execution [id]?"
"Retry execution [id]"Advanced Operations
"List all environment variables"
"Create a variable named API_URL with value https://api.example.com"
"Show me all users in my n8n instance"π Troubleshooting (Common Issues)
Issue 1: "Docker MCP command not found"
Symptoms: docker mcp: command not found
Solution:
Make sure Docker MCP Toolkit is enabled:
Open Docker Desktop
Settings β Beta Features β Enable Docker MCP Toolkit
Apply & Restart
Reinstall Docker MCP Gateway:
curl -fsSL https://raw.githubusercontent.com/docker/mcp-gateway/main/install.sh | sh
Issue 2: "Tools not showing in Claude"
Symptoms: Claude says it doesn't have n8n tools available
Solutions:
Verify Docker MCP Gateway is running:
docker mcp server listMake sure
n8n-servershows as "enabled"Enable the server if it's disabled:
docker mcp server enable n8n-serverCompletely restart Claude Desktop:
Quit (don't just close)
Wait 5 seconds
Start again
Check Docker is running:
Look for Docker icon in system tray
Should show "Docker Desktop is running"
Issue 3: "Cannot connect to n8n" or "401 Unauthorized"
Symptoms: Claude says it can't reach your n8n instance or authentication fails
Solutions:
Verify your API key works:
curl -H "X-N8N-API-KEY: your_api_key" "https://your-n8n.com/api/v1/workflows?limit=1"Replace with your actual values. You should get JSON response, not an error.
Check your
.envfile:cat .envMake sure:
API key is correct (starts with
eyJ)URL has no trailing slash
URL ends with
/api/v1
Check the Docker MCP config:
cat ~/.docker/mcp/docker-mcp.yamlMake sure the values match your
.envfileRebuild the server:
./build.sh docker mcp server disable n8n-server docker mcp server enable n8n-server
Issue 4: "Unexpected non-whitespace character" Error
Symptoms: JSON parsing errors when testing
This should be fixed in this version. If you still see it:
Make sure you're using the latest code:
git pull origin main ./build.shVerify the image was rebuilt:
docker images | grep n8n-mcp-serverCheck the "CREATED" date - should be recent
Issue 5: "Permission Denied" Errors
On Mac/Linux:
chmod +x build.sh test.sh
./build.shOn Windows: Run PowerShell as Administrator
π€ Common Mistakes (Learn from Others!)
β Mistake 1: Forgetting to Enable Docker MCP Toolkit
The #1 issue! You MUST enable this in Docker Desktop Settings β Beta Features before anything will work.
β Mistake 2: Adding Trailing Slash to URL
Wrong:
N8N_BASE_URL=https://n8n.example.com/api/v1/Correct:
N8N_BASE_URL=https://n8n.example.com/api/v1β Mistake 3: Forgetting to Quit Claude Desktop
Closing the window isn't enough - you must fully quit the app for config changes to take effect.
β Mistake 4: Using Wrong API Key
Make sure you're using an n8n API key, not your login password. Get it from: n8n Settings β API β Create API Key
β Mistake 5: Docker Not Running
The Docker icon must be in your system tray and show "running" status. If Docker isn't running, nothing will work.
β Mistake 6: Not Enabling the Server
After editing docker-mcp.yaml, you must run:
docker mcp server enable n8n-serverπ How It Works (For the Curious)
Here's what happens behind the scenes:
You talk to Claude in natural language
Claude understands what you want to do with n8n
Claude calls the Docker MCP Gateway
The Gateway launches your n8n MCP server container
The MCP server makes API calls to your n8n instance
n8n responds with the data
The response flows back through Gateway β Claude β You
It's like having a translator that speaks "Human" on one side and "n8n API" on the other.
π Available Tools (All 42 of Them)
Workflow Management (10 tools)
n8n_list_workflows- List all workflows with paginationn8n_get_workflow- Get detailed workflow informationn8n_create_workflow- Create new workflowsn8n_update_workflow- Modify existing workflowsn8n_delete_workflow- Delete workflowsn8n_activate_workflow- Enable workflowsn8n_deactivate_workflow- Disable workflowsn8n_transfer_workflow- Transfer workflows between projectsn8n_get_workflow_tags- Get workflow tagsn8n_update_workflow_tags- Update workflow tags
Execution Management (4 tools)
n8n_list_executions- List executions with filteringn8n_get_execution- Get detailed execution informationn8n_delete_execution- Delete execution recordsn8n_retry_execution- Retry failed executions
Credentials Management (4 tools)
n8n_create_credential- Create new credentialsn8n_delete_credential- Delete credentialsn8n_get_credential_schema- Get credential schemasn8n_transfer_credential- Transfer credentials
Variables Management (4 tools)
n8n_list_variables- List environment variablesn8n_create_variable- Create new variablesn8n_update_variable- Update existing variablesn8n_delete_variable- Delete variables
Tags Management (5 tools)
n8n_list_tags- List all tagsn8n_create_tag- Create new tagsn8n_get_tag- Get tag detailsn8n_update_tag- Update tag namesn8n_delete_tag- Delete tags
Users Management (5 tools)
n8n_list_users- List all usersn8n_create_user- Create new usersn8n_get_user- Get user detailsn8n_delete_user- Delete usersn8n_update_user_role- Update user roles
Projects Management (7 tools)
n8n_list_projects- List all projectsn8n_create_project- Create new projectsn8n_update_project- Update project detailsn8n_delete_project- Delete projectsn8n_add_user_to_project- Add users to projectsn8n_remove_user_from_project- Remove usersn8n_update_user_in_project- Update user roles
Audit & Monitoring (3 tools)
n8n_generate_audit- Generate security auditsn8n_pull_source_control- Pull from source controln8n_health_check- Check instance health
π Security & Privacy
What data does this share?
Only the data you ask Claude to fetch from n8n
Your n8n API key stays on your computer (in
.envfile)No data is sent to third parties
Best practices:
β Never commit
.envfile to Git (it's in.gitignore)β Use read-only API keys if possible
β Rotate your API keys periodically
β Don't share your
.envfile with anyone
Docker security:
β Runs as non-root user
β No privileged access required
β Isolated container environment
π‘ Pro Tips
Tip 1: Create Shortcuts
Save common commands as Claude conversations for quick access.
Tip 2: Combine Operations
You can ask Claude to do multiple things at once: "Show me all failed workflows from today, then retry each one"
Tip 3: Use Descriptive Workflow Names
Claude works better when your workflows have clear names like "Daily Email Report" instead of "Workflow 1"
Tip 4: Ask for Explanations
Claude can explain what workflows do: "Explain what my 'Customer Onboarding' workflow does"
Tip 5: Monitor in Real-Time
Ask Claude to check execution status while workflows are running
π Next Steps
Now that you have it working:
β Star this repo if it helped you!
π Share with other n8n users
π¬ Give feedback - what features do you want added?
π Report bugs via GitHub Issues
π€ Contribute - PRs welcome!
π Need Help?
GitHub Issues: https://github.com/Shravan1610/n8n-mcp-server/issues
n8n API Docs: https://docs.n8n.io/api/
MCP Documentation: https://modelcontextprotocol.io/
Docker MCP Gateway: https://github.com/docker/mcp-gateway
π Acknowledgments
Built with:
π― About This Project
This is Day 1 of my 30-day challenge to build useful AI integrations.
Built in one session. Open sourced for the community.
More projects coming! Follow for daily updates.
β If this saved you time, drop a star on GitHub!
Built with Model Context Protocol | 42 Tools | Production Ready
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.