Agent skill

MCP To Skill

by Mathews-Tom in Mathews-Tom/armory

Converts MCP servers into on-demand skills to cut context window usage, classifying each tool by replacement strategy and generating the skill package.

MITAuto-check passedAgent Workflows

Install MCP To Skill

skills CLI
$ npx skills add Mathews-Tom/armory --skill mcp-to-skill -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Mathews-Tom/armory mcp-to-skill --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Mathews-Tom/armory.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/mcp-to-skill .claude/skills/mcp-to-skill && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
mcp-to-skill
GitHub stars
329
Token cost
~2.7k tokens
SKILL.md length
1,264 words
Files
6 (incl. scripts, references)
Skills in repo
80
Repo updated
First seen
Licence
MIT

At a glance

Converts MCP servers into on-demand skills to cut context window usage, classifying each tool by replacement strategy and generating the skill package.

  • Works in 5 steps: Discovery → Classification → Replacement Strategy → …
  • Reduce context size
  • SKILL.md covers Decision Framework: Convert…, Conversion Workflow, Limitations and Constraints
  • Runs Python scripts from its folder; calls python3, npm and pip

What it does

MCP To Skill is an agent skill from Mathews-Tom/armory. Converts MCP servers into on-demand skills to cut context window usage, classifying each tool by replacement strategy and generating the skill package. Triggers on: "convert MCP", "MCP to skill", "reduce context size", "too many tools", "tool token bloat", "MCP migration".

Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including scripts and reference files (for example `evals/cases.yaml`, `references/environment-guide.md` and `references/replacement-patterns.md`).

It sits in Agent Workflows, covering MCP servers and Context engineering. It works with Model Context Protocol. The repository describes itself as: Curated, production-grade skills for AI coding agents. Battle-tested workflows for developers who use AI seriously. The licence is MIT.

When your agent uses it

  • Reduce context size
  • Tool token bloat

Example prompts

  • “convert MCP”
  • “MCP to skill”
  • “reduce context size”
  • “/mcp-to-skill”

Requirements

  • Python 3
  • Docker

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Discovery
  2. Classification
  3. Replacement Strategy
  4. Generation
  5. Validation

What it can do on your machine

Read from SKILL.md and the folder at commit 4594fb7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3
    • npm
    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npm and pip, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

MCP To Skill loads about 2.7k tokens when it runs, and up to ~7.2k if it reads all its reference files. Until then it costs about 72 tokens; SKILL.md has 1,264 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~72
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~7.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from Mathews-Tom/armory at commit 4594fb7, republished under its MIT licence (© Mathews-Tom). 1,264 words, ~2,692 tokens.

Download SKILL.mdSave it as .claude/skills/mcp-to-skill/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
mcp-to-skill
description
Converts MCP servers into on-demand skills to cut context window usage, classifying each tool by replacement strategy and generating the skill package. Triggers on: "convert MCP", "MCP to skill", "reduce context size", "too many tools", "tool token bloat", "MCP migration".
metadata.version
1.1.1
metadata.category
data
metadata.tags
mcp, skill-conversion, context-optimization, token-reduction
metadata.difficulty
intermediate
metadata.phase
build

MCP-to-Skill Converter

