Get the FREE Ultimate OpenClaw Setup Guide →

mcp-to-skill-converter

npx machina-cli add skill bjornslib/mcp-to-uber-skills-converter/mcp-to-skill-converter --openclaw
Files (1)
SKILL.md
6.5 KB

MCP to Skill Converter

Convert any MCP server into a Claude Skill with progressive disclosure pattern, reducing context usage by 90%+.

When to Use This Skill

  • Converting MCP servers to skills for context efficiency
  • Listing available MCP servers in a project
  • Batch converting multiple MCP servers
  • Creating skills from .mcp.json configuration

Quick Commands

All commands run from project root where the plugin is installed.

List Available Servers

python ${PLUGIN_DIR}/skills/mcp-to-skill-converter/mcp_to_skill.py --list

Shows all MCP servers with compatibility status (stdio, http, and sse types are compatible).

Convert Single Server (auto-outputs to mcp-skills/)

python ${PLUGIN_DIR}/skills/mcp-to-skill-converter/mcp_to_skill.py --name <server-name>

Example:

python ${PLUGIN_DIR}/skills/mcp-to-skill-converter/mcp_to_skill.py --name github
# Outputs to: .claude/skills/mcp-skills/github/
# Automatically removes github from .mcp.json
# Updates mcp-skills/index.json

Convert All Compatible Servers

python ${PLUGIN_DIR}/skills/mcp-to-skill-converter/mcp_to_skill.py --all
# Converts all compatible servers (stdio, http, sse) to mcp-skills/

Custom Output Directory

python ${PLUGIN_DIR}/skills/mcp-to-skill-converter/mcp_to_skill.py --name github --output-dir /custom/path

Specify Custom .mcp.json

python ${PLUGIN_DIR}/skills/mcp-to-skill-converter/mcp_to_skill.py --mcp-json /path/to/.mcp.json --name github --output-dir ./skills

CLI Options

OptionDescription
--listList all servers with compatibility info
--name NAMEConvert specific server by name
--allConvert all compatible servers
--output-dir PATHOutput directory for generated skill(s)
--mcp-json PATHPath to .mcp.json (auto-discovers if not specified)
--mcp-config PATH[Legacy] Direct MCP config JSON file

Server Compatibility

TypeCompatibleNotes
stdioāœ… YesStandard input/output protocol
httpāœ… YesStreamable HTTP protocol
sseāœ… YesServer-Sent Events protocol

Context Savings

ScenarioNative MCPAs SkillSavings
Idle30-50k tokens~100 tokens99%+
Active30-50k tokens~5k tokens85%+
Executing30-50k tokens0 tokens100%

Workflow Example

Step 1: List available servers

python ${PLUGIN_DIR}/skills/mcp-to-skill-converter/mcp_to_skill.py --list

Output:

šŸ“„ Servers in: /path/to/.mcp.json

Name                      Type       Compatible   Command
--------------------------------------------------------------------------------
github                    stdio      āœ… Yes        npx
context7                  stdio      āœ… Yes        npx
livekit-docs              http       āŒ No         https://...

šŸ“Š Total: 16 servers, 14 compatible

Step 2: Convert desired server

python ${PLUGIN_DIR}/skills/mcp-to-skill-converter/mcp_to_skill.py --name github

The converter automatically:

  • Creates the skill in .claude/skills/mcp-skills/github/
  • Initializes the mcp-skills registry (SKILL.md + index.json) if needed
  • Updates index.json with the new skill
  • Removes the server from .mcp.json to avoid duplicate loading

Step 3: Add semantic trigger keywords (MANDATORY)

The converter generates a placeholder description. You MUST update it with meaningful trigger keywords based on what the MCP server actually does.

  1. Read the generated SKILL.md to understand what tools are available
  2. Identify semantic keywords - What would users naturally ask for?
    • Think about user intent, not tool names
    • "ToolUI", "chat components" NOT "assistantUIDocs"
    • "create PR", "issues", "repository" NOT "create_pull_request"
  3. Update the SKILL.md description with trigger keywords:
# Before (auto-generated):
description: Dynamic access to assistant-ui MCP server (2 tools)

