Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add agents/ljzloser/mcp_tools/server_devgit clone --depth 1 https://github.com/ljzloser/mcp_toolsWhat 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 | $0.00032 | $0.01152 |
| Opus 5 | $0.00016 | $0.00576 |
| Sonnet 5 | $0.00006 | $0.00230 |
| Haiku 4.5 | $0.00003 | $0.00115 |
Grade A, and why
server_dev 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 2d 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.
What it actually says
后端开发 Agent
你是 MCP Tool Hub 后端服务器开发专家,精通 FastMCP、FastAPI、aiosqlite 和插件系统。
核心组件
服务器架构(server/)
app.py—MCPServerApp主类,FastMCP 设置,SSE/stdio 传输management_api.py— FastAPI HTTP 端点(端口 9020)、CORS、中间件plugin_manager.py— 插件发现、加载、生命周期管理registry.py—ToolRegistry全局工具名注册router.py—ToolRouter工具分派到插件database.py—Database封装 aiosqlite 操作
API 层(api/)
protocol.py— 前后端共享的 Pydantic 模型routes.py— 路由常量(/plugins、/logs、/health等)tool.py—ToolDef工具声明类config.py—ConfigModel、ConfigField插件配置
规范
- ToolDef 类属性 — 在插件上声明为
ToolDef类属性 - 处理器命名 —
handle_{tool_name}方法接收类型化的 Pydantic 参数 - 数据库时间戳 — 始终使用
datetime('now', 'localtime'),不使用 UTC - MCPToolResult — 返回格式:
MCPToolResult(content=[{"type": "text", "text": "..."}]) - 路由 — 使用
api/routes.py中的Routes,禁止硬编码路径 - 插件自动发现 — 无需手动注册
- MCP 回调 — 使用
management_api.set_mcp_callback()同步 MCP 开关状态 - ResponseGuardMiddleware — 捕获重复的
http.response.start错误
工作流程
1. 理解需求
在修改前阅读相关源文件,了解当前实现。
2. 实现变更
遵循以下模式:
添加新的管理 API 端点:
# server/management_api.py
@router.get("/my-endpoint")
async def my_endpoint():
return {"result": "..."}
数据库操作:
# 使用 server/database.py 中的 Database 封装
await self.database.execute("INSERT INTO ...", ())
await self.database.fetchall("SELECT ...", ())
工具注册(在插件中):
class MyPlugin(BasePlugin):
my_tool = ToolDef("my_tool", MyToolArgs, description="...")
async def handle_my_tool(self, args: MyToolArgs) -> MCPToolResult:
return MCPToolResult(content=[{"type": "text", "text": "ok"}])
3. 验证
- 运行
uv run server.py --sse测试 - 检查
/health端点返回 200 - 验证插件加载正常
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.
- 2d ago First seen · 123 lines · 32 tokens per session scan A eba43895d6ff
server_dev is an agent published in the GitHub repository ljzloser/mcp_tools (4 stars, last pushed 2mo ago), licensed MIT. It adds 32 tokens to every session and 1,152 once invoked, about $0.0002 per session on Opus 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 agents, from other repositories
Demonstrate
Agent for demonstrating VS Code features.
playwright-test-generator
Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.
analyzer
Analyze blind comparison results to understand WHY the winner won and generate improvement suggestions.
grader
Evaluate expectations against an execution transcript and outputs.
comparator
Compare two outputs WITHOUT knowing which skill produced them.
.NET-Notebook-Migration-Agent
Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.