Convert MCP servers into on-demand skills. MCP tool schemas sit in the system prompt on every turn (~500-2000 tokens per tool, regardless of whether they're used). Skills cost zero tokens until loaded via view. For a typical setup with 4-5 MCP servers exposing 20-40 tools, this reclaims 10,000-30,000 tokens of context per turn.

This matters because that's 10-30% of the context window burned before the conversation even starts — and it compounds: every turn re-injects the full schema.

Decision Framework: Convert vs. Keep

Not every MCP should become a skill. Apply this heuristic:

Convert when the MCP wraps a REST API (use curl/web_fetch), wraps a CLI tool (gh, aws, gcloud — invoke directly), implements a reasoning/planning pattern (capture as methodology), or when you use fewer than half its tools regularly.

Keep as MCP when it maintains persistent server-side state (DB connections, WebSocket sessions), handles binary protocols or streaming, provides real-time event subscriptions, or is tiny (1-2 tools, under 500 tokens — negligible overhead).

Hybrid approach — convert the stateless tools to a skill, keep stateful ones as a slimmed-down MCP. This is often the sweet spot for large MCP servers.


Conversion Workflow

Proceed through 5 phases. Present findings at each phase boundary and wait for user confirmation before continuing. The user knows their usage patterns better than any analysis can infer — lean on their input.

Phase 1: Discovery

Acquire the MCP's tool definitions. Try these sources in order:

  1. Active session tools — Inspect tools visible in the current conversation. Ask the user to identify which tools belong to the target MCP. This is the most reliable source because you see the exact schema consuming context.

  2. MCP config file — Parse the user's MCP configuration:

    • Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Cursor: .cursor/mcp.json in the project root
    • Claude Code: ~/.claude/settings.json or project .mcp.json
    • Config files give server names and connection details, not tool schemas.
  3. MCP server source code — If the user points to a repo or local path, look for tool definitions: FastMCP @mcp.tool() decorators, SDK server.setRequestHandler, or similar patterns. Extract name, description, parameter schemas, return types.

  4. Package registry — For published MCPs: npm info <pkg> or pip show <pkg>, then fetch the README or source to find tool definitions.

  5. User-provided schema — Ask the user to paste or upload tool definitions.

Produce a structured inventory for each tool:

text
Tool: tool_name
Description: what it does
Parameters: param list with types
Returns: return type/shape
Estimated tokens: rough schema size

Present this and ask: "Are these all the tools? Did I miss any?"

Phase 2: Classification

Classify each tool along two dimensions. This classification drives the entire replacement strategy, so getting it right matters.

Replacement category:

CategorySignalsReplacement Approach
REST_APIHTTP endpoints, URL patterns, auth headerscurl or web_fetch
CLI_WRAPPERWraps known CLI (git, gh, aws, docker)Direct CLI invocation
LOGIC_PATTERNStructures reasoning, no external callsMethodology in SKILL.md
FILE_OPReads/writes/transforms local filesbash commands or Python
STATEFULMaintains connections, sessions, cachesKeep as MCP (flag it)
COMPOSITEOrchestrates multiple sub-operationsMulti-step workflow

Usage frequency — Ask the user directly:

FrequencyAction
ESSENTIALMust be in the generated skill
NICE_TO_HAVEInclude if the replacement is clean
RARELY_USEDSkip — user can fall back to manual invocation

Present a classification table and ask: "Does this look right? Which tools do you actually use regularly?"

Flag any STATEFUL tools explicitly — these are the ones that may not convert cleanly, and the user should understand the trade-off.

Phase 3: Replacement Strategy

For each tool marked ESSENTIAL or NICE_TO_HAVE, design the concrete replacement.

Read references/replacement-patterns.md — it contains detailed patterns for each category: REST API wrappers, CLI mappings, logic patterns, file operations, stateful workarounds, composite workflows, auth patterns, and output parsing.

For each tool, determine:

  • The exact command (curl, CLI, or methodology) that replaces it
  • How MCP tool parameters map to command arguments
  • How to parse the output into a useful format
  • Common error cases and their fixes

Also identify multi-tool workflows — sequences of tools the user commonly chains. These become "Common Workflows" sections in the generated skill, which is where skills often provide more value than the MCP because workflows make the multi-step pattern explicit rather than relying on the agent to discover it.

Ask the user:

  • "What CLI tools are available in your environment?"
  • "Are there common sequences where you use multiple tools together?"
  • "How do you handle authentication?" (env vars, config files, OAuth tokens)

If the target environment is unclear, read references/environment-guide.md for environment-specific constraints (Claude.ai vs Claude Code vs Cursor vs API).

Show full SKILL.md (539 more words)Show less
Phase 4: Generation

Generate the complete skill package.

Read references/skill-template.md for the output template, sizing guide, frontmatter checklist, and quality checklist.

The generated skill structure:

text
skill-name/
  SKILL.md
    Frontmatter (name, description with aggressive triggers)
    Quick Reference table (old tool name to new command mapping)
    Prerequisites (CLI tools, env vars, auth setup)
    Core Operations (one subsection per essential tool)
    Common Workflows (multi-step patterns)
    Error Handling and Troubleshooting
  references/                        (only if SKILL.md exceeds ~400 lines)
    api-reference.md                 (overflow for complex tool replacements)

Generation rules — these exist to ensure the generated skill actually triggers and works correctly in practice:

  • Frontmatter description must be pushy. Include original MCP tool names as trigger phrases, the service name, action verbs, and explicit "Use this skill when..." language. Skills undertrigger by default; compensate with a broad net.
  • Quick Reference table at the top. Users and agents scan this first.
  • Each Core Operation shows what it replaces, the replacement command, parameter mapping, a concrete example, and error handling.
  • Keep SKILL.md under 500 lines. Move detailed patterns to references/ if needed.
  • Auth via env vars or config, never hardcoded. Generated skills must not embed credentials.
  • Prerequisites include install commands for every required CLI tool.
Phase 5: Validation

After generating, validate the skill and estimate savings.

Run the token estimation using scripts/estimate_tokens.py:

bash
python3 scripts/estimate_tokens.py --mcp-tools TOOL_COUNT --avg-schema-chars AVG_CHARS

This shows before/after token savings per turn and across a typical conversation.

Opus 4.7 note: Input tokens run 1.0–1.35× Opus 4.6 for the same text due to a tokenizer update. Treat pre-4.7 baselines as a lower bound — actual savings on Opus 4.7 may be larger than the estimator reports.

Generate 2-3 test scenarios — realistic prompts that would trigger the new skill and show the replacement commands in action. Present them to the user.

Migration checklist:

  • Generated skill reviewed and any edits applied
  • Required CLI tools installed and authenticated
  • Skill placed in the target skills directory
  • MCP removed from configuration
  • Test scenarios validated

Validate the generated skill structure:

Verify the generated skill directory contains a valid SKILL.md with frontmatter (name, description), and that all file references in the body resolve to existing files within the skill directory.

Present the complete package to the user. Offer to iterate on any section.


Limitations

Conversions succeed best for stateless tools and REST/CLI wrappers. Inherent constraints:

  • Stateful tools don't convert cleanly — MCPs maintaining persistent connections, sessions, or real-time subscriptions should stay as MCPs. See "Keep as MCP when" in the Decision Framework.
  • Binary protocols and streaming — If the MCP handles binary data or WebSocket streams, conversion requires additional infrastructure outside Claude's scope.
  • API fabrication risk — Replacement strategy only works if the underlying API or CLI is known. Unknown APIs must be researched first; guessing produces broken skills.
  • Auth complexity — Conversions with multi-step OAuth or credential management are possible but require explicit env var and config setup. See Phase 3 for auth patterns.
  • Partial coverage acceptable — A 90% conversion with one stateful MCP remaining is preferable to a broken attempt at 100%. Acknowledge trade-offs honestly.

Constraints

These exist to prevent common failure modes in generated skills:

  • Never fabricate API endpoints. If the underlying API is unknown, ask the user or research the MCP's source code. Guessing at URLs produces broken skills.
  • Acknowledge limitations honestly. A partial conversion (80% of tools) with one remaining small MCP is better than a broken skill that claims full coverage.
  • Test mentally before presenting. Trace through each replacement command: would it actually work? Does curl need specific headers? Does the CLI tool require auth setup?
  • Preserve error handling quality. Many MCPs provide helpful error messages. The generated skill should include equivalent troubleshooting guidance.

© Mathews-Tom, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (scripts, references) in skills/mcp-to-skill of Mathews-Tom/armory.

  • SKILL.md
  • evals/cases.yaml
  • references/environment-guide.md
  • references/replacement-patterns.md
  • references/skill-template.md
  • scripts/estimate_tokens.py

Open the folder on GitHubat commit 4594fb7

Compare with similar skills

MCP To Skill next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

MCP To Skill compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
MCP To Skill this skillMathews-Tom/armory329—~2.7kAutomated safety check: PassMIT
Context Mode Output Sandboxmksglu/context-mode26k—~4.1kAutomated safety check: PassCustom licence
Context Mode for Antigravity CLImksglu/context-mode26k—~850Automated safety check: PassCustom licence
LemmalogJordyZomer/lemmalog329—~2.8kAutomated safety check: PassMIT
Cortex Mem MCPsopaco/cortex-mem313—~2.8kAutomated safety check: PassMIT
MCP Code Search Tool SelectionContext-Engine-AI/Context-Engine402—~1.3kAutomated safety check: PassMIT

Similar skills

  • Context Mode Output Sandbox

    mksglu/context-mode

    Routes large command, file, API and browser output through context-mode tools so only the needed result enters the agent's context, instead of dumping it via Bash.

    26k GitHub stars~4.1k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Routing rules for using context-mode MCP tools in Antigravity CLI: sandboxed code runs, file analysis, indexed search and web fetches that keep large output out of the conversation.

    26k GitHub stars~850 tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Lemmalog

    JordyZomer/lemmalog

    Externalize working memory and logical state into the lemmalog Datalog engine (MCP).

    329 GitHub stars~2.8k tokensUpdated 9 days ago
    Agent WorkflowsAuto-check passed
  • Cortex Mem MCP

    sopaco/cortex-mem

    Persistent memory enhancement for AI agents. An agent skill from sopaco/cortex-mem.

    313 GitHub stars~2.8k tokensUpdated 2 mo ago
    Agent WorkflowsAuto-check passed
  • MCP Code Search Tool Selection

    Context-Engine-AI/Context-Engine

    Rules for choosing Qdrant-Indexer semantic search over grep or file reads when exploring code, debugging or asking where and why questions.

    402 GitHub stars~1.3k tokensUpdated 3 mo ago
    Agent WorkflowsAuto-check passed
  • Organize

    mcpware/cross-code-organizer

    Open the Cross-Code Organizer (CCO) dashboard — view and manage all memories, skills, MCP servers, hooks, and configs across scopes

    383 GitHub stars~246 tokensUpdated 4 days ago
    Agent WorkflowsAuto-check: notes

More from Mathews-Tom/armory

All 80 skills in this repo
  • Architecture Reviewer

    Mathews-Tom/armory

    Architecture reviews across 7 dimensions (structural, scalability, enterprise readiness, performance, security, ops, data) with scored reports.

    329 GitHub stars~4.6k tokensUpdated 5 days ago
    Auto-check passed
  • Concept To Image

    Mathews-Tom/armory

    Turn concepts into static HTML visuals exported as PNG or SVG files via HTML/CSS/SVG.

    329 GitHub stars~2.6k tokensUpdated 5 days ago
    Auto-check passed
  • Watch

    Mathews-Tom/armory

    A skill your agent uses when analyzing an existing video URL or local recording: "watch this video", "analyze youtube video", "summarize this video", "youtube transcript", "find this moment", "what…

    329 GitHub stars~2.8k tokensUpdated 5 days ago
    Auto-check passed
  • Code Refiner

    Mathews-Tom/armory

    Deep code simplification and refactoring preserving behavior across Python, Go, TypeScript, Rust.

    329 GitHub stars~3.1k tokensUpdated 5 days ago
    Auto-check passed
  • Concept To Video

    Mathews-Tom/armory

    Turn concepts into animated explainer videos using Manim (Python) with MP4/GIF output, audio overlay, multi-scene composition.

    329 GitHub stars~4.9k tokensUpdated 5 days ago
    Auto-check passed
  • Decision Map

    Mathews-Tom/armory

    Maps the unresolved architecture, policy, and scope decisions that must be answered before planning can start: one durable decision ticket per question on the issue tracker, typed and blocker-linked…

    329 GitHub stars~2.7k tokensUpdated 5 days ago
    Auto-check passed

Categories

Questions about MCP To Skill

What does MCP To Skill do?

Converts MCP servers into on-demand skills to cut context window usage, classifying each tool by replacement strategy and generating the skill package. MCP To Skill is an agent skill from Mathews-Tom/armory. Converts MCP servers into on-demand skills to cut context window usage, classifying each tool by replacement strategy and generating the skill package.

When should I use MCP To Skill?

MCP To Skill fits situations like: reduce context size; tool token bloat.

How do I install MCP To Skill in Claude Code?

Run `npx skills add Mathews-Tom/armory --skill mcp-to-skill -a claude-code`. Or copy the skill folder (skills/mcp-to-skill in Mathews-Tom/armory) into .claude/skills/mcp-to-skill in your project. Claude Code loads it when a task matches its description.

How do I install MCP To Skill in Codex?

Run `npx skills add Mathews-Tom/armory --skill mcp-to-skill -a codex`. Or copy the skill folder (skills/mcp-to-skill in Mathews-Tom/armory) into .agents/skills/mcp-to-skill in your project. Codex loads it when a task matches its description.

Can I use MCP To Skill in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Mathews-Tom/armory --skill mcp-to-skill -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mcp-to-skill, .gemini/skills/mcp-to-skill, .github/skills/mcp-to-skill and .opencode/skills/mcp-to-skill in your project.

What does MCP To Skill need to run?

Going by SKILL.md and its folder, MCP To Skill needs Python for the scripts in its folder and the command-line tools its instructions call (python3, npm and pip). Our summary lists: Python 3; Docker.

Does MCP To Skill access the network?

SKILL.md contains no URLs. Its commands use npm and pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is MCP To Skill safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does MCP To Skill use?

MCP To Skill is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does MCP To Skill use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 4.5k tokens, read only when the agent opens those files.

What are the alternatives to MCP To Skill?

Skills that share tags, products or a category with MCP To Skill: Context Mode Output Sandbox (mksglu/context-mode, 26k stars), Context Mode for Antigravity CLI (mksglu/context-mode, 26k stars), Lemmalog (JordyZomer/lemmalog, 329 stars) and Cortex Mem MCP (sopaco/cortex-mem, 313 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains MCP To Skill?

Mathews-Tom (a GitHub user) maintains it in Mathews-Tom/armory, which has 329 GitHub stars. The repository holds 80 skills in this directory. The repository was last updated on October 6, 2026.

Source: Mathews-Tom/armory on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.