MCP2Skills Convert any MCP server into a Claude Skill
概览
🚀 Convert any MCP server into a Claude Skill with 90% context savings. MCP servers load all tool definitions into context at startup. With 20+ tools, that's 30-50k tokens consumed before Claude does any work. This converter applies the "progressive disclosure" pattern (inspired by playwright-skill) to any MCP server: - : ~100 tokens (just metadata) - : ~5k tokens (full instructions) - : 0 tokens (runs externally) ✅ Done! Your MCP server is now a Claude Skill with minimal context usage. The converter creates an optimized Skill structure: 1. your MCP server config 2. the MCP server to discover all tools 3. a complete Skill package: - SKILL.md - Metadata and full tool documentation - executor.py - Dynamic MCP tool executor - mcp-config.json - Server configuration - package.json - Dependencies 4. : Claude loads only ~100 tokens at startup 5. : Full instructions (~5k tokens) load on demand 6.
README
以下为原文 README 节选,完整内容请查看原文。
MCP2Skills
🚀 Convert any MCP server into a Claude Skill with 90% context savings.
Why This Exists
MCP servers load all tool definitions into context at startup. With 20+ tools, that’s 30-50k tokens consumed before Claude does any work.
This converter applies the “progressive disclosure” pattern (inspired by playwright-skill) to any MCP server:
- Startup: ~100 tokens (just metadata)
- When needed: ~5k tokens (full instructions)
- Executing: 0 tokens (runs externally)
Quick Start
# 1. Install dependencies
pip install mcp
# 2. Create your MCP config file
cat > my-mcp.json << 'EOF'
{
"name": "my-service",
"command": "node",
"args": ["path/to/mcp-server.js"],
"env": {"API_TOKEN": "your-token"}
}
EOF
# 3. Convert to Skill
python mcp_to_skill_v2.py \
--mcp-config my-mcp.json \
--output-dir ./skills/my-service
# 4. Install to Claude
cp -r skills/my-service ~/.claude/skills/
✅ Done! Your MCP server is now a Claude Skill with minimal context usage.
What It Does
The converter creates an optimized Skill structure:
- Reads your MCP server config
- Introspects the MCP server to discover all tools
- Generates a complete Skill package:
SKILL.md- Metadata and full tool documentationexecutor.py- Dynamic MCP tool executormcp-config.json- Server configurationpackage.json- Dependencies
- Result: Claude loads only ~100 tokens at startup
- When used: Full instructions (~5k tokens) load on demand
- Execution: Tools run externally via MCP (0 context tokens)
Context Savings
Before (MCP):
20 tools = 30k tokens always loaded
Context available: 170k / 200k = 85%
After (Skills):
20 skills = 2k tokens metadata
When 1 skill active: 7k tokens
Context available: 193k / 200k = 96.5%
Real Examples
This repository includes working examples in skills/:
DevOps Skill (23 tools)
Complete Youzan DevOps platform integration combining ops-cli and superbus tools.
Context savings:
| Metric | MCP Mode | Skill Mode | Savings |
|---|---|---|---|
| Idle | ~25k tokens | ~150 tokens | 99.4% |
| Active | ~25k tokens | ~8k tokens | 68% |
Example Configs
- example-github-mcp.json - GitHub MCP server template
- opscli-config.json - Ops CLI integration
- superbus-config.json - Deployment bus system
Works With
Any standard MCP server:
- ✅ @modelcontextprotocol/server-github
- ✅ @modelcontextprotocol/server-slack
- ✅ @modelcontextprotocol/server-filesystem
- ✅ @modelcontextprotocol/server-postgres
- ✅ Custom MCP servers (Node.js, Python, etc.)
When To Use
Use this converter when:
- You have 10+ MCP tools
- Context space is limited
- Most tools won’t be used in each conversation
- Tools are independent and don’t need cross-tool coordination
安装
npx -y @modelcontextprotocol/server-github