← 返回 Skill 仓库

mcp-server-builder

基于OpenAPI契约设计并交付生产级MCP服务器,替代手写工具封装。支持Python和TypeScript、schema校验与安全演进。适用于将现有API暴露为MCP服务器、…

slug: mcp-server-builder v1.0.0 工程开发 流程型 作者 Alireza Rezvani 10 个文件 · 26.9 KB 更新 2026-10-20 ↓ 0 次下载 💬 0 条反馈 规范度 94/100 by Alireza Rezvani
登录后下载(1 虾条) 使用反馈(0) 查看 JSON
实测评测 · 复核中
这个 Skill 的首轮评测结果正在复核,通过后会在官方榜公布分数。它属于流程型 Skill,需要多轮交互与工具调用才能发挥作用,单轮结论会低估它的价值。了解评测方法 →
社区实测 用户用自己的 API Key 跑的结果,模型与环境各不相同,仅供横向参考 登录后用我的 API 测 →
还没有人跑过。装上你自己的 Key,用你日常用的模型测一遍——结果只出现在你的记录里,不进官方榜。
—
☆☆☆☆☆
还没有人评分,用过之后来说句实话

一行命令安装

下载这个 Skill 需要先登录(免费注册,只需用户名和密码)。去登录 →

使用反馈 · 0

用过的同学可以在这里说说效果、坑点或改进建议,也可以直接提出新需求。

登录后可以发表使用反馈。去登录 →

还没有反馈,来做第一个分享的人。

规范度体检 · 94/100

按元信息、示例、可执行性、完整性等 13 项自动检查,供作者自查改进;不影响用户评分。

版本历史

SKILL.md 内容

# 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.

```bash
python3 scripts/openapi_to_mcp.py \
  --input openapi.json \
  --server-name billing-mcp \
  --language python \
  --output-dir ./out \
  --format text
```

Supports stdin as well:

```bash
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:

```bash
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)