Skip to main content

Generate MCP servers from OpenAPI specs, in multiple target languages (Python, TypeScript, ...)

Project description

openapi2mcp-py

openapi2mcp is a Python CLI that converts an OpenAPI specification into a runnable MCP server project.

Features

  • Generates MCP server projects from OpenAPI specs.
  • Supports multiple target languages.
  • Produces tool definitions from OpenAPI operations.
  • Carries over auth/environment configuration into generated projects.

Supported Targets

  • python - FastMCP-based Python server
  • typescript - MCP TypeScript SDK server
  • csharp - MCP C# SDK server
  • java - official MCP Java SDK server (stdio)
  • java-spring - Spring Boot + Spring AI MCP server

Installation

pip install -e .

Usage

Generate a server project from an OpenAPI file:

python -m openapi2mcp.cli generate tests/fixtures/petstore.yaml --lang python --output ./out-py

List supported languages:

python -m openapi2mcp.cli list-languages

Notes

  • The generated output directories are auto-generated and can be regenerated at any time.
  • Use java when you want the official MCP Java SDK runtime.
  • Use java-spring only when you explicitly want Spring AI integration.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openapi2mcp_py-0.2.1.tar.gz (27.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

openapi2mcp_py-0.2.1-py3-none-any.whl (47.5 kB view details)

Uploaded Python 3

File details

Details for the file openapi2mcp_py-0.2.1.tar.gz.

File metadata

  • Download URL: openapi2mcp_py-0.2.1.tar.gz
  • Upload date:
  • Size: 27.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openapi2mcp_py-0.2.1.tar.gz
Algorithm Hash digest
SHA256 28741466814cb41671a14f706498122b4795f8188da36b2928422e88a406b468
MD5 46dace4ee4697c4a24fabfef50d2d9d6
BLAKE2b-256 a09ae9095ca4afa6276da27cd1b3e561fe797c66f4431527d89f952202060d65

See more details on using hashes here.

Provenance

The following attestation bundles were made for openapi2mcp_py-0.2.1.tar.gz:

Publisher: publish.yml on OrgBloch/openapi2mcp-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openapi2mcp_py-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: openapi2mcp_py-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 47.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openapi2mcp_py-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 03c1f6bcb428a5b12b1572826a98f319bfc09575a9d41da1830e594455831c64
MD5 ca9b30ac33b66802f026bb2887a64fbc
BLAKE2b-256 d6fb831911355056376d1cb98ca992e4f391001a07a15e6ac348745427b42cf0

See more details on using hashes here.

Provenance

The following attestation bundles were made for openapi2mcp_py-0.2.1-py3-none-any.whl:

Publisher: publish.yml on OrgBloch/openapi2mcp-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page