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
- Stdio only. No HTTP server. No public port.
- API key is loaded from environment or a local dotenv file.
.envis gitignored.- Example config uses
REPLACE_ME, never a real key. - Tool responses redact obvious credential, token, secret, password, and authorization fields.
- Execution payload data is disabled by default in
get_execution. - Workflow activation/deactivation are production mutations. Treat them like loaded weapons.
- Python 3.10+
- Hermes Agent with native MCP enabled
- n8n API key
- n8n reachable from the machine running Hermes, usually
http://127.0.0.1:5678
git clone https://github.com/CyberSamuraiX/hermes-n8n-mcp.git
cd hermes-n8n-mcp
python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txtInteractive helper:
./scripts/set-key.shDefault 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/envManual 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/envReplace 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: falseThen 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 n8ncontainer_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.
- Keep n8n bound to loopback behind your reverse proxy.
- Do not expose this MCP bridge over Caddy, nginx, or Docker ports.
- Rotate n8n API keys if they ever hit chat logs, terminals, CI output, screenshots, or issue trackers.
- Back up workflows before mutating them.
MIT. See LICENSE.