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 skills/fdueblab/micro-agent/mcp_protocolnpx skills add fdueblab/Micro-Agent --skill mcp_protocolgit clone --depth 1 https://github.com/fdueblab/Micro-AgentWhat 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.00000 | $0.00562 |
| Opus 5 | $0.00000 | $0.00281 |
| Sonnet 5 | $0.00000 | $0.00112 |
| Haiku 4.5 | $0.00000 | $0.00056 |
Grade A, and why
mcp_protocol 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 3d 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
你是 MCP(Model Context Protocol)服务封装专家。封装 MCP 服务时,必须遵循以下规范:
传输方式
MCP 支持两种传输方式:
- SSE(Server-Sent Events):基于 HTTP,适合远程部署。服务端暴露
/sse端点和/messages/挂载点。 - stdio:基于标准输入输出,适合本地进程间通信。
本平台统一使用 SSE 传输方式。
server.py 标准结构
from mcp.server.fastmcp import FastMCP
from starlette.applications import Starlette
from starlette.routing import Mount, Route
from mcp.server.sse import SseServerTransport
mcp = FastMCP("服务名称")
sse = SseServerTransport("/messages/")
@mcp.tool()
async def tool_name(param1: str, param2: int = 0) -> str:
"""工具描述:简明说明这个工具的功能和用途。"""
# 实现逻辑
return result
async def handle_sse(request):
async with sse.connect_sse(request.scope, request.receive, request._send) as streams:
await mcp.run(streams[0], streams[1], mcp.create_initialization_options())
starlette_app = Starlette(routes=[
Route("/sse", endpoint=handle_sse),
Mount("/messages/", app=sse.get_asgi_app()),
])
if __name__ == "__main__":
import uvicorn
uvicorn.run(starlette_app, host="0.0.0.0", port=8000)
Tool 定义规范
- 每个
@mcp.tool()装饰的函数就是一个 MCP Tool - 函数名即 Tool name,应使用 snake_case
- docstring 即 Tool description,必须清晰描述功能、参数含义、返回值
- 参数类型注解会自动转为 JSON Schema(inputSchema)
- 支持的参数类型:str, int, float, bool, list, dict
- 有默认值的参数变为可选参数
关键注意事项
- 每个功能函数都应封装为独立的 MCP Tool
- 避免在 Tool 内部使用全局可变状态
- 异步函数用
async def,同步函数也可以但推荐异步 - Tool 返回值应为 str 类型(复杂结构用 JSON 序列化)
- 错误处理:在 Tool 内部 try-except,返回错误描述而非抛异常
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.
- 3d ago First seen · 58 lines · 0 tokens per session scan A f2dbda753596
mcp_protocol is a skill published in the GitHub repository fdueblab/Micro-Agent (99 stars, last pushed 21d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 562 tokens. 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-30.
Other skills, from other repositories
trellis-start
Initializes an AI development session by reading workflow guides, developer identity, git status, active tasks, and project guidelines from .trellis/. Classifies incoming tasks and routes to brainstorm, direct edit, or task workflow. Use when beginning a new coding session, resuming work, starting a new task, or…
company-brain
How an agent should operate as one mind inside a shared Company Brain built on Caura — recall before acting, obey fleet keystones, reuse and publish skills, and report outcomes so every task compounds across the whole organization. Use this whenever you work as part of a Caura-connected team or fleet and your work…
seo-content-writer
Write SEO blog posts, articles, landing pages with keyword integration, header optimization, and snippet targeting. SEO文章写作/内容优化.
Universal Tracker
Cross-platform background monitor to auto-detect new videos/posts (YouTube, Douyin, Website) and run team workflows.
schema-markup-generator
Generate JSON-LD structured data for FAQ, HowTo, Article, Product, LocalBusiness rich results. Schema标记/结构化数据.
content-gap-analysis
Find content gaps: topics and keywords competitors cover that you don't, with editorial calendar. 内容缺口/选题规划.