Convert MCP servers to Claude Skills. Save ~90% context tokens.
- Node.js 18+
- npm/npx
Stdio MCP (npx-based):
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {"GITHUB_TOKEN": "your-token"}
}
}
}HTTP MCP
{
"mcpServers": {
"my-server": {
"type": "http",
"url": "http://localhost:8080/mcp"
}
}
}Direct format (without mcpServers wrapper)
{
"name": "github",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {"GITHUB_TOKEN": "your-token"}
}npx -y mcp-to-skill generate \
--mcp-config my-mcp.json \
--output-dir ./skills/my-skillcp -r ./skills/my-skill ~/.claude/skills/Claude discovers it automatically. The generated SKILL.md instructs Claude to call tools via:
npx -y mcp-to-skill exec \
--config /path/to/mcp-config.json \
--call '{"tool": "tool_name", "arguments": {...}}'skills/my-skill/
├── SKILL.md # Instructions for Claude (~100 tokens)
└── mcp-config.json # MCP server config
In my experience it is best to fine tune the skill.md a little by enhancing the description to be more concise about the tool (e.g. give the agent context on the purpose of the mcp/tool). Additionally some MCP's tool usage descriptions are too verbose and can be edited down for further savings.
git clone https://github.com/larkinwc/ts-mcp-to-skill.git
cd ts-mcp-to-skill
npm install
npm run build
# Run locally
npx tsx src/index.ts generate --mcp-config config.json --output-dir ./skills/name
# Test executor
npx tsx src/index.ts exec --config mcp-config.json --list
npx tsx src/index.ts exec --config mcp-config.json --describe tool_name
npx tsx src/index.ts exec --config mcp-config.json --call '{"tool": "...", "arguments": {}}'MIT