mcp-converter
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMCP-to-Skill Converter
MCP-to-Skill 转换器
Installation
安装
The skill invokes . Requirements:
.claude/tools/integrations/mcp-converter/batch_converter.py- Python 3.10+: python.org or (Windows),
winget install Python.Python.3.12(macOS).brew install python@3.12 - pip: Usually included with Python; verify with .
pip --version - Dependencies: From the repo root, install deps for the integration (e.g. PyYAML if required):
Run from project root; the script usesbash
pip install pyyaml(catalog:.claude/tools/integrations/mcp-converter/).mcp-catalog.yaml
该Skill调用。要求如下:
.claude/tools/integrations/mcp-converter/batch_converter.py- Python 3.10+:可从python.org下载,或使用(Windows)、
winget install Python.Python.3.12(macOS)安装。brew install python@3.12 - pip:通常随Python一同安装;可通过验证是否安装。
pip --version - 依赖项:从仓库根目录安装集成所需的依赖(例如若需要PyYAML):
从项目根目录运行脚本;该脚本会使用bash
pip install pyyaml目录下的内容(目录文件:.claude/tools/integrations/mcp-converter/)。mcp-catalog.yaml
Cheat Sheet & Best Practices
速查表与最佳实践
MCP design: Single responsibility per server; bounded toolsets; contracts first (strict I/O schemas); stateless by default; additive changes; security (identity, auth, audit). Prefer stdio for local, Streamable HTTP for remote; use a gateway for multi-tenant/centralized policy.
Conversion: Introspect server; estimate token usage of tool schemas; generate skill with progressive disclosure. Test converted skills before relying on them. Use catalog + batch_converter for rules-driven conversion.
Hacks: Focus on high-token or high-value servers first. Keep generated SKILL.md and wrappers in version control. Use to mark or auto-convert thresholds.
mcp-catalog.yamlkeep_as_mcpMCP设计原则:每个服务器单一职责;有限工具集;优先契约(严格的I/O schema);默认无状态;增量式变更;安全性(身份、认证、审计)。本地环境优先使用标准输入输出(stdio),远程环境优先使用可流式传输的HTTP;多租户/集中式策略场景使用网关。
转换流程:自省服务器;估算工具schema的Token使用量;生成具备渐进式披露功能的Skill。在依赖转换后的Skill前先进行测试。使用目录文件+batch_converter进行规则驱动的转换。
技巧:优先处理高Token消耗或高价值的服务器。将生成的SKILL.md和包装器纳入版本控制。使用标记或设置自动转换阈值。
mcp-catalog.yamlkeep_as_mcpCertifications & Training
认证与培训
MCP: MCP Best Practices, modelcontextprotocol.info. Skill data: Single responsibility, bounded tools, contracts first, stateless; stdio vs HTTP; gateway pattern; introspect → generate skill.
MCP相关:MCP最佳实践、modelcontextprotocol.info。Skill相关要点:单一职责、有限工具、优先契约、无状态;stdio与HTTP对比;网关模式;自省→生成Skill。
Hooks & Workflows
钩子与工作流
Suggested hooks: Post–MCP config change: optional batch_converter run to refresh skills. Use with evolution-orchestrator (add mcp-converter to secondary) when creating skills from MCP servers.
Workflows: Use with evolution-orchestrator. Flow: list servers → convert server or batch → test converted skill. See ; mcp-converter feeds skill-creator input.
creators/skill-creator-workflow.yaml建议钩子:MCP配置变更后:可选运行batch_converter来刷新Skills。在从MCP服务器创建Skills时,与evolution-orchestrator配合使用(将mcp-converter添加为次要组件)。
工作流:与evolution-orchestrator配合使用。流程:列出服务器→转换单个或批量服务器→测试转换后的Skill。详见;mcp-converter为skill-creator提供输入。
creators/skill-creator-workflow.yaml🚀 Usage
🚀 使用方法
1. List Available MCP Servers
1. 列出可用的MCP服务器
See which servers are configured in your :
.mcp.jsonbash
python .claude/tools/mcp-converter/mcp_analyzer.py --list查看中配置的服务器:
.mcp.jsonbash
python .claude/tools/mcp-converter/mcp_analyzer.py --list2. Convert a Server
2. 转换单个服务器
Convert a specific MCP server to a Skill:
bash
python .claude/tools/mcp-converter/mcp_analyzer.py --server <server_name>将指定的MCP服务器转换为Skill:
bash
python .claude/tools/mcp-converter/mcp_analyzer.py --server <server_name>3. Batch Conversion (Catalog)
3. 批量转换(基于目录)
Convert multiple servers based on rules:
bash
python .claude/tools/mcp-converter/batch_converter.py根据规则转换多个服务器:
bash
python .claude/tools/mcp-converter/batch_converter.pyℹ️ How it Works
ℹ️ 工作原理
- Introspect: Connects to the running MCP server.
- Analyze: Estimates token usage of tool schemas.
- Generate: Creates a wrapper that creates dynamic tool calls only when needed.
SKILL.md
- 自省:连接到运行中的MCP服务器。
- 分析:估算工具schema的Token使用量。
- 生成:创建包装器,仅在需要时生成动态工具调用。
SKILL.md
🔧 Dependencies
🔧 依赖项
Requires python package:
mcpbash
pip install mcp需要安装 Python包:
mcpbash
pip install mcpMemory Protocol (MANDATORY)
内存协议(强制要求)
Before starting:
Read
.claude/context/memory/learnings.mdAfter completing:
- New pattern ->
.claude/context/memory/learnings.md - Issue found ->
.claude/context/memory/issues.md - Decision made ->
.claude/context/memory/decisions.md
ASSUME INTERRUPTION: If it's not in memory, it didn't happen.
开始前:
阅读
.claude/context/memory/learnings.md完成后:
- 新模式 → 写入
.claude/context/memory/learnings.md - 发现问题 → 写入
.claude/context/memory/issues.md - 做出的决策 → 写入
.claude/context/memory/decisions.md
假设会被中断:如果未记录到内存中,就视为未发生。