openapi-mcp

Turns an OpenAPI 3.x specification into a working Model Context Protocol server, exposing the generated tools over Streamable HTTP for any MCP client with no glue code.
openapi-mcp turns an OpenAPI 3.x specification into a working MCP (Model
Context Protocol) server. The generated tools are exposed over Streamable HTTP
at /mcp, ready for any MCP client such as Claude Desktop, Postman, or a
custom one. A bundled web UI lets you paste or upload a spec and try the
generated tools against the real backend without writing any glue code.
This is the project behind my DeveloperWeek talk, "From OpenAPI Spec to MCP Server."
Modules
- openapi-mcp-core: a pure conversion library with no Spring or MCP runtime dependency, so the spec-to-tools logic can be embedded anywhere.
- openapi-mcp-server: a Spring Boot 3 starter that publishes the generated tools over MCP.
- openapi-mcp-gradle-plugin: a build-time task that produces a tool catalogue report from a spec.
- demo-petstore: a demo Spring Boot app that proxies the public Swagger Petstore so the flow can be tried end to end.
Why it matters
Every service with an OpenAPI spec is one step away from being agent-callable. By deriving the tool surface directly from the approved spec, the agent's capabilities stay in sync with the real API contract instead of drifting into hand-written, out-of-date tool definitions.
