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
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.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# 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
- Core philosophy: the spec is the contract
- Process
- 1. Scope the request (use AskUserQuestion)
- 2. Acquire and dereference the spec
- 3. Scaffold with create-mcp-use-app
- 4. Plan project structure
- 5. Map operations to tools
- 6. Generate the zod schemas
- 7. Build the HTTP client and auth layer
- 8. Wire tools in index.ts
- 9. Test the server
- 10. Deploy (ask the user)
- 11. Ship checklist
- Critical reference material
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
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.