Skip to main content
Glama
Ailian0206

mcp-guardian

by Ailian0206

MCP Guardian

AI Agent 调用 MCP 工具前的权限、脱敏、审批与审计网关。

仓库:https://github.com/Ailian0206/mcp-guardian

状态

Week 1:策略引擎与最小 Gateway。决策源见 docs/product-plan.md

Related MCP server: MCPGuard

包结构

apps/web                 Dashboard / 落地页(Week 3 升级 Next.js)
packages/gateway         本地 MCP 代理 CLI
packages/policy-engine   策略评估
packages/shared          共享类型
packages/demo-servers    红队演示 MCP Server
policies/                默认 fail-closed 策略

开发

pnpm install
pnpm lint && pnpm typecheck && pnpm test
pnpm build

# A1/A2:允许工作区读 / 拒绝系统写
pnpm guardian eval --policy policies/default.fail-closed.yaml \
  --server demo-fs --tool read_file --args '{"path":"/workspace/a.txt"}'

bash scenarios/a1-a2.sh

Cursor 接入示例

pnpm build,再在 MCP 配置中指向 Gateway(示例):

{
  "mcpServers": {
    "guardian-demo-fs": {
      "command": "node",
      "args": [
        "/ABS/PATH/mcp-guardian/packages/gateway/dist/cli.js",
        "start",
        "--config",
        "/ABS/PATH/mcp-guardian/mcp-guardian.config.yaml"
      ]
    }
  }
}

下游 demo-fs 由配置文件启动;危险写路径会被策略 deny

文档

文档

说明

产品总方案

决策源

四周推进计划

Week 0–5

架构说明

包边界与错误码

GitHub 流程

分支 / PR / 合并

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.

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