
Consentgate Mcp
io.github.jessepetersondev由 GitHub 账号 jessepetersondev 发布v0.1.1更新于 Oct 24, 2026
Gate AI agent actions behind a consent policy with human approval via Telegram. Fail-closed.
概览
一个本地 MCP 服务器,让 AI 代理在执行操作前按 ConsentGate 同意策略检查,并通过 Telegram 请求人工批准。
- 可以做什么
- 按同意规则检查计划中的操作,返回 allow、deny,或在无规则匹配时返回 ask,且不阻塞代理。对高风险操作请求人工批准:向已关联的 Telegram 账号发送批准/拒绝提示,并最多等待约 120 秒。两个工具都采用失败即拒绝:除明确 allow 外一律视为不得继续。
- 适用场景
- 当你希望代理在发送消息、花钱、删除数据、公开发布或改变外部状态之前先征得同意,并希望把人工决策点推送到 Telegram 时使用。
- 运行要求
- 通过 stdio 在本地运行,通常使用 npx consentgate-mcp,因此需要 Node.js。需要 ConsentGate 账号,并通过环境变量 CONSENTGATE_API_KEY 提供 API 密钥。交互式批准需要 Pro 套餐并关联 Telegram 账号;check_action 适用于任何套餐。可用 CONSENTGATE_BASE_URL 指向自托管实例。
安装
在 SourceWeft 中
- 打开 控制台中的 Consentgate Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
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
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:
Claude Desktop
Add to claude_desktop_config.json (Settings → Developer → Edit Config):
Claude Code
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.
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):
License
MIT
来源:README.md,提交 3d74d50
工具
0版本历史
1- v0.1.1最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分