MCP Guard C8626c74

MCP安全风控

提供方 Thezenmonster

安全风控 未标注 无需鉴权 社区 / 第三方

用于MCP服务器的安全中间件,提供基于信任的访问控制、速率限制和审计日志功能。

一句话选型结论

按资料字段整理

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

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

工具与能力

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

能力标签

适用场景

安全中间件TypeScript本地部署访问控制速率限制审计日志Node.js

安装与配置

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

    确认你的客户端支持远程端点,并拿到服务地址。

  2. 2
    安装服务

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

  3. 3
    写入客户端配置

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

  4. 4
    验证是否可用

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

典型使用场景

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

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

日志与审计

汇总日志、查异常行为。

合规检查

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

选择建议

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

值得选的地方

  • 资料标注无需鉴权,装好就能连。

先想清楚的地方

  • 远程端点依赖网络与服务方可用性,注意密钥与调用额度。
  • 没有现成安装命令,需要按官方文档自己填启动命令和参数。
  • 资料没标注工具数量,实际能力要装好后确认。
  • 版本更新与行为细节以官方仓库为准。

更适合

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

不太适合

  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
MCP Guard C8626c74当前 未标注 未标注 支持远程部署 无 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

服务器档案

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

详细介绍

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

mcp-guard

KYA (Know Your Agent) security middleware for MCP servers. Abuse database, trust-based access control, rate limiting, and audit logging.

Zero dependencies. Works with any Node.js HTTP framework. Part of the KYA verification system.

> Scan any MCP package for security issues: agentscores.xyz - type a package name, get instant results.


The Problem

MCP servers have no security layer. Any client can call any tool — there's no identity verification, no access control, no rate limiting, no audit trail. As AI agents begin calling MCP tools autonomously, this is a critical gap.

mcp-guard adds KYA verification to any MCP HTTP server — abuse database checks, trust-based access control, and audit logging in three lines of code.

Install```bash

npm install mcp-trust-guard


## Quick Start```typescript
import express from 'express';
import { McpGuard } from 'mcp-trust-guard';

const guard = new McpGuard({
  rules: [
    { minTrust: 0,  tools: ['get_*', 'list_*', 'search_*'] },
    { minTrust: 30, tools: ['create_*', 'update_*'] },
    { minTrust: 60, tools: ['delete_*', 'admin_*'] },
  ],
  rateLimit: { window: 60, max: 30 },
  audit: true,
});

const app = express();
app.use(express.json());
app.use('/mcp', guard.middleware());
// ... your MCP server handler

Every tools/call request is now verified against the caller's trust score. Read-only tools are open. Write tools need a score of 30+. Destructive tools need 60+.

How It Works```

                                ┌──────────────┐

Request ──→ Extract Identity ──→ Rate Limit ──→ │ Trust Check │ ──→ Rule Match ──→ Allow/Deny
(header) (per caller) │ (AgentScore) │ (tool pattern)
└──────────────┘


1. **Identity** — Reads the caller's agent name from the `x-agent-name` header (configurable)
2. **Rate Limit** — Sliding window per caller. Rejects with JSON-RPC error if exceeded
3. **Trust Check** — Looks up the caller's trust score via AgentScore (5-min cache, fail-closed)
4. **Rule Match** — Matches the requested tool against your rules using glob patterns. First match wins
5. **Allow/Deny** — If the caller's score meets the rule's minimum, the request passes through. Otherwise, a JSON-RPC error is returned

## Features

### Trust-Based Access Control

Define tiered access based on trust scores:```typescript
const guard = new McpGuard({
  rules: [
    { minTrust: 0,  tools: ['read_*'] },      // Public — anyone can read
    { minTrust: 20, tools: ['query_*'] },      // Low bar — basic queries
    { minTrust: 40, tools: ['write_*'] },      // Verified agents only
    { minTrust: 70, tools: ['transfer_*'] },   // High trust — financial ops
  ],
  defaultMinTrust: 10, // Tools not matching any rule require score >= 10
});

Tool Name Patterns

Rules use glob patterns with * wildcards:```typescript
{ minTrust: 30, tools: ['create_', 'update_'] } // Matches create_user, update_record
{ minTrust: 60, tools: ['admin_'] } // Matches admin_delete, admin_config
{ minTrust: 0, tools: ['get_status'] } // Exact match only
{ minTrust: 50, tools: ['
'] } // Catch-all


### Rate Limiting

In-memory sliding window per caller:```typescript
const guard = new McpGuard({
  rateLimit: {
    window: 60,  // 60-second window
    max: 30,     // 30 requests per window per caller
  },
});

Audit Logging

