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.3.0.tar.gz (30.7 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.3.0-py3-none-any.whl (50.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: openapi2mcp_py-0.3.0.tar.gz
  • Upload date:
  • Size: 30.7 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.3.0.tar.gz
Algorithm Hash digest
SHA256 f94dc89af15de5209bea303eb2064d0a45d521d57ec50edeff07a06623d59426
MD5 157f06b5f3bfdc36ac5ce61b64a14cee
BLAKE2b-256 2b796affc1f114baff8f02d38e0f309f3ee742a5028cfba1712748b4be2de28b

See more details on using hashes here.

Provenance

The following attestation bundles were made for openapi2mcp_py-0.3.0.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.3.0-py3-none-any.whl.

File metadata

  • Download URL: openapi2mcp_py-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 50.9 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9cd8704055d76d7bba6b55e29bea735690124e91d41e8535114642e45fb9126c
MD5 d2f5c84e3309964630efce65ce1f752a
BLAKE2b-256 ac995b573cd75ce35f19b2238f4cb21c36612b0445b3b1c7228d2d45a49ae20c

See more details on using hashes here.

Provenance

The following attestation bundles were made for openapi2mcp_py-0.3.0-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