跳到主要内容
知仓学习社ZHICANG

mcp-server-builder

Design and ship production-ready MCP (Model Context Protocol) servers from OpenAPI contracts instead of hand-written tool wrappers. Python and TypeS…

不碰外部(只输出文字)无严重或高危命中alirezarezvani/claude-skills

它会碰到什么

扫了多少9 个文本文件,26 KB
它会碰到什么不碰外部(只输出文字)
命中总数1 处
命中统计严重 0 · 高 0 · 中 0 · 低 0

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

MCP Server Builder

Tier: POWERFUL · Category: Engineering · Domain: AI / API Integration

Overview

Use this skill to design and ship production-ready MCP servers from API contracts instead of hand-written one-off tool wrappers. It focuses on fast scaffolding, schema quality, validation, and safe evolution.

The workflow supports both Python and TypeScript MCP implementations and treats OpenAPI as the source of truth.

Core Capabilities

  • Convert OpenAPI paths/operations into MCP tool definitions
  • Generate starter server scaffolds (Python or TypeScript)
  • Enforce naming, descriptions, and schema consistency
  • Validate MCP tool manifests for common production failures
  • Apply versioning and backward-compatibility checks
  • Separate transport/runtime decisions from tool contract design

When to Use

  • You need to expose an internal/external REST API to an LLM agent
  • You are replacing brittle browser automation with typed tools
  • You want one MCP server shared across teams and assistants
  • You need repeatable quality checks before publishing MCP tools
  • You want to bootstrap an MCP server from existing OpenAPI specs

Key Workflows

1. OpenAPI to MCP Scaffold

  1. Start from a valid OpenAPI spec.
  2. Generate tool manifest + starter server code.
  3. Review naming and auth strategy.
  4. Add endpoint-specific runtime logic.
python3 scripts/openapi_to_mcp.py \
  --input openapi.json \
  --server-name billing-mcp \
  --language python \
  --output-dir ./out \
  --format text

Supports stdin as well:

cat openapi.json | python3 scripts/openapi_to_mcp.py --server-name billing-mcp --language typescript

2. Validate MCP Tool Definitions

Run validator before integration tests:

python3 scripts/mcp_validator.py --input out/tool_manifest.json --strict --format text

Checks include duplicate names, invalid schema shape, missing descriptions, empty required fields, and naming hygiene.

3. Runtime Selection

  • Choose Python for fast iteration and data-heavy backends.
  • Choose TypeScript for unified JS stacks and tighter frontend/backend contract reuse.
  • Keep tool contracts stable even if transport/runtime changes.

4. Harden for Production

Key items before publishing:

  • Keep secrets in env vars, not tool schemas
  • Prefer outbound host allowlists over open proxies
  • Use additive-only changes; never rename tool names in-place

Full hardening guidance: [references/production-hardening-guide.md](references/production-hardening-guide.md).

Script Interfaces

  • python3 scripts/openapi_to_mcp.py --help
  • Reads OpenAPI from stdin or --input
  • Produces manifest + server scaffold
  • Emits JSON summary or text report
  • python3 scripts/mcp_validator.py --help
  • Validates manifests and optional runtime config
  • Returns non-zero exit in strict mode when errors exist

Reference Material

  • [references/production-hardening-guide.md](references/production-hardening-guide.md) — auth & safety design, versioning strategy, common pitfalls, best practices, architecture decisions, contract quality gates, testing strategy, deployment practices, security controls
  • [references/openapi-extraction-guide.md](references/openapi-extraction-guide.md)
  • [references/python-server-template.md](references/python-server-template.md)
  • [references/typescript-server-template.md](references/typescript-server-template.md)
  • [references/validation-checklist.md](references/validation-checklist.md)
  • [README.md](README.md)

想直接用这个技能?

本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。

它属于哪个仓库

星标★ 26,030
本站分层T1
该仓技能数846
原文件路径engineering/skills/mcp-server-builder/SKILL.md

同一个仓库里的其他技能

看这个仓库的全部 846 个技能

同名技能的其他版本

有 2 个不同仓库或目录里都有叫 mcp-server-builder 的技能。它们内容并不相同,别混用: