MCP Guard 7d4661ae

MCP安全风控

提供方 botzrDev

安全风控 未标注 OAuth 授权 社区 / 第三方 Claude

mcp-guard是一个为MCP服务器提供生产级保护的安全网关,支持认证、授权、速率限制和审计日志等功能。

一句话选型结论

按资料字段整理

MCP Guard 7d4661ae 属于安全风控类 MCP 服务器,传输方式未标注,OAuth 授权,可直接接入 Claude,没有现成安装命令,需按官方文档接入。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类安全风控 传输方式未标注 鉴权OAuth 授权 部署方式未标注
GitHub 星标 0 仓库热度,无公开仓库时显示未标注
工具数 未标注 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

安全风控
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量未标注暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

支持客户端

适用场景

安全网关Rust本地部署MCP服务器身份验证速率限制审计日志

安装与配置

未标注 OAuth 授权
上游未给出传输方式
  1. 1
    准备运行环境

    按官方文档确认运行环境(常见为 Node.js 或 Python),装好后再执行安装命令。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后随便调一个只读工具,确认能返回结果,再接入正式流程。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
资产与漏洞排查

盘点资产、扫漏洞、看暴露面。

日志与审计

汇总日志、查异常行为。

合规检查

按规则检查配置与权限是否合规。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 已适配 Claude,换客户端不用重新研究配置。

先想清楚的地方

  • 没有现成安装命令,需要按官方文档自己填启动命令和参数。
  • 使用前要准备好OAuth 授权对应的凭据,并按最小权限配置。
  • 资料没标注工具数量,实际能力要装好后确认。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在安全风控场景里让模型直接调用外部能力的人。
  • 已经在用 Claude 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 不方便管理密钥或第三方授权的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
MCP Guard 7d4661ae当前 未标注 未标注 未标注 无 2026-05-17
Cyber Strike AI 75 未标注 未标注 无 2026-05-17
mcp-for-beginners 未标注 stdio · 本地进程 本地部署 有 2026-04-13
casdoor 未标注 stdio · 本地进程 本地部署 有 2026-04-12
kubeshark 未标注 stdio · 本地进程 本地部署 有 2026-04-11
Modelcontextprotocol C22988b0 未标注 stdio · 本地进程 本地部署 有 2026-05-17

服务器档案

安全风控
字段来自项目仓库与公开索引,中文说明由本站标注
提供方botzrDev上游标注的维护方 botzrDev
分类安全风控本站按上游分类展示
连接方式未标注上游未给出传输方式
鉴权方式OAuth 授权远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · 未标注本地安装时用到的包标识与运行时
部署类型未标注上游给出的部署形态
最近核验2026-05-17上游最后核验时间

详细介绍

13.0 KB
来自项目仓库与上游目录的原文,未做删改

mcp-guard

The policy and evidence layer between your AI agent and its tools.

One binary. One config file. No Docker, no Kubernetes, no DevOps team.

Quick Start •
Modes •
Features •
Roadmap •
Documentation

The Problem

Model Context Protocol (MCP) servers give AI agents real power: files, shells, databases, SaaS APIs. Most of them run with no policy at all.

  • A server advertises whatever tools it likes, and the agent calls them. Nobody said which tools were allowed.
  • A server can silently rewrite its tool descriptions after you approved it. The model reads those descriptions as instructions.
  • When something goes wrong, there is no record of what the agent actually did.
  • Remote servers are often exposed with no authentication whatsoever.

The Solution

mcp-guard sits between the agent and every MCP server it uses, and answers three questions: what may the agent do, did the tools change, and what did it actually do?```
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Agent │─────▶│ mcp-guard │─────▶│ MCP Server │
│ (Claude, │ │ │ │ (yours) │
│ Cursor...) │◀─────│ │◀─────│ │
└─────────────┘ └─────────────┘ └─────────────┘
│
Tool policy (allow / deny)
Tool pinning (lockfile)
Audit log of every call
Auth + rate limits (gateway mode)


## Quick Start

Build the binary (there are no prebuilt binaries or Homebrew tap yet):```bash
cargo install mcp-guard
# or: git clone https://github.com/botzrDev/mcp-guard && cd mcp-guard && cargo build --release

