n8n-guard
v0.1.0Read-only health checks for self-hosted n8n: datastore growth, stuck runs, retention, git drift.
Values you need
| Variable | What it is | |
|---|---|---|
N8N_URL | optional | Base URL of the n8n instance. Defaults to http://localhost:5678. |
N8N_API_KEY | optional secret | n8n Public API key. Required for the execution and workflow checks. |
N8N_SQLITE_PATH | optional | Path to the n8n database.sqlite file. Required for datastore checks on SQLite. |
N8N_POSTGRES_URL | optional secret | Postgres connection string. Takes precedence over N8N_SQLITE_PATH. |
N8N_GIT_REPO_PATH | optional | Checkout holding exported workflow JSON. Required for the git drift check. |
N8N_GUARD_STUCK_MINUTES | optional | Minutes a run may stay in `running` before it counts as stuck. Defaults to 15. |
N8N_GUARD_DB_WARN_BYTES | optional | Datastore warning threshold in bytes. Defaults to 1073741824 (1 GB). |
N8N_GUARD_DB_CRITICAL_BYTES | optional | Datastore critical threshold in bytes. Defaults to 4294967296 (4 GB). |
N8N_GUARD_TIMEOUT_MS | optional | Per-request API timeout in milliseconds. Defaults to 15000. |
npm (npx) discovery passed
Requires Node.js 18+
Run in a terminal
claude mcp add n8n-guard -- npx -y n8n-guard@0.1.0Add to
claude_desktop_config.json{
"mcpServers": {
"n8n-guard": {
"args": [
"-y",
"n8n-guard@0.1.0"
],
"command": "npx"
}
}
}Add to
~/.cursor/mcp.json{
"mcpServers": {
"n8n-guard": {
"args": [
"-y",
"n8n-guard@0.1.0"
],
"command": "npx"
}
}
}Add to
.vscode/mcp.json{
"servers": {
"n8n-guard": {
"args": [
"-y",
"n8n-guard@0.1.0"
],
"command": "npx",
"type": "stdio"
}
}
}Add to
~/.codex/config.toml[mcp_servers.n8n-guard]
command = "npx"
args = ["-y", "n8n-guard@0.1.0"]For AI agents
- Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
- Restart or reload the client so it starts the server.
- Verify: the server should expose these tools: instance_info, db_health, stuck_executions, retention_report, git_drift, guard_run.
- If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.
Machine-readable: install.md · manifest.json