content/skills/meta-skills/mcp-to-skill/SKILL.md
Convert MCP (Model Context Protocol) servers to Claude Code Skills. Use when: (1) User wants to convert an MCP server project to a skill (2) User mentions "MCP to skill", "convert MCP", "MCP 转 skill" (3) User has an MCP server codebase and wants to make it a reusable skill (4) User wants to analyze MCP server structure for skill creation (5) User says "MCP project is too hard to install" or "share MCP tools with others" (6) User wants to package MCP tools for non-technical users (7) User asks "how to distribute MCP tools" or "make MCP portable" Supports TypeScript/JavaScript and Python MCP servers. Handles Tools, Resources, and Prompts.
npx skillsauth add bahayonghang/my-claude-code-settings mcp-to-skillInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Convert MCP servers into Claude Code Skills for easier distribution and usage.
Run the analysis script to extract tool/resource/prompt definitions:
python3 scripts/analyze_mcp.py /path/to/mcp-project --pretty
The script outputs JSON with: tools, resources, prompts, mcp_sdks, dependencies.
For manual analysis, inspect these key files:
package.json / pyproject.toml — dependencies and entry pointsrc/index.ts / main.py — server setup, tool/resource/prompt registrationMap all three MCP primitives:
| MCP Primitive | Skill Equivalent |
|---------------|------------------|
| Tool | scripts/ executable or instruction section |
| Resource | references/ markdown file (static) or script (dynamic) |
| Prompt | Workflow instruction section in SKILL.md |
For the complete mapping table and conversion patterns, see references/MAPPING.md.
For each MCP tool, pick the right pattern:
scripts/tool_name.pyDecision: Can it run standalone? → A or B. Is it trivial? → B. Needs server state? → C.
For detailed pattern descriptions and examples, see references/MAPPING.md.
For real-world conversion case studies, see references/EXAMPLES.md.
{skill-name}/
├── SKILL.md # Core instructions
├── scripts/
│ └── {tool_name}.{ext} # Pattern A tool scripts
├── references/
│ └── {topic}.md # MCP Resources → reference docs
└── config/
└── secrets.example.md # Required env vars / API keys
---
name: {skill-name}
description: |
{Original MCP server description}. Use when:
(1) {Primary use case from tool descriptions}
(2) {Secondary use case}
---
# {Skill Name}
{Brief description}
## Prerequisites
{Setup: permissions, API keys, runtime requirements}
Required environment variables: (list from MCP server's .env / config)
## Tools
### {Tool Name}
{Description, usage, parameters, example}
config/secrets.example.md listing all required env vars with descriptionsreferences/MAPPING.md § "Secrets & Environment Variables" for patternsBefore packaging, run through this checklist:
name, description with triggers)references/ fileschmod +x) and tested standaloneconfig/secrets.example.md exists if env vars are neededTest the skill by:
development
Turn vague or complex Codex tasks into strong `/goal` commands with outcome, verification, constraints, boundaries, iteration policy, completion evidence, and pause/block conditions. Use when the user asks for Codex goal instructions, Goal 指令, 目标指令, `/goal` prompts, 中文 Goal 模板, plan-to-goal interviews, success criteria, verification commands, or bounded agent work definitions.
tools
Write, debug, and validate ast-grep structural code search rules. Use this skill when the user needs syntax-aware code search, AST pattern matching, structural refactor discovery, language-construct queries, or searches that plain text tools like rg can miss, such as finding functions with particular descendants, calls inside specific contexts, missing error handling, React hook shapes, decorators, or other Tree-sitter-backed code structures.
development
Use when the user asks to ground an ambitious proposal, avoid over-grand designs, make a bold direction executable, pressure-test feasibility, prevent "too much vision and too little landing", or turn a strategy/refactor/product idea into the smallest verifiable first move with stop rules. Trigger for requests such as 落地, 先落地, 别太飘, 收一收, 可执行, 可验证, 止损, and for follow-ups after geju-style big-picture thinking. Do not trigger for ordinary code review or implementation unless the user explicitly asks to ground or shrink the plan first.
development
Use when the user explicitly asks to think bigger, open up the design space, challenge conservative design, avoid over-indexing on backward compatibility, escape local-detail fixation, or make a bold high-level product or architecture direction call. Use for strategic reframing, not for ordinary code review, PRD writing, implementation planning, or adversarial risk review.