Then see what your agents are running unprotected:```bash
mcp-guard doctor
``````
Scanned 2 client config file(s):
Claude Desktop /Users/you/Library/Application Support/Claude/claude_desktop_config.json
Cursor /Users/you/.cursor/mcp.json

Servers: 4 found, 0 guarded by mcp-guard

WARN Claude Desktop / filesystem
npx -y @modelcontextprotocol/server-filesystem /Users/you runs with full access to
every tool it offers, no audit log, and no pinning of its tool definitions
fix: mcp-guard wrap --client claude-desktop --server "filesystem"
...
Next step: mcp-guard wrap --client claude-desktop


Put the guard in front of them. The client's config is backed up first, and the original command, arguments and environment are preserved:```bash
mcp-guard wrap --client claude-desktop --deny "delete_*,execute_*"

Restart the client. Every stdio server now runs behind mcp-guard with a per-server config under ~/.config/mcp-guard/, an audit log, and its tool definitions pinned on first use. Edit [policy] in the generated config to tighten access, and run mcp-guard doctor again.

Two ways to run it

Local mode: mcp-guard serve

For the servers your own agent launches on your machine. The MCP client runs mcp-guard serve, which launches the real server as a subprocess and proxies the protocol. There is nothing to authenticate here: you are the user. What you get is control and evidence.

What it does How
Restrict which tools the agent may call [policy] allowed_tools and denied_tools, with globs
Detect tool poisoning and rug pulls Tool definitions are hashed into a lockfile on first use. Changed or new tools are hidden and rejected until you review them with mcp-guard pin
Record what happened Every tool call and every denial is written to an audit log
Prove what happened The flight recorder keeps every request, response and decision in a hash-chained, redacted session file. replay renders it, verify checks it
Ask before acting A hold rule pauses a call until you approve it from another terminal, with a desktop notification and a timeout
Keep secrets out of guard configs Environment variables stay on the client's entry and are inherited by the upstream
Get in and out safely mcp-guard wrap backs up the client config; mcp-guard unwrap restores it

Works with Claude Desktop, Claude Code, Cursor, Windsurf and VS Code, or any JSON file with an mcpServers or servers map. See docs/local-mode.md.

Gateway mode: mcp-guard run

For servers other people or other systems reach over the network. mcp-guard listens on HTTP, authenticates callers, applies per-identity tool permissions and rate limits, and forwards to the upstream over stdio, HTTP or SSE.```bash
mcp-guard init # generate mcp-guard.toml with a demo API key
mcp-guard run # listen on :3000
curl -H "Authorization: Bearer mcp_YOUR_KEY" http://localhost:3000/health


## Features

### Local mode (free, all tiers)

- Tool policy with allow and deny globs
- Argument-level rules (`write_file` only under the workspace, `http_request` only `GET`), tested with `mcp-guard policy test`
- Shadow mode: observe first, then `mcp-guard policy suggest --apply` writes a least-privilege policy from what the agent actually used
- Tool pinning with a reviewable JSON lockfile (`mcp-guard pin`)
- Flight recorder: tamper-evident, redacted per-session recording; `mcp-guard replay` shows what the agent did (or writes an HTML report), `mcp-guard verify` proves nobody edited it
- Holds: `action = "hold"` pauses a risky call until you run `mcp-guard approve`, sudo for agents
- Per-server audit log
- `doctor`, `wrap`, `unwrap` for Claude Desktop, Claude Code, Cursor, Windsurf, VS Code
- `guard/health`, `guard/metrics`, `guard/version` tools exposed to the agent
- Transparent forwarding of the `initialize` handshake and of resources, prompts and notifications

### Gateway mode

| Authentication | Free | Pro | Enterprise |
|--------|:----:|:---:|:----------:|
| API Keys | ✓ | ✓ | ✓ |
| JWT (HS256) | ✓ | ✓ | ✓ |
| JWT (JWKS/RS256/ES256) | | ✓ | ✓ |
| OAuth 2.1 + PKCE | | ✓ | ✓ |
| mTLS Client Certificates | | | ✓ |

| Transport | Free | Pro | Enterprise |
|------|:----:|:---:|:----------:|
| Stdio | ✓ | ✓ | ✓ |
| HTTP | | ✓ | ✓ |
| SSE | | ✓ | ✓ |
| Multi-Server Routing | | | ✓ |

| Security & Observability | Free | Pro | Enterprise |
|---------|:----:|:---:|:----------:|
| Per-Tool Authorization | ✓ | ✓ | ✓ |
| Tools Filtering | ✓ | ✓ | ✓ |
| Global Rate Limiting | ✓ | ✓ | ✓ |
| Per-Identity Rate Limiting | | ✓ | ✓ |
| Prometheus Metrics | ✓ | ✓ | ✓ |
| Health Endpoints | ✓ | ✓ | ✓ |
| Audit Logs (file/console) | ✓ | ✓ | ✓ |
| OpenTelemetry Tracing | | | ✓ |
| SIEM Log Shipping | | | ✓ |

Pro and Enterprise builds are not on sale yet. The tier split is under review; see Roadmap.

## Configuration

`mcp-guard init` generates a config file with sensible defaults. The full annotated template is at templates/mcp-guard.toml.```toml
# mcp-guard.toml

