Guardian Mcp

io.github.Odingard由 GitHub 帳號 Odingard 發布v0.3.2更新於 Nov 5, 2026

Routes agent tool calls through Guardian for ALLOW/ASK/DENY before execution.

已驗證STDIO僅桌面效率與工作流安全與監控

概覽

AI 產生的概覽

讓代理的工具呼叫先經 Guardian 判定 ALLOW/ASK/DENY 再執行,支援人工核准與可驗證回執。

可以做什麼
  • 向 Guardian 提出工具呼叫提案,在執行前取得 ALLOW、ASK 或 DENY 的確定性判定
  • 領取已獲人工核准的 ASK 請求的能力並執行,回傳執行回執
  • 依請求 id 取得機器可讀的證據回執
  • 以代理方式納管既有的 MCP 伺服器
適用情境
適合助理會執行有後果的操作、需要在執行前設下策略關卡與人工確認,並在事後留下防竄改證據的情境。適合需要對付款、退款、發送訊息等高風險工具呼叫建立簽核流程的團隊。
執行需求
以 npm 套件 @odingard/guardian-mcp 透過 stdio 在本機執行。需要以 GUARDIAN_BASE_URL 提供 Guardian 控制平面位址、以 GUARDIAN_AGENT_CREDENTIAL 提供代理憑證、以 GUARDIAN_CONNECTION_ID 提供預設連線 id;GUARDIAN_ADAPTER_ID 為選用。需要能連線至 Guardian 服務的網路。
安裝前請注意
需要 Guardian 代理憑證(GUARDIAN_AGENT_CREDENTIAL,gak_ 開頭),該憑證可代表你執行操作。判定為 ALLOW 的呼叫會立即執行,因此策略設定決定哪些操作無須複核即可執行。工具參數與回執會傳送至 Guardian 控制平面,託管服務在免費額度之外另有付費方案。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Guardian Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

[Guardian — human authority for AI]

Guardian SDK

[npm version] [MCP registry] [Guardian MCP server on mcprush] [License]

Human Authority Infrastructure for Autonomous AI. The agent proposes; the human decides. Every tool call an agent makes gets a deterministic ALLOW / ASK / DENY decision before it runs, and every execution produces a tamper-evident receipt you can verify without an account.

Hosted Guardian: guardian.odingard.com — free tier, no card required. Pricing: Free, Developer $99/month with 25,000 billable executions included, Business via sales.

Packages

PackageUse it whenDocs
@odingard/guardian-sdkYou call Guardian from your own agent code: createGuard for your own action code, plus the core client, receipts and approvalspackages/sdk
odingard-guardian (PyPI)You build in Python (LangChain, CrewAI, OpenAI Agents, Claude Agent SDK, plain code), sync or asyncpackages/python
@odingard/guardian-mcpYour agent speaks MCP (Claude, Cursor, …), with no code needed. guardian-mcp proxy governs any existing MCP serverpackages/mcp
@odingard/guardian-langchainYou build with LangChain.js / LangGraphpackages/langchain
@odingard/guardian-vercel-aiYou build with the Vercel AI SDKpackages/vercel-ai
@odingard/guardian-steelYour browser agent checks out on Steelpackages/steel

Quickstart

bash
npm install @odingard/guardian-sdk
ts
import { classifyRequestResult, createGuardianClient } from "@odingard/guardian-sdk";
const guardian = createGuardianClient({  baseUrl: "https://guardian-api.odingard.com",  credential: process.env.GUARDIAN_AGENT_CREDENTIAL!, // gak_… issued per agent});
const d = classifyRequestResult(  await guardian.request({    action: "tool.invoke",    connectionId: "con_…",    toolName: "refund_order",    arguments: { orderId: "ord_123" },  }),);
if (d.decision === "ALLOW") {  await guardian.execute({ requestId: d.requestId, capabilityToken: d.capabilityToken });}// ASK → held for a human (keep d.requestId, then guardian.claim). DENY → never runs.

Govern your own action code (any framework)

ts
import { createGuard } from "@odingard/guardian-sdk";
const guard = createGuard({ client: guardian, connectionId: "con_…" });const payInvoice = guard("pay_invoice", async (inv) => myPaymentProvider.pay(inv)); // your codeawait payInvoice({ invoiceId: "INV-1002", amountCents: 1_240_000, payeeId: "acme" });// ALLOW → your code runs + receipt. ASK → GuardianApprovalPending (resume() after approval). DENY → never runs.
python
from odingard_guardian import Guard, GuardianClient
guard = Guard(GuardianClient(credential=...), connection_id="con_…")
@guard("pay_invoice")def pay_invoice(invoice_id: str, amount_cents: int, payee_id: str): ...  # your code

Govern an MCP server you already use

bash
guardian-mcp proxy -- npx -y your-whatsapp-mcp-server

Full guides: packages/sdk · packages/python · packages/mcp.

Examples

Runnable demos in examples/ — each prints SIMULATED (local demo policy) or LIVE (real hosted Guardian or real published keys).

bash
npm install && npm run buildcd examplesnode verify-receipt.mjs         # LIVE, no account: verify a real receipt offline, then tampernode demo-classes.mjs           # the 7 demo classesnode steel-checkout.mjs         # Steel checkout → ASK → resumenode shopping-agent.mjs         # purchase → ASK, human approves, receiptnode prompt-injection-deny.mjs  # injected "export contacts" → DENYnode coding-agent-ask.mjs       # consequential command → ASKnode invoice-agent.mjs          # B2B invoices: ALLOW under $5k, ASK above, DENY unknown payee (createGuard)python python/invoice_agent.py  # the same, in Python (pip install odingard-guardian)

Repository layout

text
packages/sdk        @odingard/guardian-sdk      core clientpackages/mcp        @odingard/guardian-mcp      MCP serverpackages/langchain  @odingard/guardian-langchainpackages/vercel-ai  @odingard/guardian-vercel-aipackages/steel      @odingard/guardian-steelpackages/python     odingard-guardian (PyPI)    Python SDKexamples/           runnable demos

packages/sdk/src/contracts, packages/sdk/src/evidence, the SDK client, guard, lifecycle and receipts sources, and the Steel adapter sources are generated from the Guardian monorepo — don't edit them here. See CONTRIBUTING.md.

License

Apache-2.0

來源:README.md,提交 d1c2608

工具

3

guardian_invoke_tool

Propose a tool invocation to Guardian. ALLOW executes immediately and returns the execution receipt; ASK is held for human approval (call guardian_claim with the returned requestId after the human approves); DENY refuses the action with a reason code.

輸入參數purposetoolName必填argumentsconnectionId

guardian_claim

Collect the capability for a request that was held as ASK and approved by the human, then execute it and return the receipt.

輸入參數requestId必填

guardian_receipt

Fetch the machine-readable evidence receipts for a request id.

輸入參數requestId必填

版本歷史

3
  1. v0.3.2最新Nov 5, 2026
  2. v0.3.0Nov 5, 2026
  3. v0.1.1Nov 1, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分