{"id":"6ee6ed67-dce1-47b6-92ff-fae40fc77728","slug":"consentgate-mcp","kind":"mcp","name":"consentgate-mcp","summary":"MCP server: gate AI-agent actions behind a consent policy + human approval (Telegram). Tools: check_action, request_approval. Fail-closed.","owner":"jessepetersondev","repoUrl":"https://github.com/jessepetersondev/consentgate-mcp","license":"MIT","licenseTier":"permissive","trust":"community","stars":0,"match":null,"fewStars":true,"format":"mcp","createdAt":"2026-06-02T15:14:21.000Z","addedAt":"2026-10-14T05:40:01.826Z","logoUrl":"https://avatars.githubusercontent.com/u/203448020?u=8de22610bb954b7a0e84cb9f7d7340ffcfa0b78f&v=4","linkOnly":false,"collection":null,"skillPath":null,"categories":["communication","cloud-infra"],"tags":[],"runtime":"node","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":true,"reviewed":false,"syncedAt":"2026-10-17T16:17:53.870Z","sample":false,"url":"https://conduits.dev/tools/consentgate-mcp","language":"JavaScript","transports":["stdio"],"install":{"npm":"consentgate-mcp"},"requirements":{"env":[{"name":"CONSENTGATE_API_KEY","secret":true,"required":true,"description":"ConsentGate API key (cg_…) from https://consentgate.fyi/dashboard/keys"},{"name":"CONSENTGATE_BASE_URL","secret":false,"required":false,"description":"Override the API base URL (defaults to https://consentgate.fyi)"}],"upstreamMayCharge":false},"tools":null,"readme":"# consentgate-mcp\n\nA [Model Context Protocol](https://modelcontextprotocol.io) server that lets any\nMCP-capable agent (Claude Desktop, Claude Code, Cursor, custom agents, …) gate its own\nactions behind a human's consent policy via [ConsentGate](https://consentgate.fyi).\n\nThe agent asks **before** it acts; you stay in control. High-stakes actions can block on an\nexplicit **Approve / Deny** tap delivered to your Telegram.\n\n## Tools\n\n| Tool | Blocks? | What it does |\n|------|---------|--------------|\n| `check_action` | no | Evaluates an action against your consent rules. Returns `allow`, `deny`, or `ask` (no rule matched). Use it before any sensitive/irreversible action. |\n| `request_approval` | yes (≤120s) | Sends an Approve/Deny prompt to your Telegram and blocks until you tap or it times out. Returns `allow` only on an explicit human Approve; everything else (deny, timeout, not-available) is `deny`. |\n\nBoth **fail closed**: anything other than an explicit `allow` means *do not proceed*.\n\n## Prerequisites\n\n1. A ConsentGate account and an API key → **https://consentgate.fyi/dashboard/keys** (`cg_…`).\n2. For `request_approval` (interactive approvals): the **Pro** plan **and** a linked Telegram\n   account (Dashboard → Telegram → Connect). `check_action` works on any plan.\n\n## Configuration\n\nEnvironment variables:\n\n| Var | Required | Default | Notes |\n|-----|----------|---------|-------|\n| `CONSENTGATE_API_KEY` | ✅ | — | Your `cg_…` key. |\n| `CONSENTGATE_BASE_URL` | — | `https://consentgate.fyi` | Override for self-hosted instances. |\n\n### Claude Desktop\n\nAdd to `claude_desktop_config.json` (Settings → Developer → Edit Config):\n\n```jsonc\n{\n  \"mcpServers\": {\n    \"consentgate\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"consentgate-mcp\"],\n      \"env\": { \"CONSENTGATE_API_KEY\": \"cg_your_key_here\" }\n    }\n  }\n}\n```\n\n### Claude Code\n\n```bash\nclaude mcp add consentgate --env CONSENTGATE_API_KEY=cg_your_key_here -- npx -y consentgate-mcp\n```\n\n### Generic MCP client\n\nRun `npx -y consentgate-mcp` (stdio transport) with `CONSENTGATE_API_KEY` in the environment.\n\n## Run from source\n\n> Until the package is published to npm, point your client at the built file\n> (`node /abs/path/to/mcp/dist/index.js`) instead of `npx consentgate-mcp`.\n\n```bash\ncd mcp\nnpm install        # also builds via the `prepare` script\nnpm run build      # -> dist/index.js\nCONSENTGATE_API_KEY=cg_… npm run smoke   # lists tools + a live check_action\n```\n\n## How an agent should use it\n\nA good agent policy:\n\n> Before performing any action that sends messages, spends money, deletes data, posts\n> publicly, or changes external state, call `check_action`. If the result is `allow`,\n> proceed. If `deny`, stop. If `ask` (or the action is high-stakes), call `request_approval`\n> and proceed only on an explicit `allow`.\n\nExample (`request_approval`):\n\n```jsonc\n{\n  \"action\": \"transfer_funds\",\n  \"category\": \"spending\",\n  \"metadata\": { \"amount\": \"$500\", \"to\": \"Acme Corp\" },\n  \"wait_seconds\": 90\n}\n// -> blocks; you tap Approve in Telegram -> { \"decision\": \"allow\", \"resolved_by\": \"human\" }\n```\n\n## License\n\nMIT\n"}