home / skills / oimiragieo / agent-studio / mcp-converter

mcp-converter skill

/.claude/skills/_archive/dead/mcp-converter

This skill converts MCP servers into Claude Skills by running introspection and generating dynamic, token-efficient wrappers.

npx playbooks add skill oimiragieo/agent-studio --skill mcp-converter

Review the files below or copy the command above to add this skill to your agents.

Files (6)
SKILL.md
3.6 KB
---
name: mcp-converter
description: Converts MCP servers to Claude Skills to save tokens. Runs the introspection tool to generate skill wrappers.
version: 1.0
model: sonnet
invoked_by: both
user_invocable: true
tools: [Bash, Read, Write]
best_practices:
  - Use introspection to analyze MCP servers
  - Generate skill wrappers with progressive disclosure
  - Test converted skills before use
error_handling: graceful
streaming: supported
---

# MCP-to-Skill Converter

## Installation

The skill invokes `.claude/tools/integrations/mcp-converter/batch_converter.py`. Requirements:

- **Python 3.10+**: [python.org](https://www.python.org/downloads/) or `winget install Python.Python.3.12` (Windows), `brew install [email protected]` (macOS).
- **pip**: Usually included with Python; verify with `pip --version`.
- **Dependencies**: From the repo root, install deps for the integration (e.g. PyYAML if required):
  ```bash
  pip install pyyaml
  ```
  Run from project root; the script uses `.claude/tools/integrations/mcp-converter/` (catalog: `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 `mcp-catalog.yaml` to mark `keep_as_mcp` or auto-convert thresholds.

## Certifications & Training

**MCP:** [MCP Best Practices](https://mcp-best-practice.github.io/mcp-best-practice/), [modelcontextprotocol.info](https://modelcontextprotocol.info/docs/best-practices/). **Skill data:** Single responsibility, bounded tools, contracts first, stateless; stdio vs HTTP; gateway pattern; introspect → generate 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 `creators/skill-creator-workflow.yaml`; mcp-converter feeds skill-creator input.

## 🚀 Usage

### 1. List Available MCP Servers

See which servers are configured in your `.mcp.json`:

```bash
python .claude/tools/mcp-converter/mcp_analyzer.py --list
```

### 2. Convert a Server

Convert a specific MCP server to a Skill:

```bash
python .claude/tools/mcp-converter/mcp_analyzer.py --server <server_name>
```

### 3. Batch Conversion (Catalog)

Convert multiple servers based on rules:

```bash
python .claude/tools/mcp-converter/batch_converter.py
```

## ℹ️ How it Works

1.  **Introspect**: Connects to the running MCP server.
2.  **Analyze**: Estimates token usage of tool schemas.
3.  **Generate**: Creates a `SKILL.md` wrapper that creates dynamic tool calls only when needed.

## 🔧 Dependencies

Requires `mcp` python package:

```bash
pip install mcp
```

## Memory Protocol (MANDATORY)

**Before starting:**
Read `.claude/context/memory/learnings.md`

**After 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.

Overview

This skill converts MCP servers into Claude Skills to reduce token usage and streamline tool integration. It runs an introspection-driven conversion that analyzes server capabilities and generates skill wrappers following strict I/O contracts. The converter supports single-server or batch workflows and integrates with orchestrators for automated updates.

How this skill works

The tool connects to a running MCP server and introspects available endpoints and tool schemas. It estimates token usage for each tool, then generates a skill wrapper that exposes only the necessary calls with progressive disclosure to save tokens. Batch mode uses a catalog and conversion rules to automate large-scale conversions.

When to use it

  • You want to reduce tokens by turning high-cost MCP endpoints into efficient skills.
  • Migrating many MCP servers to Claude Skills using a rules-driven, repeatable process.
  • Automating skill generation after MCP server updates via CI or hooks.
  • Prioritizing conversion of high-value or high-token servers first.

Best practices

  • Design MCP servers with single responsibility and bounded toolsets before converting.
  • Define strict I/O schemas (contracts) to enable safe, stateless skill wrappers.
  • Introspect and test each converted skill thoroughly before production use.
  • Keep conversion rules and generated wrappers under version control.
  • Use progressive disclosure—only call tools when required to minimize tokens.

Example use cases

  • Convert a single MCP server interactively to validate token savings and behavior.
  • Run batch conversions using a catalog file to apply organization-wide rules.
  • Integrate with an evolution orchestrator to refresh skills after server changes.
  • Prioritize converting servers with the highest estimated token usage for immediate cost savings.

FAQ

What prerequisites are required to run the converter?

Python 3.10+ and pip are required, plus the mcp package and any listed dependencies (installable via pip). Run the conversion scripts from your project root so path-based catalogs are found.

How do I automate conversions after MCP changes?

Add a post-config-change hook to trigger the batch conversion or include the converter in your evolution orchestrator workflow to regenerate wrappers automatically.