# Guardian MCP

> Guardian MCP is an MCP server for security. Policy gate that decides ALLOW, ASK or DENY on every agent tool call. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Platforms:** CLI, API
- **Website:** https://odingard.com/guardian
- **Repository:** https://github.com/odingard/guardian-sdk/tree/HEAD/packages/mcp
- **MCP Registry name:** io.github.Odingard/guardian-mcp
- **Categories:** [security](https://ai-powered.com/categories/security)
- **Listing updated:** 2026-11-15

## About

Guardian sits between an agent and the tools it wants to use. The model's output is treated as a proposal: a call executes only when Guardian returns ALLOW, waits under a request ID when the answer is ASK, and is refused with a reason code on DENY. Approved ASK requests are claimed afterwards and run once.

A proxy mode wraps any stdio MCP server you already use, such as WhatsApp or Stripe, so the client still sees the upstream tools unchanged while every call is decided first. The upstream server never receives the Guardian credentials. If Guardian cannot be reached, nothing is forwarded and the result is a tool error.

A --pin-file option binds the SHA-256 of a file argument into the approval, so a file that changes after approval is caught. The package needs a Guardian control-plane URL, an agent credential and a connection id.

## Features

- **ALLOW, ASK, DENY:** Every call gets a deterministic decision before anything runs.
- **Human approval hold:** ASK holds the exact call until a person approves, then it is forwarded once.
- **Proxy for existing servers:** Puts the gate in front of any stdio MCP server without changing its tools.
- **Evidence receipts:** Machine-readable receipts record what happened to each request.
- **File pinning:** --pin-file hashes a file argument so edits after approval are detected.
- **Fail closed:** Unreachable service or denial means the call is not forwarded.

## Good for

- Require human sign-off before an agent sends messages or payments
- Put an audit trail on tools your agent already uses
- Block risky tool calls by policy rather than by prompt
- Check what really happened after an uncertain tool outcome

## Install

### Claude Code (Terminal)

```sh
claude mcp add guardian-mcp --env GUARDIAN_BASE_URL='<GUARDIAN_BASE_URL>' --env GUARDIAN_AGENT_CREDENTIAL='<GUARDIAN_AGENT_CREDENTIAL>' -- npx -y @odingard/guardian-mcp
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "guardian-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@odingard/guardian-mcp"
      ],
      "env": {
        "GUARDIAN_BASE_URL": "<GUARDIAN_BASE_URL>",
        "GUARDIAN_AGENT_CREDENTIAL": "<GUARDIAN_AGENT_CREDENTIAL>"
      }
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "guardian-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@odingard/guardian-mcp"
      ],
      "env": {
        "GUARDIAN_BASE_URL": "<GUARDIAN_BASE_URL>",
        "GUARDIAN_AGENT_CREDENTIAL": "<GUARDIAN_AGENT_CREDENTIAL>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "guardian-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@odingard/guardian-mcp"
      ],
      "env": {
        "GUARDIAN_BASE_URL": "<GUARDIAN_BASE_URL>",
        "GUARDIAN_AGENT_CREDENTIAL": "<GUARDIAN_AGENT_CREDENTIAL>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "guardian-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@odingard/guardian-mcp"
      ],
      "env": {
        "GUARDIAN_BASE_URL": "<GUARDIAN_BASE_URL>",
        "GUARDIAN_AGENT_CREDENTIAL": "<GUARDIAN_AGENT_CREDENTIAL>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "guardian-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@odingard/guardian-mcp"
      ],
      "env": {
        "GUARDIAN_BASE_URL": "<GUARDIAN_BASE_URL>",
        "GUARDIAN_AGENT_CREDENTIAL": "<GUARDIAN_AGENT_CREDENTIAL>"
      }
    }
  }
}
```

## Tools

- `guardian_invoke_tool`: Proposes a tool call; ALLOW executes and returns a receipt, ASK returns a request ID held for approval, DENY refuses with a reason code.
- `guardian_claim`: Claims an approved ASK by request ID, executes it and returns the receipt.
- `guardian_receipt`: Fetches the machine-readable evidence receipts for a request.

## FAQ

### What does ASK do?

The call is held under a request ID; after a human approves it, guardian_claim forwards exactly that call once.

### Does the upstream server see the agent credential?

No. In proxy mode the upstream server never receives the GUARDIAN settings.

### What if Guardian is down?

Nothing is forwarded; the result is a tool error saying the call can be tried again later.

### Which settings are required?

The control-plane base URL, an agent credential and a default connection id.

### How do I add Guardian MCP to Claude Code?

Run this command in your terminal: claude mcp add guardian-mcp --env GUARDIAN_BASE_URL='<GUARDIAN_BASE_URL>' --env GUARDIAN_AGENT_CREDENTIAL='<GUARDIAN_AGENT_CREDENTIAL>' -- npx -y @odingard/guardian-mcp

### What are the best alternatives to Guardian MCP?

The closest alternatives to Guardian MCP are Protect MCP, MCP Hangar, HOL Guard, mcpgawk and Provared MCP executor.

## Where this comes from

- Description: written from the project's README and the project's website.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Protect MCP](https://ai-powered.com/mcp/protect-mcp): Protect MCP is an open-source MCP server for security.
- [MCP Hangar](https://ai-powered.com/mcp/mcp-hangar): MCP Hangar is an open-source MCP server for security.
- [HOL Guard](https://ai-powered.com/mcp/hol-guard): HOL Guard is a freemium MCP server for security.
- [mcpgawk](https://ai-powered.com/mcp/mcpgawk): mcpgawk is a freemium MCP server for security.
- [Provared MCP executor](https://ai-powered.com/mcp/provared-mcp-executor): Provared MCP executor is a free MCP server for security.
- [mcpcut](https://ai-powered.com/mcp/mcpcut): mcpcut is an open-source MCP server for security.
- [Approval Gate MCP](https://ai-powered.com/mcp/approval-gate-mcp): Approval Gate MCP is an open-source MCP server for security.
- [N0N4 Guardian](https://ai-powered.com/mcp/n0n4-guardian): N0N4 Guardian is a paid MCP server for security.

---
Source: https://ai-powered.com/mcp/guardian-mcp
