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 skills add echoVic/blade-code --skill mcp-protocol-runtimegit clone --depth 1 https://github.com/echoVic/blade-codeWrote 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/skills/echovic/blade-code/mcp-protocol-runtime)<a href="https://agentmods.dev/skills/echovic/blade-code/mcp-protocol-runtime"><img src="https://agentmods.dev/badge/skills/echovic/blade-code/mcp-protocol-runtime/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/skills/echovic/blade-code/mcp-protocol-runtime"><img src="https://agentmods.dev/badge/skills/echovic/blade-code/mcp-protocol-runtime.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00148 | $0.03033 |
| Opus 5.5 | $0.00059 | $0.01213 |
| Sonnet 5.5 | $0.00030 | $0.00607 |
| Haiku 4.5 | $0.00015 | $0.00303 |
Grade A, and why
knowledge-extension-ecosystem-mcp-protocol-runtime 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 — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Module Structure
MCP 运行时由每个 SessionRuntime 独占:配置先按 source project 合并,Registry 管理
多个 client 的安全投影,动态工具和内容能力再进入该 Session 的 ToolRegistry 与事件流。
Directory Layout
packages/cli/src/mcp/— client、registry、目录、交互、恢复、日志、任务与结果归一化packages/cli/src/mcp/auth/— OAuth 策略、回调 provider 与凭据账本packages/cli/src/tools/builtin/mcp/— Resources、Prompts、Completion 与 Tasks 工具适配packages/cli/src/commands/mcp.ts— 进程外 MCP 管理命令packages/cli/src/server/routes/mcp.ts— 当前 Web Session 的 MCP 管理 APIpackages/cli/src/slash-commands/mcp.ts— 活动 TUI/ACP Session 的 MCP 命令packages/cli/web/src/components/mcp/— Web MCP 状态与操作面板
Key Entry Points
resolveWorkspaceMcpConfig()inpackages/cli/src/mcp/resolveWorkspaceMcpConfig.ts— 合并并规范化单个 Session 的 MCP 配置McpRegistry.createIsolated()inpackages/cli/src/mcp/McpRegistry.ts— 创建 Session 独占 RegistryMcpClient.connect()andMcpClient.callTool()inpackages/cli/src/mcp/McpClient.ts— 建连、能力协商与工具调用createMcpTool()inpackages/cli/src/mcp/createMcpTool.ts— 将协议工具映射为 Blade ToolSessionRuntime.registerMcpTools()inpackages/cli/src/agent/runtime/SessionRuntime.ts— 注册动态目录、内容工具和事件监听
Gotchas
- MCP 配置覆盖顺序是 workspace → plugin →显式 Session → CLI,
strictCliConfig会跳过前三类来源;相对 stdiocwd始终按 source project 解析而不是 task worktree(packages/cli/src/mcp/resolveWorkspaceMcpConfig.ts) --mcp-config的单个非法文件或 JSON 只记录 warning 并跳过,后续参数仍继续覆盖;调用方不能假设解析失败会使 Session 创建失败(packages/cli/src/mcp/loadMcpConfig.ts)McpRegistry.registerServer()默认吞掉初始连接异常并保留 ERROR server,Session 可继续启动;需要通过状态或显式 reconnect 区分“已注册”与“已连接”(packages/cli/src/mcp/McpRegistry.ts)- 同一 client 同时只允许一个交互式工具调用或 task 创建,因为 Elicitation/Sampling 缺少可靠的父调用关联;并发重叠会在发请求前拒绝(
packages/cli/src/mcp/McpClient.ts) - transport 进入恢复前会立即撤销旧 tools、resources、prompts 和 instructions;持有旧
Tool对象或旧 catalog identity 重试会命中死亡 connection generation(packages/cli/src/mcp/McpClient.ts,packages/cli/src/mcp/McpRegistry.ts) list_changed通知只登记有界合并刷新,完整新目录全部校验成功后才替换;notification 刷新失败保留上一有效目录,而手动刷新会把错误返回调用方(packages/cli/src/mcp/McpClient.ts,packages/cli/src/mcp/McpToolCatalog.ts)- Resource subscription 分为 desired 与 active:异常断连只清 active 并在新目录确认 URI 后恢复,手动 disconnect、unsubscribe 或 Session dispose 才清 desired(
packages/cli/src/mcp/McpClient.ts) - MCP Tasks 默认关闭;
taskSupport=required的动态工具会自动后台化,optional仍以前台调用为默认,只有显式StartMcpTask才进入 task 路径(packages/cli/src/mcp/createMcpTool.ts,packages/cli/src/mcp/McpTasks.ts) - 模型和用户只能看到 Blade 生成的
mcp_task_*,原始 server task ID 必须留在 manager 内部;ownership 同时校验 Session ID 与 canonical execution workspace(packages/cli/src/mcp/McpTaskManager.ts,packages/cli/src/tools/builtin/mcp/mcpTaskTools.ts) - 二进制结果绝不能把 base64 直接注入模型;大文本超过 inline budget 后写 Session 私有 artifact,写入失败也只能返回 hash/size/omitted 元数据(
packages/cli/src/mcp/McpToolResult.ts,packages/cli/src/mcp/McpToolArtifactStore.ts) - MCP 日志是用户诊断事件而非模型输入,server instructions 才会以明确标注“不可信外部文档”的 scoped reminder 进入 provider boundary;二者不能共用注入路径(
packages/cli/src/mcp/McpLogging.ts,packages/cli/src/mcp/McpServerInstructions.ts)
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 · 84 lines · 148 tokens per session scan A a0d9fa85278d
knowledge-extension-ecosystem-mcp-protocol-runtime is a skill published in the GitHub repository echoVic/blade-code (181 stars, last pushed 3d ago), licensed MIT. It adds 148 tokens to every session and 3,033 once invoked, about $0.0006 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-09-03.
Other skills, from other repositories
clinical-reports
Write comprehensive clinical reports including case reports (CARE guidelines), diagnostic reports (radiology/pathology/lab), clinical trial reports (ICH-E3, SAE, CSR), and patient documentation (SOAP, H&P, discharge summaries). Full support with templates, regulatory compliance (HIPAA, FDA, ICH-GCP), and validation…
clinical-decision-support
Generate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading…
gget
Fast CLI/Python queries to 20+ bioinformatics databases. Use for quick lookups: gene info, BLAST searches, AlphaFold structures, enrichment analysis. Best for interactive exploration, simple queries. For batch processing or advanced BLAST use biopython; for multi-database Python workflows use bioservices.
immunology-assays
Computational analysis of immunology experimental data. ATAC-seq differential accessibility, immune cell tracking from microscopy, ELISA data processing with 4-parameter logistic fitting, immunohistochemistry quantification, antibody titer analysis, and cell cycle phase duration estimation. For flow cytometry use…
molecular-cloning
Molecular cloning simulation and design. PCR amplicon prediction, restriction enzyme digestion, Golden Gate and Gibson assembly simulation, primer design, CRISPR sgRNA design, and plasmid annotation. For protein-level sequence analysis use biopython or esm; for database lookups use gene-database or ensembl-database.
geo-database
Access NCBI GEO for gene expression/genomics data. Search/download microarray and RNA-seq datasets (GSE, GSM, GPL), retrieve SOFT/Matrix files, for transcriptomics and expression analysis.