npm consentgate-mcpstdioMITupdated 3mo ago
A Model Context Protocol server that lets any MCP-capable agent (Claude Desktop, Claude Code, Cursor, custom agents, …) gate its own actions behind a human's consent policy via ConsentGate.
What can you do with consentgate mcp?
consentgate-mcp
A Model Context Protocol server that lets any MCP-capable agent (Claude Desktop, Claude Code, Cursor, custom agents, …) gate its own actions behind a human's consent policy via ConsentGate.
The agent asks before it acts; you stay in control. High-stakes actions can block on an explicit Approve / Deny tap delivered to your Telegram.
Tools
| Tool | Blocks? | What it does |
|---|---|---|
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. |
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. |
Both fail closed: anything other than an explicit allow means do not proceed.
Prerequisites
- A ConsentGate account and an API key → https://consentgate.fyi/dashboard/keys (
cg_…). - For
request_approval(interactive approvals): the Pro plan and a linked Telegram account (Dashboard → Telegram → Connect).check_actionworks on any plan.
Configuration
Environment variables:
| Var | Required | Default | Notes |
|---|---|---|---|
CONSENTGATE_API_KEY |
✅ | — | Your cg_… key. |
CONSENTGATE_BASE_URL |
— | https://consentgate.fyi |
Override for self-hosted instances. |
Claude Desktop
Add to claude_desktop_config.json (Settings → Developer → Edit Config):
{
"mcpServers": {
"consentgate": {
"command": "npx",
"args": ["-y", "consentgate-mcp"],
"env": { "CONSENTGATE_API_KEY": "cg_your_key_here" }
}
}
}
Claude Code
claude mcp add consentgate --env CONSENTGATE_API_KEY=cg_your_key_here -- npx -y consentgate-mcp
Generic MCP client
Run npx -y consentgate-mcp (stdio transport) with CONSENTGATE_API_KEY in the environment.
Run from source
Until the package is published to npm, point your client at the built file (
node /abs/path/to/mcp/dist/index.js) instead ofnpx consentgate-mcp.
cd mcp
npm install # also builds via the `prepare` script
npm run build # -> dist/index.js
CONSENTGATE_API_KEY=cg_… npm run smoke # lists tools + a live check_action
How an agent should use it
A good agent policy:
Before performing any action that sends messages, spends money, deletes data, posts publicly, or changes external state, call
check_action. If the result isallow, proceed. Ifdeny, stop. Ifask(or the action is high-stakes), callrequest_approvaland proceed only on an explicitallow.
Example (request_approval):
{
"action": "transfer_funds",
"category": "spending",
"metadata": { "amount": "$500", "to": "Acme Corp" },
"wait_seconds": 90
}
// -> blocks; you tap Approve in Telegram -> { "decision": "allow", "resolved_by": "human" }
License
MIT
Install
Add consentgate mcp to your client. Pick the one you use.
claude mcp add consentgate-mcp -- npx -y consentgate-mcpcodex mcp add consentgate-mcp -- npx -y consentgate-mcpamp mcp add consentgate-mcp -- npx -y consentgate-mcp{
"mcpServers": {
"consentgate-mcp": {
"command": "npx",
"args": [
"-y",
"consentgate-mcp"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"consentgate-mcp": {
"command": "npx",
"args": [
"-y",
"consentgate-mcp"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
code --add-mcp '{"name":"consentgate-mcp","command":"npx","args":["-y","consentgate-mcp"]}'Or add the block manually to `.vscode/mcp.json` under `servers`.
{
"mcpServers": {
"consentgate-mcp": {
"command": "npx",
"args": [
"-y",
"consentgate-mcp"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"consentgate-mcp": {
"command": "npx",
"args": [
"-y",
"consentgate-mcp"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"consentgate-mcp": {
"command": "npx",
"args": [
"-y",
"consentgate-mcp"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"consentgate-mcp": {
"type": "local",
"command": "npx",
"args": [
"-y",
"consentgate-mcp"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"consentgate-mcp": {
"command": {
"path": "npx",
"args": [
"-y",
"consentgate-mcp"
]
}
}
}
}Add to your Zed `settings.json`.
npx -y consentgate-mcpRun `goose configure`, choose **Add Extension → Command-line Extension**, and paste this command.
2 tools
consentgate mcp exposes 2 tools to a connected agent.
- check_action
- no
- request_approval
- yes (≤120s)
Score
67 / 100
Good
- Documentation22/25
- Maintenance16/25
- Trust13/20
- Capability4/15
- Install experience12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 89 days ago
- Has a release history
- Repository is not archived
- Licensed MIT
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 2 tool(s) documented
- Provides prompt templates
- Provides resources
- 12 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint — no local install
Version history
| Versions | Published |
|---|---|
| 0.1.1Latest | Jun 4, 2026 |