Skip to main content
Glama
Ailian0206

mcp-guardian

by Ailian0206

MCP Guardian

装进 Cursor / Codex 的本地 MCP 策略中间层:在 Agent 调用工具前 allow / deny / redact;高危在 同一次 Agent 对话 里批准。

仓库:https://github.com/Ailian0206/mcp-guardian
在线说明书:https://ailian0206.github.io/mcp-guardian/(GitHub Pages 静态站:介绍 / FAQ / Demo;不含 Dashboard API)
作品集:Evidence Graph → Work → MCP Guardian
决策文档:docs/product-redesign-2026-07-16.md

主路径(请按这个理解)

  1. bash scripts/install.sh → 重启 IDE

  2. Agent 正常用工具;多数策略自动生效

  3. 高危 → 返回 approval_required → Agent 问你 → 你确认 → Agent 调 guardian_decide

  4. 不需要打开网页审批,也不需要另开终端跑 approvals

Web 站点只做介绍 / FAQ / 可选策略试跑。

Related MCP server: mcp-governance-proxy

一键安装

git clone https://github.com/Ailian0206/mcp-guardian.git
cd mcp-guardian
bash scripts/install.sh

写入 Cursor ~/.cursor/mcp.json、Codex ~/.codex/config.toml~/.mcp-guardian/
仅一边:bash scripts/install.sh --cursor--codex

真实下游(官方 Filesystem MCP)

默认安装是演示下游。接真实磁盘目录:

pnpm build
node packages/gateway/dist/cli.js install --cursor --profile filesystem --workspace /ABS/PATH/TO/DIR
# Reload MCP 后:读放行;写/改/移 → 会话内 confirm_code + guardian_decide

切回演示:--profile demos。示例配置:examples/real-filesystem.config.yaml

Agent 会话内审批

当策略为 require_approval 时,工具结果包含:

  • approval_id

  • agent_instructions:先问用户,再调用 guardian_decide

同 MCP 还暴露:

  • guardian_pending — 查看待批

  • guardian_decide{ id, decision: "allow" | "deny", confirm_code? };allow 须带码

Web(说明书 / 作品集门面)

在线:https://ailian0206.github.io/mcp-guardian/

pnpm dev:web   # http://127.0.0.1:3040  → /  /faq  /demo
pnpm build:pages  # 静态导出 → apps/web/out(供 GitHub Pages)
  • /:价值、安装步骤、日常流程、真实下游、与 Trace 差异、FAQ 摘要、演示录屏

  • /faq:入门 / 日常 / 真实下游 / 排错

  • /demo:浏览器内现场试跑策略 + 只读审计回放(不是审批台)

  • /app:可选 Dashboard(仅本地 / 非 Pages;需服务端 API)

开发验收

pnpm install && pnpm build
pnpm lint && pnpm typecheck && pnpm test
bash scenarios/a1-a8.sh
bash scenarios/ide-smoke.sh
bash scenarios/real-filesystem.sh

License

MIT

A
license - permissive license
-
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    -
    quality
    C
    maintenance
    A security gateway that enforces policies, tracks data taints, and sandboxes tool calls between AI agents and MCP servers. It provides a secure chokepoint to prevent prompt injection and ensure OWASP ASI compliance through audit logging and deterministic execution.
    Last updated
    1
    Apache 2.0
  • A
    license
    -
    quality
    C
    maintenance
    An MCP server that acts as a governance proxy for AI agents, evaluating each tool call against policies before execution, enabling secure and controlled access to systems like Slack, GitHub, and AWS without exposing credentials to the agent.
    Last updated
    Apache 2.0
  • A
    license
    -
    quality
    A
    maintenance
    A zero-trust security gateway for MCP tool calls, inspecting tool identity, arguments, execution decisions, and returned content before risk reaches your coding agent.
    Last updated
    Apache 2.0
  • A
    license
    B
    quality
    A
    maintenance
    A governance proxy for AI tools — every MCP/agent tool call is policy-gated, secret-redacted, and written to a hash-chained, offline-verifiable audit trail.
    Last updated
    13
    MIT

View all related MCP servers

Related MCP Connectors

  • Security firewall for AI agents — scans MCP calls for injection, secrets, and risks.

  • Runtime permission, approval, and audit layer for AI agent tool execution.

  • See, price, and control every tool call your AI agents make: policy checks, cost, and audit tools.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Ailian0206/mcp-guardian'

If you have feedback or need assistance with the MCP directory API, please join our Discord server