# After (agent-enhanced):
description: Use for assistant-ui documentation, ToolUI, generative UI, chat components, Thread, Composer, Message primitives, runtime integrations. Get docs and code examples for building AI chat interfaces.
  1. Update the registry SKILL.md (mcp-skills/SKILL.md):
    • Add the skill to the "Available Skills" table
    • Include the trigger keywords column

Example registry entry:

| Skill | Tools | Trigger Keywords |
|-------|-------|------------------|
| assistant-ui | 2 | ToolUI, generative UI, chat components, assistant-ui docs |
| github | 26 | PR, issues, repository, commits, code search |

Step 4: Use the generated skill Claude will auto-discover the new skill in the mcp-skills registry and can invoke MCP tools with minimal context overhead.

Generated Skill Structure

output-dir/server-name/
ā”œā”€ā”€ SKILL.md           # Instructions and tool documentation
ā”œā”€ā”€ executor.py        # Async MCP client wrapper
ā”œā”€ā”€ mcp-config.json    # Server configuration
└── package.json       # Dependency info

Using Generated Skills

Use the central executor from project root:

# List tools in a skill
python .claude/skills/mcp-skills/executor.py --skill <skill-name> --list

# Describe specific tool
python .claude/skills/mcp-skills/executor.py --skill <skill-name> --describe tool_name

# Call a tool
python .claude/skills/mcp-skills/executor.py --skill <skill-name> --call '{"tool": "tool_name", "arguments": {...}}'

Requirements

pip install mcp

Python 3.8+ required.

Error Handling

ErrorCauseSolution
"Server not found"Name doesn't existRun --list to see available servers
"Type not supported"Server is HTTP/SSEOnly stdio servers can be converted
"Could not find .mcp.json"No config foundUse --mcp-json to specify path
"mcp package not found"Missing dependencyRun pip install mcp

Files in This Skill

  • SKILL.md - This documentation
  • mcp_to_skill.py - The converter script
  • templates/ - Template files for generated skills

This skill enables converting MCP servers to Claude Skills for 90%+ context savings.

Source

git clone https://github.com/bjornslib/mcp-to-uber-skills-converter/blob/main/skills/mcp-to-skill-converter/SKILL.mdView on GitHub

Overview

Transforms MCP server configurations into Claude Skills using a progressive disclosure pattern, reducing context usage by 90%+. It supports listing available MCP servers, batch conversions, and creating skills from .mcp.json, making MCP workflows more efficient.

How This Skill Works

The converter reads MCP server configurations, generates a Claude Skill in .claude/skills/mcp-skills/<server>/, and updates the registry index.json. It then removes the server from .mcp.json to prevent duplicate loading, enabling leaner runtime contexts.

When to Use It

  • Converting a single MCP server to a Claude Skill.
  • Listing available MCP servers in a project.
  • Batch-converting multiple MCP servers at once.
  • Generating skills from a .mcp.json configuration.
  • Preparing MCP-derived skills for deployment in .claude/skills.

Quick Start

  1. Step 1: List available servers python ${PLUGIN_DIR}/skills/mcp-to-skill-converter/mcp_to_skill.py --list
  2. Step 2: Convert a specific server python ${PLUGIN_DIR}/skills/mcp-to-skill-converter/mcp_to_skill.py --name <server-name>
  3. Step 3: Validate output Check .claude/skills/mcp-skills/<server>/ exists, index.json updated, and .mcp.json updated to remove the server.

Best Practices

  • List servers first to confirm compatibility (stdio, http, sse).
  • Update the generated trigger keywords to reflect the MCP server's functionality.
  • Use --output-dir to organize generated skills by project or server.
  • Verify that index.json is updated and the server is removed from .mcp.json.
  • Test the new skill in a sandbox before deploying to production.

Example Use Cases

  • Convert the github MCP server to .claude/skills/mcp-skills/github/ and register it.
  • List all MCP servers in a project to audit compatibility.
  • Batch convert: github, context7, livekit-docs to mcp-skills/
  • Convert with a custom output directory using --output-dir /custom/path.
  • Generate skills from a specified .mcp.json with --mcp-json path/to/.mcp.json.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers ↗