[server]
listen = "0.0.0.0:3000"

[upstream]
transport = "stdio"
command = "npx"
args = ["-y", "@modelcontextprotocol/server-filesystem", "./"]

[rate_limit]
requests_per_second = 10
burst_size = 20

[[auth.api_keys]]
key_hash = "sha256:..."
user_id = "developer-1"
allowed_tools = ["read_file", "list_directory"]

# Used by `mcp-guard serve` (local mode)
[policy]
mode = "enforce"           # or "observe" to record without blocking
allowed_tools = ["*"]
denied_tools = ["delete_*", "execute_*"]
pin_tools = true
on_pin_mismatch = "deny"   # or "warn"

[[policy.rules]]
name = "writes stay in the workspace"
tools = ["write_file", "edit_file"]
action = "deny"
[policy.rules.when]
path = { not_starts_with = "/home/me/project/" }

JWT configuration```toml
[auth.jwt]
mode = "simple"
secret = "your-secret-key"
issuer = "https://your-issuer.com"
audience = "mcp-guard"

[auth.jwt.scope_mapping]
"read" = ["read_file", "list_directory"]
"write" = ["write_file", "create_directory"]
"admin" = ["*"]


OAuth 2.1 configuration```toml
[auth.oauth]
provider = "github"  # or "google", "okta", "custom"
client_id = "your-client-id"
client_secret = "your-client-secret"

[auth.oauth.scope_mapping]
"repo" = ["read_file", "write_file"]
"admin:org" = ["*"]

Multi-server routing (Enterprise)```toml
[[upstream.servers]]
name = "filesystem"
path_prefix = "/fs"
transport = "stdio"
command = "npx"
args = ["-y", "@modelcontextprotocol/server-filesystem", "./"]

[[upstream.servers]]
name = "database"
path_prefix = "/db"
transport = "http"
url = "http://localhost:8080"


## Protocol support

mcp-guard speaks MCP revisions 2024-11-05 through 2025-11-25 and passes the upstream's negotiated version through unchanged. It is transparent for resources, prompts, logging and progress notifications. Server-initiated requests (sampling, elicitation, roots) are not yet relayed in local mode and are answered with a method-not-found error so the upstream does not hang. Support for the 2026-07-28 stateless revision is on the roadmap.

## Performance

Targets, checked with the Criterion suite in `crates/mcp-guard-core/benches` (`cargo bench`):

| Metric | Target |
|--------|--------|
| Latency overhead | <2ms p99 |
| Binary size | <15MB |
| Memory usage | <50MB RSS |
| Throughput | >5,000 RPS |

## CLI Reference```
mcp-guard <command>

