mcp2skill
mcp2skill converts Model Context Protocol (MCP) Server tool definitions into structured Skill format documentation. Use it to generate a SKILL.md overview document and individual tool detail files by connecting to an MCP Server via Streamable HTTP or SSE endpoints, with support for API key authentication and custom headers.
git clone --depth 1 https://github.com/UnicomAI/wanwu /tmp/mcp2skill && cp -r /tmp/mcp2skill/configs/microservice/bff-service/configs/agent-skills/wanwu/mcp2skill ~/.claude/skills/mcp2skillSKILL.md
# mcp2skill
使用mcp2skill命令(已内置)将 MCP Server 的工具定义转换为 Skill 格式,生成 SKILL.md 概览和每个工具的详情文档。
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `streamableUrl` | string | Conditional | MCP Server Streamable HTTP 端点 URL(与 sseUrl 至少填一个) |
| `sseUrl` | string | Conditional | MCP Server SSE 端点 URL(与 streamableUrl 至少填一个) |
| `name` | string | No | Skill 名称,留空时从工具列表自动推断 |
| `description` | string | No | Skill 描述,留空时自动生成 |
| `transport` | string | No | 传输类型:`streamable`(默认)或 `sse` |
| `output` | string | No | 输出目录,默认当前目录 |
| `timeout` | string | No | 连接超时时间,默认 30s |
| `apiAuth` | object | No | API 认证配置 |
| `headers` | object | No | 自定义 HTTP 请求头,键值对格式 |
### `apiAuth` Properties
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `apiAuth.authType` | string | No | 认证类型:`none`(默认)、`api_key_query`(URL 参数)、`api_key_header`(请求头) |
| `apiAuth.apiKeyQueryParam` | string | No | URL 查询参数名(authType 为 api_key_query 时使用,如 `key`) |
| `apiAuth.apiKeyValue` | string | No | API Key 值(连接时使用,生成输出中会被替换为占位符) |
| `apiAuth.apiKeyHeader` | string | No | 请求头名称(authType 为 api_key_header 时使用,默认 `Authorization`) |
| `apiAuth.apiKeyHeaderPrefix` | string | No | 请求头前缀:`bearer`、`basic` 或自定义 |
## Example
### 通过 streamable URL 转换
```bash
mcp2skill name=天气查询 streamableUrl=http://192.168.0.21:8081/mcp/server/streamable?key=xxx description="查询天气" output=./skills
```
### 通过 SSE URL 转换
```bash
mcp2skill name=地图服务 sseUrl=http://192.168.0.21:8081/mcp/server/sse transport=sse description="地图服务" output=./skills
```
### 使用 API Key 查询参数认证
```bash
mcp2skill name=天气查询 streamableUrl=http://example.com/mcp/server/streamable description="查询天气" 'apiAuth={"authType":"api_key_query","apiKeyQueryParam":"key","apiKeyValue":"my-secret-key"}'
```
### 使用请求头认证(Bearer Token)
```bash
mcp2skill name=天气查询 streamableUrl=http://example.com/mcp/server/streamable description="查询天气" 'apiAuth={"authType":"api_key_header","apiKeyHeaderPrefix":"bearer","apiKeyValue":"my-token"}'
```
### 使用自定义请求头
```bash
mcp2skill name=天气查询 streamableUrl=http://example.com/mcp/server/streamable description="查询天气" 'headers={"X-Custom-Header":"value"}'
```
### 输出结构
转换成功后,在输出目录下生成:
```
{output}/{skillName}/
├── SKILL.md # Skill 入口概览
├── scripts/
│ └── mcp_client.py # 自动生成的 MCP Python 客户端
└── references/
└── operations/ # 每个工具一个详情文件
└── {tool-name}.md
```万悟平台 SSE 子会话递归嵌套与三明治序列渲染架构指南。涵盖 parentId 领养、order 绝对排序、动静 Chunk 分层及 Vue 2 响应式引用协议。
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.
Build apps with the Claude API or Anthropic SDK. TRIGGER when: code imports `anthropic`/`@anthropic-ai/sdk`/`claude_agent_sdk`, or user asks to use Claude API, Anthropic SDKs, or Agent SDK. DO NOT TRIGGER when: code imports `openai`/other AI SDK, general programming, or ML/data-science tasks.
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.