Ts Mcp To Skill banner
larkinwc larkinwc

Ts Mcp To Skill

Development community

Description

Convert any MCP server into a Claude Skill with 90% context savings (using TypeScript)

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

mcp-to-skill

[![npm](https://img.shields.io/npm/v/mcp-to-skill)](https://www.npmjs.com/package/mcp-to-skill) [![CI](https://github.com/larkinwc/ts-mcp-to-skill/actions/workflows/ci.yml/badge.svg)](https://github.com/larkinwc/ts-mcp-to-skill/actions/workflows/ci.yml)

Convert MCP servers to Agent Skills with progressive disclosure instead of preloading every tool definition.

Requirements

  • Node.js 22.12 or newer
  • npm or npx

Generate a skill

Create an MCP configuration. Environment references are resolved when the generated skill runs, so secrets do not need to be copied into the skill:

{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_TOKEN": "${GITHUB_TOKEN}"
      }
    }
  }
}

Generate the skill:

npx -y mcp-to-skill generate \
  --mcp-config github-mcp.json \
  --output-dir ./skills/github

Copy it to the skills directory used by your agent:

cp -r ./skills/github ~/.claude/skills/

Generated files:

skills/github/
├── SKILL.md
├── mcp-config.json
└── tools.json

`tools.json` is a reviewable tool-schema snapshot used by offline generation and refresh.

Execute tools safely

Write the complete call payload to a JSON file rather than interpolating user-controlled values into a shell command:

{
  "tool": "search_repositories",
  "arguments": {
    "query": "language:typescript mcp"
  }
}
npx -y mcp-to-skill exec \
  --config "./skills/github/mcp-config.json" \
  --call-file "./call.json"

Standard input is also supported:

npx -y mcp-to-skill exec \
  --config "./skills/github/mcp-config.json" \
  --call-stdin < "./call.json"

Other executor operations:

npx -y mcp-to-skill exec --config "./skills/github/mcp-config.json" --list
npx -y mcp-to-skill exec --config "./skills/github/mcp-config.json" --describe search_repositories

The legacy `--call '