Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

mcp-server-builder

БесплатноЗапускает вложенные скриптыНе проверен

Builds MCP servers: OpenAPI-to-tool conversion, tool and schema linting, TypeScript or Python scaffolds, transports. Use when exposing an API to AI agents…

borgheiот borghei★ 1 250 звёзд на GitHub

Об этом скилле

MCP Server Builder

The agent designs and ships MCP (Model Context Protocol) servers whose tools an agent picks correctly and calls safely: verb_noun names, descriptions that say when to use the tool and what it returns, typed inputs, paginated lists and gated destructive actions. Schema quality is the main lever: the model chooses tools from names and descriptions alone.

When to Use

  • Exposing an internal REST API to Claude, Cursor or another MCP client.
  • Converting an OpenAPI spec into MCP tools, then fixing what the conversion gets wrong.
  • Replacing brittle browser automation with typed tool interfaces.
  • Reviewing an existing server's tool definitions before release.

Clarify First

Before building the server, settle the inputs below. When one is missing or vague and would change the result, ask about it; when it wouldn't, use a sensible default and say which one you used.

  • Source contract: an OpenAPI spec, an existing API, or tools designed from scratch.
  • Language: TypeScript (@modelcontextprotocol/sdk) or Python (mcp).
  • Transport: stdio for local tools, Streamable HTTP for remote or shared servers (HTTP+SSE only for legacy clients).

Ask about the two or three inputs that matter most for this request, not the whole list. If the user wants a result straight away, produce it and state your assumptions at the top.

Workflow

  1. Get tool definitions. From a spec: openapi_converter.py spec.json -o tools.json (add --filter GET,POST, --exclude '/internal/*', --prefix). From scratch: write {"tools": [...]} by hand using references/tool-schema-design.md.
  2. Lint naming, descriptions and schemas with tool_linter.py tools.json. Fix every error; rewrite descriptions to say when to use the tool and what it returns.
  3. Lint interaction design with tool_schema_linter.py tools.json: add pagination to list tools, a confirm or dry_run gate to destructive ones, arrays where calls are naturally repeated.
  4. Scaffold the server with server_scaffolder.py tools.json --lang typescript|python --output <dir>, then implement each handler from references/server-implementation.md.
  5. Test with MCP Inspector and the checks in references/testing-and-troubleshooting.md.
  6. Done when both linters exit 0 with --strict, every handler returns structured errors instead of throwing, and the Inspector lists and calls every tool.

Quick Start

# from engineering/mcp-server-builder/; write output outside the repo
OUT=$(mktemp -d)
python3 scripts/openapi_converter.py assets/sample_openapi.json --prefix tasks -o "$OUT/tools.json"
python3 scripts/tool_linter.py "$OUT/tools.json"                # exit 0: no errors, 2 usage-guidance warnings
python3 scripts/tool_schema_linter.py "$OUT/tools.json"         # exit 1: delete has no confirm gate
python3 scripts/server_scaffolder.py "$OUT/tools.json" --lang python --output "$OUT/server" --dry-run
python3 scripts/tool_linter.py assets/flawed_tools.json         # exit 1: camelCase name, 1-char description, untyped property
python3 scripts/tool_schema_linter.py assets/flawed_tools.json  # exit 1: unpaginated list, ungated delete

Tools Overview

Tool Purpose Key flags Exit codes
scripts/openapi_converter.py OpenAPI 3.x / Swagger 2.0 JSON to MCP tool definitions ({"tools": [...]}), operationId to snake_case spec, -o, --prefix, --filter GET,POST, --exclude GLOB, --no-source, --json 0 converted; 2 missing or invalid spec
scripts/tool_linter.py Naming (snake_case, verb_noun), description length and guidance, property types and descriptions file, --path, --strict, --json 0 no errors (or no warnings with --strict); 1 issues; 2 unreadable input
scripts/tool_schema_linter.py Interaction smells: list tools without pagination, destructive tools without a gate, chatty single-item tools, unconstrained inputs file, --path, --strict, --json 0 no warnings; 1 smells found; 2 unreadable input
scripts/server_scaffolder.py TypeScript or Python server skeleton with one handler stub per tool config, --lang, --output, --dry-run, --json 0 generated; 2 invalid config

The linters accept a bare tool, a tool array, or a {"tools": [...]} wrapper (converter output); use --path for other nesting. The scaffolder takes the converter output directly and derives the server name from the spec title when name is absent. Run both linters: they check different things.

Anti-Patterns

Mistake: Shipping the converter output as is. Why it matters: OpenAPI summaries describe endpoints, not when an agent should call them, so the model picks the wrong tool or none. Instead: Rewrite each description with a "Use when ..." clause and what it returns, then re-lint

Полный SKILL.md на GitHub

Установить mcp-server-builder в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

assets/flawed_tools.jsonassets/sample_openapi.jsonreferences/server-implementation.mdreferences/streaming-batch-and-computer-use.mdreferences/testing-and-troubleshooting.mdreferences/tool-schema-design.mdreferences/transport-and-deployment.mdscripts/openapi_converter.pyscripts/server_scaffolder.pyscripts/tool_linter.pyscripts/tool_schema_linter.py

FAQ

Что делает скилл mcp-server-builder?

Builds MCP servers: OpenAPI-to-tool conversion, tool and schema linting, TypeScript or Python scaffolds, transports. Use when exposing an API to AI agents, building a tool server, or reviewing MCP tool definitions.

Как установить скилл mcp-server-builder?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл mcp-server-builder запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить mcp-server-builder с