Local mode
  doctor           Scan MCP client configs and report unprotected servers
  wrap             Put mcp-guard in front of a client's stdio servers
  unwrap           Restore servers wrapped with `wrap`
  pin              Pin, review or accept the upstream's tool definitions
  policy test      Evaluate the policy against one tool call
  policy suggest   Propose a least-privilege policy from the audit log
  replay           Show a recorded session as a timeline, or write an HTML report
  verify           Check a recording's hash chain
  holds            List calls waiting for approval
  approve / deny   Decide a held call
  serve            Run as a stdio proxy (what wrapped clients launch)

Gateway mode
  init             Generate config file with demo API key
  validate         Check config file for errors
  keygen           Generate a new API key
  hash-key         Hash an existing API key for the config
  run              Start the HTTP gateway
  check-upstream   Test upstream server connectivity

  version          Show version and build info

Options:
  -c, --config     Config file path (default: mcp-guard.toml)
  -v, --verbose    Verbose logging (stderr)
  -h, --help       Show help

Roadmap

The direction: stop competing on authentication, which the MCP spec and every API gateway now cover, and own the layer above it, what an agent may do and proof of what it did. In rough order:

  1. Result inspection. Rules on what comes back from a server (secret and PII redaction, size limits), extending today's argument rules.
  2. Recorder in gateway mode. Per-identity recording for mcp-guard run.
  3. Protocol shim. Full support for the 2026-07-28 stateless revision, relaying server-initiated requests, and exposing old stdio servers as compliant remote servers.
  4. Prebuilt binaries and a Homebrew tap.
  5. Re-tiering. Make the open core complete (all auth, all transports) and charge for policy packs, the recorder, fleet management and support.

The full list, including release tasks, known gaps and decisions still open, is in FUTURE.md. Issues and pull requests on any of these are welcome.

Documentation

Topic Guide
Local mode wrap, doctor, pin, serve
Flight recorder replay, verify, record format
Getting Started Quick Start
Authentication Auth Guide
Transports Stdio/HTTP/SSE
Configuration Reference
Rate Limiting Rate Limits
Observability Metrics & Tracing
Security Model Threats and controls
Deployment Production Guide
API Reference HTTP API
CLI Command reference

Repository layout```

crates/
mcp-guard-core/ Library: config, auth, authz, policy, pinning, transports, server
mcp-guard-cli/ The mcp-guard binary
mcp-guard-pro/ Pro license verification (optional feature)
mcp-guard-enterprise/ Enterprise license verification and admin tools (optional feature)
docs/ User and developer documentation
examples/ Config examples (API key, JWT with Auth0, GitHub OAuth, multi-server, Kubernetes)
templates/ Annotated config template
landing/, workers/ Website and Cloudflare Workers for licensing (not needed to use mcp-guard)


## Security

Security vulnerabilities should be reported via support@botzr.com.

See SECURITY.md for our security policy.

## Contributing

We welcome contributions. See CONTRIBUTING.md for guidelines.```bash
git clone https://github.com/botzrDev/mcp-guard
cd mcp-guard
cargo build
cargo test --workspace
cargo clippy --workspace --all-targets -- -D warnings

License

AGPL-3.0. See LICENSE.

Commercial licenses available for Pro and Enterprise tiers.


Built by botzr

常见问题

6 问
答案由本站依据条目字段整理,不引用上游原文
MCP Guard 7d4661ae 怎么安装?

资料没有给出安装命令,请到官方仓库或文档按说明接入;这类条目多数是生态应用,或尚未发布可安装包。

MCP Guard 7d4661ae 怎么在 Claude 里配置?

它的传输方式未标注,在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,配置才会生效。

MCP Guard 7d4661ae 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

MCP Guard 7d4661ae 需要 API Key 吗?

资料标注需要OAuth 授权认证,使用前准备好对应凭据,并按最小权限配置。

MCP Guard 7d4661ae 支持哪些客户端?

资料标注支持 Claude;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

MCP Guard 7d4661ae 能提供哪些能力?

资料显示能力标签包括 身份验证、Rust、Claude、审计日志。具体工具清单以官方文档为准。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-05-17。