
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 分