Console logging:```typescript
const guard = new McpGuard({ audit: true });
// [mcp-guard] ALLOW EmberFoundry → get_status (score: 42, band: MODERATE TRUST) score 42 >= 0 required for get_status
// [mcp-guard] DENY untrusted-bot → admin_delete (score: 3, band: UNVERIFIED) score 3 < 60 required for admin_delete


Custom audit handler:```typescript
const guard = new McpGuard({
  audit: (entry) =&gt; {
    db.insert(&#x27;audit_log&#x27;, entry);
    if (!entry.allowed) alerting.notify(`Blocked ${entry.caller} from ${entry.tool}`);
  },
});

Direct Trust Checks

Use the guard programmatically without middleware:```typescript
const guard = new McpGuard();

const decision = await guard.check('EmberFoundry', 'transfer_funds');
// { allowed: false, reason: 'score 14 < 70 required for transfer_funds', caller: 'EmberFoundry', trustScore: 14, trustBand: 'UNVERIFIED' }


### Custom Trust Providers

Use any trust source — not just AgentScore:```typescript
import { McpGuard, TrustProvider, TrustResult } from &#x27;mcp-trust-guard&#x27;;

const myProvider: TrustProvider = {
  async check(name: string): Promise&lt;TrustResult&gt; {
    const score = await myDatabase.getAgentScore(name);
    return { score, band: score &gt; 50 ? &#x27;TRUSTED&#x27; : &#x27;UNTRUSTED&#x27;, name };
  },
};

const guard = new McpGuard({ provider: myProvider });

Wrapping Any Handler

Not using Express? Wrap any request handler:```typescript
const protectedHandler = guard.wrap(mcpHandler);
http.createServer(protectedHandler).listen(3000);


## Configuration

Option · Type · Default · Description
`provider` · `TrustProvider` · AgentScore · Custom trust score provider
`apiUrl` · `string` · `https://agentscores.xyz/api/score` · AgentScore API endpoint
`identityHeader` · `string` · `x-agent-name` · Header containing caller identity
`rules` · `GuardRule[]` · `[]` · Access rules (first match wins)
`defaultMinTrust` · `number` · `0` · Min trust when no rule matches
`rateLimit` · `{ window, max }` · none · Rate limit config (seconds, count)
`cacheTtl` · `number` · `300000` · Trust cache TTL in ms (5 min)
`audit` · `boolean \ · function` · `false` · Enable audit logging
`allowAnonymous` · `boolean` · `false` · Allow requests without identity

## Identifying Callers

By default, `mcp-guard` reads the caller&#x27;s identity from the `x-agent-name` HTTP header. MCP clients should include this header when making requests:```bash
curl -X POST http://localhost:3000/mcp \
  -H &quot;Content-Type: application/json&quot; \
  -H &quot;x-agent-name: MyAgent&quot; \
  -d &#x27;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:1,&quot;method&quot;:&quot;tools/call&quot;,&quot;params&quot;:{&quot;name&quot;:&quot;get_data&quot;}}&#x27;

You can change the header name:```typescript
const guard = new McpGuard({ identityHeader: 'authorization' });


Or use query parameters as a fallback — `?agent=MyAgent` is checked automatically.

## FAQ

**What if the trust API is unreachable?**
The agent gets a score of 0. Fail-closed by default. If your rules allow `minTrust: 0` for some tools, those still work.

**Does it work with stdio MCP servers?**
No — stdio servers run locally and don&#x27;t need network-level security. `mcp-guard` is for HTTP/SSE MCP servers that accept remote connections.

**Does it modify the MCP request?**
No. It only inspects `tools/call` requests. All other MCP methods (`tools/list`, `resources/read`, etc.) pass through untouched. When a request is allowed, it continues to your handler unchanged.

**Can I use my own scoring system?**
Yes. Implement the `TrustProvider` interface (one method: `check(name) → { score, band, name }`) and pass it in the config.

## KYA Abuse Database (v0.2.0+)

Block agents that have been reported for abuse — data exfiltration, prompt injection, unauthorized access, and more. Community-driven, free, no API key.```typescript
const guard = new McpGuard({
  abuseCheck: true,                // Enable abuse database checks
  abuseBlockLevel: &#x27;CAUTION&#x27;,      // Block at MONITOR, CAUTION, or BLOCK level
  rules: [
    { minTrust: 0, tools: [&#x27;get_*&#x27;] },
    { minTrust: 30, tools: [&#x27;write_*&#x27;] },
  ],
  audit: true,
});

When an agent with abuse reports tries to call a tool:[mcp-guard] DENY bad-agent → write_file (score: -1, band: ABUSE_REPORTED) agent reported in KYA abuse database: prompt_injection (1 reports, severity: high)

Report abuse: POST https://agentscores.xyz/api/abuse/report
Check an agent: GET https://agentscores.xyz/api/abuse/check?agent=name

For standalone abuse checking without the full middleware, use kya-abuse-check.

Part of KYA (Know Your Agent)

mcp-trust-guard is the server-side component of KYA — real-time AI agent verification. Six checks: Deployer, Model, Code, Abuse, Permissions, Deployment. No platform registration required.

License

MIT

常见问题

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

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

MCP Guard C8626c74 怎么在客户端里配置?

它的传输方式未标注,在客户端 MCP 配置里按官方文档填写启动命令和参数,保存后重启客户端生效。

MCP Guard C8626c74 收费吗?

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

MCP Guard C8626c74 需要 API Key 吗?

资料标注为无需认证,装好就能连;如果实际调用时报鉴权错误,按官方文档补上凭据。

MCP Guard C8626c74 能提供哪些能力?

资料显示能力标签包括 访问控制、JavaScript、审计日志。具体工具清单以官方文档为准。

MCP Guard C8626c74 需要什么运行环境?

属于远程端点,不需要在本地装运行时。

MCP Guard C8626c74 是本地还是远程?

它是远程端点,连服务地址即可。

热门专题

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

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