Borrowing it
Nothing to install: this file belongs to jeweis/mcpcat. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/jeweis/mcpcat/main/AGENTS.mdgit clone --depth 1 https://github.com/jeweis/mcpcatWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/jeweis/mcpcat/agents-md)<a href="https://agentmods.dev/instructions/jeweis/mcpcat/agents-md"><img src="https://agentmods.dev/badge/instructions/jeweis/mcpcat/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/jeweis/mcpcat/agents-md"><img src="https://agentmods.dev/badge/instructions/jeweis/mcpcat/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.02008 | $0.02008 |
| Opus 5.5 | $0.00803 | $0.00803 |
| Sonnet 5.5 | $0.00402 | $0.00402 |
| Haiku 4.5 | $0.00201 | $0.00201 |
Grade A, and why
mcpcat AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 176 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
本文件为 AI 在此代码仓库中工作时提供指导。
请始终使用中文输出。
构建和运行命令
# 安装依赖
pip install -r requirements.txt
# 运行开发服务器
python main.py
# 或启用热重载
uvicorn main:app --host 0.0.0.0 --port 8000 --reload
# 运行测试
pytest
# 代码格式化
black .
isort .
# 代码检查
flake8
# Docker
docker build -t mcpcat:dev .
docker-compose up -d
架构概述
mcpcat 是一个 MCP(Model Context Protocol)聚合平台,通过统一的 FastAPI 接口管理多个 MCP 服务器。
核心流程(main.py)
- 模块加载时:创建全局
MCPServerManager实例 - 配置加载:调用
load_config()→ConfigService.load_mcp_servers_config() - 安全初始化:
security_service.ensure_default_keys()首次启动时自动创建默认 API Key - 服务器加载:
server_manager.load_servers_from_config()遍历配置,通过MCPServerFactory创建 FastMCP 实例 - 应用创建:创建 FastAPI 应用,添加
AuthMiddleware,挂载所有服务器 - 生命周期管理:
lifespan_manager调用server_manager.create_unified_lifespan()统一管理所有 MCP 生命周期
核心组件
MCPServerManager (app/services/server_manager.py)
- MCP 服务器生命周期的中央调度器
add_mcp_server(): 创建 FastMCP 实例、生成 mcp_app/sse_app、创建MCPProxyApp代理mount_all_servers(): 将代理应用挂载到 FastAPIcreate_unified_lifespan(): 使用AsyncExitStack管理所有 MCP 生命周期- 维护
server_info字典:存储 config、mcp、mcp_app、sse_app、status
MCPProxyApp (app/services/server_manager.py)
- ASGI 代理应用,包装实际的 MCP 应用
- 根据
transport_type('mcp' 或 'sse')转发请求到对应的应用实例 - 实现运行时实例切换,无需重启应用
MCPServerFactory (app/services/mcp_factory.py)
- 根据
type字段创建 FastMCP 实例:stdio:FastMCP.as_proxy()配置 command/args/envsse:FastMCP.as_proxy()配置 url/transport="sse"/headersstreamable-http:FastMCP.as_proxy()配置 url/transport="streamable-http"/headersopenapi:FastMCP.from_openapi()配置 spec_url/api_base_url/route_configs
ConfigService (app/services/config_service.py)
- 配置文件路径:
settings.mcpcat_config_path(默认.mcpcat/config.json) load_raw_config(): 返回完整配置(包含 mcpServers、security、app)load_mcp_servers_config(): 只返回 mcpServers 部分add_server_to_config()/update_server_config()/remove_server_from_config(): 配置 CRUD
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 176 lines · 2,008 tokens per session scan A 2f53d1ea120e
mcpcat AGENTS.md is an instructions file published in the GitHub repository jeweis/mcpcat (11 stars, last pushed 3d ago), licensed MIT. It adds 2,008 tokens to every session, about $0.0080 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other instructions, from other repositories
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode copilot-instructions.md
Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).
deno copilot-instructions.md
Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.