n8n-guard

v0.1.0
io.github.flow-84/n8n-guard Checked 1 day ago Published 21 days ago

Read-only health checks for self-hosted n8n: datastore growth, stuck runs, retention, git drift.

Values you need

VariableWhat it is
N8N_URLoptional Base URL of the n8n instance. Defaults to http://localhost:5678.
N8N_API_KEYoptional secret n8n Public API key. Required for the execution and workflow checks.
N8N_SQLITE_PATHoptional Path to the n8n database.sqlite file. Required for datastore checks on SQLite.
N8N_POSTGRES_URLoptional secret Postgres connection string. Takes precedence over N8N_SQLITE_PATH.
N8N_GIT_REPO_PATHoptional Checkout holding exported workflow JSON. Required for the git drift check.
N8N_GUARD_STUCK_MINUTESoptional Minutes a run may stay in `running` before it counts as stuck. Defaults to 15.
N8N_GUARD_DB_WARN_BYTESoptional Datastore warning threshold in bytes. Defaults to 1073741824 (1 GB).
N8N_GUARD_DB_CRITICAL_BYTESoptional Datastore critical threshold in bytes. Defaults to 4294967296 (4 GB).
N8N_GUARD_TIMEOUT_MSoptional 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.0
Add 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

  1. 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).
  2. Restart or reload the client so it starts the server.
  3. Verify: the server should expose these tools: instance_info, db_health, stuck_executions, retention_report, git_drift, guard_run.
  4. 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