loading…
Search for a command to run...
loading…
Converts SKILL.md documents into MCP-ready tool definitions and generates a deployable MCP server package.
Converts SKILL.md documents into MCP-ready tool definitions and generates a deployable MCP server package.
License: MIT License: Apache 2.0 Language

skill2mcp is a TypeScript CLI/library that converts SKILL.md documents into MCP-ready tool definitions and can generate a minimal deployable MCP Server package from a single file or an entire skills directory.
The generated server uses the official MCP TypeScript SDK (@modelcontextprotocol/sdk) and supports stdio, http, or both transports.
SKILL documents are usually semi-structured markdown (frontmatter + prose + tables). MCP tools require strict contracts (name, description, inputSchema).
skill2mcp bridges that gap with a layered pipeline:
MVP implemented and working:
strict, tolerant)semantic) for missing metadata fallbackSchemaBuilder, ToolMapper, ToolValidator)inspect output with MCP-style tool JSONbuild output with deployable MCP server packagestdio + httpbuild --watch for iterative regenerationnpm install
npm run build
npm run parse -- ./fixtures/skills/valid-skill.md --mode strict
npm run inspect -- ./fixtures/skills --mode tolerant
npm run gen -- ./fixtures/skills --out ./generated/mcp-server --transport both --mode tolerant
cd ./generated/mcp-server
npm install
npm run build
npm run start:stdio
# or
npm run start:http
HTTP endpoint:
POST /mcp
parseConverts SKILL markdown to IR JSON.
skill2mcp parse <input> [--mode strict|tolerant|semantic]
Arguments:
<input>: path to a .md file or directoryOptions:
--mode: parser mode (tolerant default)--format: currently jsonOutput:
results[] with parsed SkillDocumentdiagnostics[] per source fileinspectConverts parsed IR into MCP-like tool definitions.
skill2mcp inspect <input> [--mode strict|tolerant|semantic]
Output:
tools[]: generated tool definitions (name, description, inputSchema)results[]: tool + diagnostics per sourcebuildGenerates a deployable MCP server package from one or many skills.
skill2mcp build <input> --out <dir> [--transport stdio|http|both] [--mode strict|tolerant|semantic] [--watch]
Arguments:
<input>: path to a .md file or directoryRequired options:
--out: output directory for generated packageOptional options:
--transport: default generated server transport (both default)--mode: parsing mode (tolerant default)--watch: regenerate package on source changesOutput:
package.json, tools.json, src/server.ts, handlers)stricttolerantsemanticSEMANTIC_* codes)semanticEnvironment variables:
OPENROUTER_API_KEY: enables remote semantic extractionOPENROUTER_MODEL (optional): defaults to anthropic/claude-3.5-sonnetSKILL2MCP_CACHE_DIR (optional): override cache directoryOPENROUTER_HTTP_REFERER (optional): forwarded as OpenRouter headerOPENROUTER_X_TITLE (optional): forwarded as OpenRouter headerCache behavior:
.skill2mcp-cache/semantic-openrouter-cache.jsonSKILL.md format (recommended)---
name: docx-generator
version: 1.0.0
description: Generate Word docs from structured markdown
tags: [documents, office]
---
## Parameters
| Name | Type | Required | Default | Description |
|------|------|----------|---------|-------------|
| content | string | yes | | Markdown content |
| title | string | yes | | Document title |
## Examples
**Input:** `{ content: "# Hello", title: "Report" }`
**Output:** report.docx generated at /outputs/
## Triggers
- "generate document"
- "create report"
generated/mcp-server/
package.json
tsconfig.json
README.md
tools.json
src/
server.ts
generated-tools.ts
handlers/
index.ts
<tool_name>.ts
npm run build # compile TypeScript
npm run test # run test suite
npm run parse # parse command entry
npm run inspect # inspect command entry
npm run gen # build command entry
Current automated coverage includes:
strict, tolerant, semantic)AGENTS.mdROADMAP.md[AI] prefix when AI-generatedThis repo includes:
MIT OR Apache-2.0CHANGELOG.mdCONTRIBUTING.mdRELEASE_CHECKLIST.mdGOVERNANCE.mdCODE_OF_CONDUCT.mdSECURITY.mdSUPPORT.md## ParametersThe active implementation follows phased delivery in ROADMAP.md.
GenAI integration policy (when enabled) prioritizes OpenRouter as default provider strategy, as defined in roadmap directives.
Licensed under either of:
LICENSE-MIT)LICENSE-APACHE)at your option.
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"skill2mcp": {
"command": "npx",
"args": []
}
}
}