Agent skill · DevOps & Cloud

openapi-to-mcp

Build and deploy an MCP server from an OpenAPI / Swagger spec using the mcp-use TypeScript SDK. Use this skill whenever the user wants to "turn this OpenAPI spec into an MCP server", "make this API usable from Claude/ChatGPT", "wrap this Swagger doc as MCP tools", "expose this REST API to an LLM", "generate MCP tools from a spec", or pastes/attaches an `openapi.yaml`, `openapi.json`, or `swagger.json` and asks for a Claude-compatible version. Trigger even if the user doesn't say "MCP" — if they describe an existing HTTP API (REST endpoints, an internal service, a third-party API they have a ke

Manufact10,409★ · +73/wk · 1 repos on radarProfile →
claude-codeMIT
Install
npx skills add mcp-use/mcp-use --skill openapi-to-mcp --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 7
SKILL.md size: 20 KB
Bundled scripts: none
Path: skills/openapi-to-mcp/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 10,446 · +37 this week
Language: TypeScript
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Build an MCP server from an OpenAPI spec Turn an existing REST API — described by an OpenAPI 3.x or Swagger 2.0 document — into an MCP server. Each operation in the spec becomes one MCP tool the LLM can call. The server runs locally for testing and ships to Manufact / mcp-use cloud with one command. This skill is the end-to-end recipe: scope → ingest spec → map operations → scaffold → generate tools → wire auth → test → deploy. ## Core philosophy: the spec is the contract The OpenAPI document is the source of truth. Tool names, descriptions, parameter shapes, and auth requirements all come from the spec — they should not be invented. This matters because: - **The LLM trusts descriptions.** If the spec says `summary: "Get current weather for a city"`, that's exactly what the LLM will read when deciding whether to call the tool. Hand-rolled summaries drift; spec-derived summaries stay in sync if the API changes. - **Zod schemas mirror OpenAPI schemas.** Every parameter — path, query, body — becomes a field in one zod object. Required/optional, enums, min/max, and descriptions all carry over. The LLM uses the schema to figure out what to ask the user for. - **Auth lives outside the

What's inside
Steps it walks through
  1. Core philosophy: the spec is the contract
  2. Process
  3. 1. Scope the request (use AskUserQuestion)
  4. 2. Acquire and dereference the spec
  5. 3. Scaffold with create-mcp-use-app
  6. 4. Plan project structure
  7. 5. Map operations to tools
  8. 6. Generate the zod schemas
  9. 7. Build the HTTP client and auth layer
  10. 8. Wire tools in index.ts
  11. 9. Test the server
  12. 10. Deploy (ask the user)
  13. 11. Ship checklist
  14. Critical reference material
Ships with 6 files
  • LICENSE.txt
  • references/auth.md
  • references/code-templates.md
  • references/deploy.md
  • references/mapping-rules.md
  • references/testing.md
Commands it runs
In the scaffolded project root
npm install @apidevtools/swagger-parser
Tools-only (the default for an OpenAPI wrapper)
npx create-mcp-use-app@latest <project-name> --template blank
Any widgets at all
npx create-mcp-use-app@latest <project-name> --template mcp-apps
cd <project-name>
npm install @apidevtools/swagger-parser dotenv
npm run dev
Save the dev server under a short name
More from mcp-use
All skills →
About this skill
What does the openapi-to-mcp skill do?

Build and deploy an MCP server from an OpenAPI / Swagger spec using the mcp-use TypeScript SDK. Use this skill whenever the user wants to "turn this OpenAPI spec into an MCP server", "make this API usable from Claude/ChatGPT", "wrap this Swagger doc as MCP tools", "expose this REST API to an LLM", "generate MCP tools from a spec", or pastes/attaches an `openapi.yaml`, `openapi.json`, or `swagger.json` and asks for a Claude-compatible version. Trigger even if the user doesn't say "MCP" — if they describe an existing HTTP API (REST endpoints, an internal service, a third-party API they have a ke

How do I install it?

Run `npx skills add mcp-use/mcp-use --skill openapi-to-mcp --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From mcp-use/mcp-use, a repository with 10,446 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going