Local stdio MCP bridge for managing n8n from Hermes Agent.
This is the sanitized public version of the bridge built for a production VPS. It gives Hermes n8n tools without exposing n8n over the public internet and without putting API keys in your Hermes config.
Exposes these MCP tools:
health — check n8n API reachability and optional Docker container statuslist_workflows — list workflows, optionally filtered by active stateget_workflow — inspect one workflow with secret-bearing fields redactedfind_workflows — search workflow metadatalist_executions — list recent executionsget_execution — inspect one execution; payload data is off by defaultrecent_failures — recent failed/error executionsexport_workflow — fetch redacted workflow JSON for backup/reviewactivate_workflow — activate a workflow by IDdeactivate_workflow — deactivate a workflow by IDcontainer_logs — optional Docker logs with line-level redaction.env is gitignored.REPLACE_ME, never a real key.get_execution.http://127.0.0.1:5678git clone https://github.com/CyberSamuraiX/hermes-n8n-mcp.git
cd hermes-n8n-mcp
python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt
Interactive helper:
./scripts/set-key.sh
Default output path:
~/.config/n8n-mcp/env
Expected permissions:
stat -c '%a %U:%G %n' ~/.config/n8n-mcp/env
# 600 youruser:yourgroup /home/youruser/.config/n8n-mcp/env
Manual version:
install -d -m 700 ~/.config/n8n-mcp
cat > ~/.config/n8n-mcp/env <<'EOF'
N8N_BASE_URL=http://127.0.0.1:5678
N8N_API_KEY=REPLACE_ME
N8N_MCP_TIMEOUT=30
N8N_CONTAINER_NAME=n8n
N8N_MCP_ALLOW_DOCKER_LOGS=true
EOF
chmod 600 ~/.config/n8n-mcp/env
Replace REPLACE_ME locally. Do not commit the real file.
Add this to ~/.hermes/config.yaml:
mcp_servers:
n8n:
command: "/absolute/path/to/hermes-n8n-mcp/.venv/bin/python"
args:
- "/absolute/path/to/hermes-n8n-mcp/server.py"
env:
N8N_MCP_ENV: "/absolute/path/to/.config/n8n-mcp/env"
timeout: 120
connect_timeout: 30
sampling:
enabled: false
Then reload MCP in Hermes:
/reload-mcp
Or from shell:
hermes mcp test n8n
. .venv/bin/activate
python -m py_compile server.py
hermes mcp test n8n
container_logs shells out to Docker. If the user running Hermes cannot access Docker, set:
N8N_MCP_ALLOW_DOCKER_LOGS=false
The rest of the API tools will still work.
MIT. See LICENSE.
2 commits
Python
92.9%
Shell
7.1%
Local stdio MCP bridge for managing n8n from Hermes Agent.
This is the sanitized public version of the bridge built for a production VPS. It gives Hermes n8n tools without exposing n8n over the public internet and without putting API keys in your Hermes config.
Exposes these MCP tools:
health — check n8n API reachability and optional Docker container statuslist_workflows — list workflows, optionally filtered by active stateget_workflow — inspect one workflow with secret-bearing fields redactedfind_workflows — search workflow metadatalist_executions — list recent executionsget_execution — inspect one execution; payload data is off by defaultrecent_failures — recent failed/error executionsexport_workflow — fetch redacted workflow JSON for backup/reviewactivate_workflow — activate a workflow by IDdeactivate_workflow — deactivate a workflow by IDcontainer_logs — optional Docker logs with line-level redaction.env is gitignored.REPLACE_ME, never a real key.get_execution.http://127.0.0.1:5678git clone https://github.com/CyberSamuraiX/hermes-n8n-mcp.git
cd hermes-n8n-mcp
python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt
Interactive helper:
./scripts/set-key.sh
Default output path:
~/.config/n8n-mcp/env
Expected permissions:
stat -c '%a %U:%G %n' ~/.config/n8n-mcp/env
# 600 youruser:yourgroup /home/youruser/.config/n8n-mcp/env
Manual version:
install -d -m 700 ~/.config/n8n-mcp
cat > ~/.config/n8n-mcp/env <<'EOF'
N8N_BASE_URL=http://127.0.0.1:5678
N8N_API_KEY=REPLACE_ME
N8N_MCP_TIMEOUT=30
N8N_CONTAINER_NAME=n8n
N8N_MCP_ALLOW_DOCKER_LOGS=true
EOF
chmod 600 ~/.config/n8n-mcp/env
Replace REPLACE_ME locally. Do not commit the real file.
Add this to ~/.hermes/config.yaml:
mcp_servers:
n8n:
command: "/absolute/path/to/hermes-n8n-mcp/.venv/bin/python"
args:
- "/absolute/path/to/hermes-n8n-mcp/server.py"
env:
N8N_MCP_ENV: "/absolute/path/to/.config/n8n-mcp/env"
timeout: 120
connect_timeout: 30
sampling:
enabled: false
Then reload MCP in Hermes:
/reload-mcp
Or from shell:
hermes mcp test n8n
. .venv/bin/activate
python -m py_compile server.py
hermes mcp test n8n
container_logs shells out to Docker. If the user running Hermes cannot access Docker, set:
N8N_MCP_ALLOW_DOCKER_LOGS=false
The rest of the API tools will still work.
MIT. See LICENSE.
2 commits
Python
92.9%
Shell
7.1%