version unknown

mcp2cli

@myeolinmalchi⭐ 2 stars· last commit 7mo ago· 0 open issues

A Claude Code plugin that converts MCP servers into token-efficient CLI tools with SKILL.md. Three sub-skills: mcp-analyze, mcp-codegen, skill-author.

Choose how to use this skill

You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.

1. Native installer

This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.

Do not guess an installer command or replace an existing version without reviewing the diff.

2. Complete package recommended

Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.

No complete ProSkills package is published for this listing yet.

3. Prompt-only

Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.

Need only the instruction file?

Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.

No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.

7.4/10
Verified
Apr 29, 2026

// RATINGS

⭐GitHub Stars
⭐ 2 on GitHubGitHub ↗

New / niche

🟢ProSkills ScoreAI Verified
7.4/10
📍

Not yet listed on ClawHub or SkillsMP

// README

mcp2cli

MCP servers are expensive. CLIs are not.

A Claude Code plugin that converts MCP servers into token-efficient CLI tools.


Why?

MCP servers load every tool schema into the agent's context window on startup. For a server with 30 tools, that's ~55,000 tokens burned before the agent does anything.

A CLI tool with a SKILL.md loads on-demand — only when relevant — and returns compact text instead of verbose JSON.

MCPCLI + Skill
StartupLoad all tool schemas into contextNothing loaded
Token cost~55,000 tokens for 30 tools0 tokens until first use
On useJSON + metadata per callLoad SKILL.md once (~2K tokens)
OutputVerbose structured JSONCompact plain text

Bottom line: 94–96% token savings across all scales.

MCPCLI + SkillSavings
5 tools8,000 tok500 tok94%
30 tools55,000 tok2,000 tok96%
100 tools134,000 tok5,000 tok96%

The canonical example: Playwright shipped a CLI + SKILL.md alongside their MCP server — specifically for coding agents where token efficiency matters.


Quick Start

1. Clone the plugin:

git clone https://github.com/myeolinmalchi/mcp2cli.git

2. Load it in Claude Code:

claude --plugin-dir ./mcp2cli

3. Convert your first MCP server:

/convert ./my-mcp-server

That's it. The plugin analyzes the server, generates CLI code, and creates a SKILL.md — all in one step.


How It Works

The plugin runs a 5-phase conversion pipeline:

PhaseNameWhat happensOutput
1AnalyzeRead MCP source, extract tools, params, outputs, authStructured analysis table
2DesignMap tool names → CLI commands, params → flagsCommand structure spec
3GenerateWrite TypeScript CLI reusing MCP's business logicWorking npm CLI tool
4SkillGenerate SKILL.md under 500 lines with examplesSKILL.md file
5ValidateRun each command, compare with MCP outputTest report

Supported MCP Patterns

The plugin classifies MCP servers into 4 tiers by CLI conversion feasibility:

TierPatternsCLI Fit
1Local System Tool, SaaS API Wrapper, DevOps, Document/Media ProcessingExcellent
2Database, Search, Proxy, Multi-tool, Messaging, MonitoringGood
3Browser Automation, Code Execution, Memory, Auth/IdentityPartial
4Aggregator/Gateway, Reasoning/CognitiveNot recommended

Commands

CommandDescription
/convert <path>Full end-to-end conversion (all 5 phases)
/analyze-mcp <path>Analysis only — assess feasibility, no code gen
/generate-skill <cli-name>Generate SKILL.md for an existing CLI tool
/convert ./my-mcp-server
/convert https://github.com/user/their-mcp-server
/analyze-mcp ./my-mcp-server
/generate-skill my-existing-cli

What's Inside

mcp2cli/
├── .claude-plugin/
│   └── plugin.json
│
├── skills/
│   ├── mcp-analyze/                    # MCP server analysis & pattern classification
│   │   ├── SKILL.md
│   │   └── references/
│   │       └── pattern-classification.md
│   │
│   ├── mcp-codegen/                    # TypeScript CLI code generation
│   │   ├── SKILL.md
│   │   └── references/
│   │       ├── cli-scaffold.md
│   │       ├── porting-cheatsheet.md
│   │       ├── tier-1-templates.md
│   │       ├── tier-2-templates.md
│   │       └── tier-3-strategies.md
│   │
│   └── skill-author/                   # SKILL.md generation
│       ├── SKILL.md
│       └── references/
│           └── skill-template.md
│
├── commands/
│   ├── convert.md                      # /convert — orchestrates all skills
│   ├── analyze-mcp.md                  # /analyze-mcp — analysis only
│   └── generate-skill.md              # /generate-skill — SKILL.md for existing CLI
│
└── agents/
    └── mcp-analyzer.md                 # Subagent for MCP source analysis
ComponentCountPurpose
Skills3mcp-analyze, mcp-codegen, skill-author
Commands3/convert (orchestrator), /analyze-mcp, /generate-skill
Agents1MCP server source code analysis

When to Convert (and When Not To)

Convert to CLIKeep as MCP
Stateless request/response toolsReal-time streaming / subscriptions
Text or JSON outputBinary streams (audio, video)
Infrequently used tools (schema overhead > value)Bidirectional communication
Simpler deployment desiredComplex state management across calls

Rule of thumb: If the MCP tool is basically input → API call → output, it should be a CLI.


Contributing

  1. Add patterns — New conversion patterns go in skills/mcp-codegen/references/
  2. Keep it lean — SKILL.md stays under 500 lines. Detailed docs go in references/
  3. Test conversions — Point /convert at any MCP server and verify the output works
# Test locally
claude --plugin-dir ./mcp2cli

References

// REPO STATS

2 stars
0 open issues
Last commit: 7mo ago