mcpField
G
guardian-mcp

guardian-mcp

Local
github.com/OdingardSecurity0Updated today

About guardian-mcp

guardian-mcp is an MCP server that places Guardian authorization checks before agent tool calls. It supports approval holds, policy denials, execution receipts, and proxying existing stdio MCP servers.

Key features

  1. 01Gate calls with ALLOW, ASK, or DENY
  2. 02Hold ASK calls for human approval
  3. 03Claim approved calls and execute them
  4. 04Retrieve machine-readable receipts
  5. 05Proxy existing stdio MCP servers

Use cases

  1. 01Require approval before a tool performs a sensitive action
  2. 02Block calls that Guardian denies or cannot authorize
  3. 03Add Guardian checks to an existing stdio MCP server
  4. 04Inspect suggested modes before governing server tools

MCP support

The server exposes `guardian_invoke_tool`, `guardian_claim`, and `guardian_receipt` to MCP clients. Its proxy mode forwards existing server tools only after Guardian decides; ASK calls wait for human approval and DENY calls are not forwarded.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"odingard-guardian": {
"command": "npx",
"args": [
"-y",
"@odingard/guardian-mcp"
],
"env": {
"GUARDIAN_BASE_URL": "<GUARDIAN_BASE_URL>",
"GUARDIAN_AGENT_CREDENTIAL": "<GUARDIAN_AGENT_CREDENTIAL>",
"GUARDIAN_CONNECTION_ID": "<GUARDIAN_CONNECTION_ID>",
"GUARDIAN_ADAPTER_ID": "<GUARDIAN_ADAPTER_ID>"
}
}
}
}
Run commandnpx -y @odingard/guardian-mcp
Environment variables to set
GUARDIAN_BASE_URLGuardian control-plane base URL
GUARDIAN_AGENT_CREDENTIALSecretAgent credential (gak_…)
GUARDIAN_CONNECTION_IDDefault tool connection id for invocations
GUARDIAN_ADAPTER_IDOptional adapter override

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@odingard/guardian-mcp0.3.3

Tools

3

Saved tool list · updated today

ParameterTypeRequiredDescription
purposestringNoHuman-readable reason for this action.
toolNamestringYesRegistered tool name.
argumentsobjectNoArguments the tool would run with.
connectionIdstringNoTool connection id. Defaults to GUARDIAN_CONNECTION_ID.

Details

From the project README

@odingard/guardian-mcp

Guardian MCP server

MCP server that routes an agent's tool calls through Guardian — Human Authority Infrastructure for Autonomous AI. Every tool call gets a deterministic ALLOW / ASK / DENY decision before anything executes; DENY means the action never runs, and ASK holds it until a human approves.

Install

npm i -g @odingard/guardian-mcp

Configure your MCP client

{
  "mcpServers": {
    "guardian": {
      "command": "guardian-mcp",
      "env": {
        "GUARDIAN_BASE_URL": "https://guardian-api.odingard.com",
        "GUARDIAN_AGENT_CREDENTIAL": "gak_…",
        "GUARDIAN_CONNECTION_ID": "con_…"
      }
    }
  }
}

GUARDIAN_ADAPTER_ID optionally overrides the tool adapter.

Tools

ToolWhat it does
guardian_invoke_toolPropose a tool call. ALLOW executes and returns the receipt; ASK returns a requestId held for human approval; DENY refuses with a reason code.
guardian_claimClaim an approved ASK by requestId, execute, return the receipt.
guardian_receiptFetch the machine-readable evidence receipts for a request.

Nothing executes without a Guardian capability — the model's output is a proposal, never an action.

Govern an existing MCP server: guardian-mcp proxy (0.3)

Put Guardian in front of any stdio MCP server you already use, such as WhatsApp, Stripe, Shopify, a filesystem or a database. The client sees the upstream server's tools unchanged, and every call is decided first:

{
  "mcpServers": {
    "whatsapp-governed": {
      "command": "guardian-mcp",
      "args": ["proxy", "--", "npx", "-y", "your-whatsapp-mcp-server"],
      "env": {
        "GUARDIAN_BASE_URL": "https://guardian-api.odingard.com",
        "GUARDIAN_AGENT_CREDENTIAL": "gac1.…",
        "GUARDIAN_CONNECTION_ID": "con_…",
        "WHATSAPP_TOKEN": "…"
      }
    }
  }
}
DecisionWhat happens
ALLOWThe call is forwarded to the upstream server, then the capability is redeemed and the receipt recorded.
ASKNothing is forwarded. The exact call is held under a requestId; after a human approves, guardian_claim forwards exactly that call, once.
DENYNothing is forwarded, ever. The same applies if Guardian is unreachable.
  • guardian_claim and guardian_receipt are added to the tool list.
  • The upstream server never receives GUARDIAN_* settings, so it never sees the agent credential.
  • Decision-gated: an allowed call runs upstream before the capability is redeemed. A refusal at redemption is reported as an incident (localEffectRan: true), never as success.
  • First-run setup: in the Guardian console, connect a tool server and add each upstream tool as "My own code (record-only)". Then allow those tools for the agent.
    • Since 0.3.1 the proxy does not try to register tools itself.
    • GUARDIAN_AUTO_REGISTER=true turns that back on, but it is denied unless the agent's grant pins mcp.install.
    • When Guardian refuses, the result says what to fix.
  • Held calls live in the proxy process. Restarting the proxy drops them, and nothing is forwarded.

guardian-mcp --help prints usage. A missing setting prints a one-line message naming it instead of a stack trace.

See what you are about to govern: guardian-mcp tools

Before putting a server behind the proxy, list its tools along with a suggested Guardian mode for each. This needs no Guardian credential:

npx -y @odingard/guardian-mcp tools -- npx -y @modelcontextprotocol/server-filesystem ./data
Tool            Suggested     Why
read_file       Allow         server marks it read-only
write_file      Ask me first  "write" may change something
delete_branch   Ask me first  server marks it destructive
createIssue     Ask me first  "create" may change something  ⚠ name not accepted by Guardian

How the suggestions are made:

  • The server's own MCP annotations (readOnlyHint, destructiveHint) are used first.
  • Otherwise the tool's verb decides. get, list and search suggest Allow; everything else suggests Ask.

They are suggestions only: you set the real modes in the console. Tool names that break Guardian's naming rule are flagged, because every call to them would be denied. Add --json for machine-readable output.

License

Apache-2.0. Canonical development happens in the Odingard Guardian monorepo.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.