Skip to main content

OpenAPI to MCP logo

OpenAPI → MCP Server

CI PyPI version PyPI downloads per month License

Standalone CLI for diagnosing, diffing, generating, running, and testing Node.js/TypeScript MCP servers from OpenAPI specifications.

Install

Install openapi-to-mcp-cli from PyPI. Requires Python 3.14+; building and running generated servers also requires Node.js 22+ and npm.

uv tool install openapi-to-mcp-cli
openapi-to-mcp --help

The installed command remains openapi-to-mcp. For one-off use:

uvx --from openapi-to-mcp-cli openapi-to-mcp --help

See the installation guide for upgrades, tagged Git installs, and release artifacts.

Quickstart

Generate a reusable project:

openapi-to-mcp generate \
  --openapi-json ./openapi.yaml \
  --output-dir ./generated-server

Run directly from a spec:

openapi-to-mcp run \
  --openapi-json https://petstore3.swagger.io/api/v3/openapi.json \
  --target-api-base-url https://petstore3.swagger.io/api/v3

Smoke-test a running server:

openapi-to-mcp test-server \
  --transport streamable-http \
  --host 127.0.0.1 \
  --port 8080 \
  --mcp-endpoint /mcp \
  --list-tools

Documentation

Public product documentation lives on GitHub Pages:

Current capabilities

  • stdio and streamable-http generation targets
  • spec-readiness diagnostics with doctor
  • MCP-surface comparison with diff
  • repeatable generation policy with mcpgen.yaml
  • regeneration-safe custom tools via src/custom/tools.ts
  • richer generated tool descriptions and input examples from spec metadata
  • optional grouped tool names with first-tag prefixes
  • optional request-scoped tool allowlists for streamable-http callers
  • optional redacted audit logs for request and response payloads
  • optional retry budgets and circuit breakers for safe upstream calls
  • reviewable performance presets built on top of the explicit runtime controls
  • strict mode by default with generation_report.json
  • generated auth env mapping for apiKey, bearer, OAuth2, and OpenID Connect
  • generated runtime controls for concurrency, queueing, timeout, bounded caching, rate limiting, retries, and circuit breakers
  • generated-server E2E coverage against a local mock API
  • CLI E2E coverage for generate, run, and test-server
  • version-aware PyPI and GitHub Releases automation on master

Swagger 2 support

Swagger 2 response-only operations and base URL fields are supported. Convert operations that use Swagger 2 body or form parameters, top-level parameter types, security definitions, or unsupported protocol overrides to OpenAPI 3 before generating. Run openapi-to-mcp doctor to identify the affected operation and field.

OpenAPI compatibility

Common OpenAPI 3.x input is accepted, but this does not imply full OpenAPI 3.x conformance. The currently tested compatibility surface is:

OpenAPI version Fixed HTTP operations OpenAPI 3.2 additionalOperations OpenAPI 3.2 QUERY in: querystring parameters
3.0.4 Supported Not applicable Not applicable Not applicable
3.1.2 Supported Not applicable Not applicable Not applicable
3.2.1 Supported Uppercase HTTP tokens supported; reserved, invalid, mixed-case and CONNECT methods diagnosed Supported Supported for URL-encoded form, JSON, and text; see supported subset

Regenerating servers can change URL-encoded body field names from earlier bracketed forms such as tags[] and object[key]. Check affected endpoints before regeneration; see the migration guide.

Use openapi-to-mcp doctor before generation to identify constructs outside this surface. The generated MCP outputSchema remains object-shaped.

Development

For repository-local workflows, use the repo docs directly:

License

Apache License 2.0. See LICENSE.

Metadata

Release files for openapi-to-mcp-cli 0.14.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openapi-to-mcp-cli 0.14.0
File Size Uploaded Provenance Actions
openapi_to_mcp_cli-0.14.0.tar.gz 343.6 kB With provenance Details for openapi_to_mcp_cli-0.14.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for openapi-to-mcp-cli 0.14.0
File Interpreter ABI Platform Actions
openapi_to_mcp_cli-0.14.0-py3-none-any.whl Python 3 none any Details for openapi_to_mcp_cli-0.14.0-py3-none-any.whl

Total release size: 506.6 kB

Release files / openapi_to_mcp_cli-0.14.0.tar.gz

Download URL openapi_to_mcp_cli-0.14.0.tar.gz
Size 343.6 kB
Tags Source
SHA-256 checksum
How to use checksums
aca6898c3f38fe6e1137700b91831ce55b2966c74c5beb0171139db536d258c9
BLAKE2b-256 checksum
How to use checksums
60b299ce8a253990dacf9ad81f509e9b1c506c696290c6d746d3b1229c14f1ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

Release files / openapi_to_mcp_cli-0.14.0-py3-none-any.whl

Download URL openapi_to_mcp_cli-0.14.0-py3-none-any.whl
Size 163.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dcb3f60e317456db8b96a315aea754dcadba1e20c2b5068b657ea79e9243c6a2
BLAKE2b-256 checksum
How to use checksums
cbae986cf04ee37ef95b8cc3fc81264bd89e2b20a53af647d6cc751ec3865bcd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

Security for openapi-to-mcp-cli 0.14.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for openapi_to_mcp_cli-0.14.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page