MCP审计工具 是 AI Skill Hub 本期精选MCP工具之一。综合评分 8.0 分,整体质量较高。我们强烈推荐将其纳入你的 AI 工具库,帮助提升工作效率。
透明的Go代理,拦截、签名和审计MCP工具调用
MCP审计工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
透明的Go代理,拦截、签名和审计MCP工具调用
MCP审计工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/P4ST4S/mcp-audit
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"mcp----": {
"command": "npx",
"args": ["-y", "mcp-audit"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 MCP审计工具 执行以下任务... Claude: [自动调用 MCP审计工具 MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"mcp____": {
"command": "npx",
"args": ["-y", "mcp-audit"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
A drop-in security and observability proxy for MCP servers. mcp-audit sits between an MCP client and any upstream MCP server to produce signed audit trails, redact sensitive payloads, enforce allow/deny policies and per-tool rate limits, and expose a local read-only dashboard.
Download a prebuilt binary from GitHub Releases. Prebuilt archives are published for Linux (amd64, arm64), macOS (amd64, arm64), and Windows (amd64). Pick the archive that matches your OS and CPU architecture.
Prerequisites - No runtime dependency formcp-audititself (statically linked,CGO_ENABLED=0). - The stdio examples below launch an upstream MCP server vianpx, which requires Node.js 18+ onPATH. This is only needed for the example upstream, not formcp-audit. - Windows binaries are published foramd64only. There is nowindows_arm64build; on Windows on ARM, run theamd64binary under emulation or build from source withgo build ./cmd/mcp-audit.
Run in stdio mode:
AUDIT_SECRET="$(openssl rand -hex 32)" \
mcp-audit --transport stdio --upstream "npx @modelcontextprotocol/server-filesystem /tmp"
On Windows PowerShell, generate the secret and set it as an environment variable:
$env:AUDIT_SECRET = -join ((1..32) | ForEach-Object { '{0:x2}' -f (Get-Random -Max 256) })
.\mcp-audit.exe --transport stdio --upstream "npx @modelcontextprotocol/server-filesystem C:\Temp"
Run in HTTP mode:
mcp-audit --transport http --upstream http://localhost:8080 --port 4422
Run with Docker Compose:
docker compose up --build
The dashboard is available at http://localhost:9090 by default. Prometheus metrics are available at http://localhost:9091/metrics by default.

mcp-audit loads config.yaml from the current directory by default. CLI flags override config values, and AUDIT_SECRET overrides audit.secret.
| Key | Default | Description |
|---|---|---|
proxy.transport | stdio | Proxy transport: stdio or http. |
proxy.upstream | required | Stdio command or HTTP upstream URL. |
proxy.port | 4422 | HTTP listen port. |
proxy.upstream_timeout_ms | 30000 | HTTP upstream request timeout in milliseconds. |
proxy.tls.ca_file | empty | Optional CA bundle used to verify an HTTPS upstream MCP server. |
proxy.tls.server_name | empty | Optional TLS server name override for the upstream MCP server. |
proxy.tls.insecure_skip_verify | false | Skip upstream TLS certificate verification. Intended only for local testing. |
proxy.tls.client_cert_file | empty | Optional client certificate for upstream mTLS. Must be configured with proxy.tls.client_key_file. |
proxy.tls.client_key_file | empty | Optional client key for upstream mTLS. Must be configured with proxy.tls.client_cert_file. |
proxy.retry.max_retries | 0 | Maximum conservative retry attempts for safe HTTP upstream requests. Off by default. |
proxy.retry.initial_interval_ms | 200 | Initial upstream retry backoff. |
proxy.retry.max_interval_ms | 2000 | Maximum upstream retry backoff. |
proxy.client_id | claude-desktop | Client identifier written to audit entries. |
proxy.server_id | filesystem | Server identifier written to audit entries. |
audit.storage | jsonl | Storage backend: jsonl or sqlite. |
audit.path | ./audit.jsonl | JSONL audit log path. |
audit.sqlite_path | ./audit.db | SQLite database path. |
audit.sign | true | Enable HMAC-SHA256 signatures when a secret is set. |
audit.secret | empty | HMAC secret. Prefer AUDIT_SECRET. |
audit.async.enabled | false | Enable asynchronous batched audit writes through a bounded ring buffer. |
audit.async.queue_size | 4096 | Maximum queued audit entries before backpressure blocks writers. |
audit.async.batch_size | 128 | Maximum entries written per storage batch. |
audit.async.flush_interval_ms | 1000 | Maximum time before a partial batch is flushed. |
middleware.rate_limit.enabled | true | Enable per-client, per-tool token buckets. |
middleware.rate_limit.requests_per_minute | 60 | Allowed requests per minute per (client_id, tool_name). |
middleware.redact.enabled | true | Enable JSON key-based PII redaction. |
middleware.redact.patterns | sensitive keys | Case-insensitive key fragments to redact. |
policy.enabled | false | Enable synchronous allow/deny policy checks for tools/call. |
policy.default_action | allow | Fallback action when no policy rule matches: allow or deny. |
policy.rules | empty | Ordered first-match allow/deny rules for tool calls. |
dashboard.enabled | true | Serve the dashboard. |
dashboard.port | 9090 | Dashboard listen port. |
metrics.enabled | true | Serve Prometheus metrics on a separate HTTP endpoint. |
metrics.port | 9091 | Metrics listen port. |
metrics.path | /metrics | Metrics HTTP path. |
metrics.include_go_metrics | true | Include Go runtime metrics. |
metrics.include_process_metrics | true | Include process metrics. |
metrics.tool_labels | true | Include tool_name and client_id labels for tool-level metrics. Disable to minimize label cardinality. |
otel.enabled | false | Export tools/call audit entries as OTLP/HTTP JSON spans. |
otel.endpoint | http://localhost:4318 | OTLP HTTP endpoint base URL. /v1/traces is appended automatically. |
otel.service_name | mcp-audit | OpenTelemetry service.name resource attribute. |
otel.headers | empty | Additional OTLP HTTP headers, for example Authorization or API key headers. |
otel.tls.ca_file | empty | Optional CA bundle used to verify the OTLP endpoint. |
otel.tls.server_name | empty | Optional TLS server name override. |
otel.tls.insecure_skip_verify | false | Skip OTLP TLS certificate verification. Intended only for local testing. |
otel.retry.max_retries | 3 | Maximum OTLP retry attempts after a failed export request. |
otel.retry.initial_interval_ms | 200 | Initial OTLP retry backoff. |
otel.retry.max_interval_ms | 2000 | Maximum OTLP retry backoff. |
otel.queue_size | 1024 | Maximum queued audit entries before trace exports are dropped. |
otel.batch_size | 64 | Maximum spans per OTLP export request. |
otel.flush_interval_ms | 1000 | Maximum time before a partial OTLP batch is exported. |
otel.timeout_ms | 5000 | OTLP HTTP request timeout. |
CLI flags:
--transport stdio | http
--upstream upstream server command or URL
--port proxy port for http mode
--upstream-timeout upstream HTTP request timeout in milliseconds
--config path to config.yaml
--storage jsonl | sqlite
--no-dashboard disable the web dashboard
--no-metrics disable Prometheus metrics
--version print version and exit
--log-level debug | info | warn | error
高质量的MCP审计工具,值得使用
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ Apache 2.0 — 宽松开源协议,可商用,需保留版权声明和 NOTICE 文件,含专利授权条款。
经综合评估,MCP审计工具 在MCP工具赛道中表现稳健,质量优秀。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | mcp-audit |
| Topics | ai-agentsanthropicaudit-loggolangmcp |
| GitHub | https://github.com/P4ST4S/mcp-audit |
| License | Apache-2.0 |
| 语言 | Go |
收录时间:2026-05-31 · 更新时间:2026-05-31 · License:Apache-2.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端