openapi-to-mcp
From mcp-use
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 key for) and want an LLM to call it, this is the right skill. Covers spec ingestion (file path, URL, or pasted), operation-to-tool mapping, auth wiring (apiKey, bearer, basic, OAuth bearer), scaffolding with `create-mcp-use-app`, tool generation with proper zod schemas, live testing in the mcp-use inspector, and deploying to Manufact / mcp-use cloud.
Generates an MCP server (mcp-use TypeScript SDK) with one tool per operation in a given OpenAPI/Swagger spec.
Use it when
- Converting an existing OpenAPI 3.x or Swagger 2.0 doc into MCP tools
- Wiring apiKey/bearer/basic/OAuth auth from a spec's securitySchemes
- Scaffolding a project via create-mcp-use-app and testing in the mcp-use inspector
- Deploying the resulting server to Manufact / mcp-use cloud
Skip it if
- Requires the mcp-use TypeScript SDK and Node tooling specifically
- No OpenAPI/Swagger spec exists yet to drive tool generation
- Want widgets on most operations — build-mcp-app skill is a better fit then
Facts
- Repository
- mcp-use/mcp-use
- Status
- Actively maintained
- Last commit
- Source file
- skills/openapi-to-mcp/SKILL.md
Source preview
The instructions Claude Code reads when this skill runs.
# 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 spec.** OpenAPI declares the auth scheme but never the secret. Secrets come from env vars; the spec tells you which env vars to require.
When in doubt, prefer mechanical fidelity to the spec oveView full source on GitHub →Other skills
django-tdd
★ 229,918Django testing strategies with pytest-django, TDD methodology, factory_boy, mocking, coverage, and testing Django REST Framework APIs.
affaan-mupdated 14d agoMITclickhouse-io
★ 229,918ClickHouse database patterns, query optimization, analytics, and data engineering best practices for high-performance analytical workloads.
affaan-mupdated 14d agoMITlaravel-patterns
★ 229,918Patrones de arquitectura Laravel, routing/controladores, Eloquent ORM, capas de servicio, colas, eventos, caché y API resources para aplicaciones en producción.
affaan-mupdated 14d agoMITverification-loop
★ 229,918Sistema de verificación completo para sesiones de Claude Code.
affaan-mupdated 14d agoMITstrategic-compact
★ 229,918Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction.
affaan-mupdated 14d agoMITfrontend-patterns
★ 229,918Patrones de desarrollo frontend para React, Next.js, gestión de estado, optimización de rendimiento y buenas prácticas de UI.
affaan-mupdated 14d agoMIT