Skip to main content

A stateless gateway that turns any OpenAPI spec into MCP tools on the fly.

Project description

Discord

Badges
Build Nox semantic-release PyPI Read the Docs
Tests coverage pre-commit asv
Standards SemVer 2.0.0 Conventional Commits
Code uv Ruff Nox Checked with mypy
Repo GitHub issues GitHub stars GitHub license All Contributors Contributor Covenant

mcpgate

Welcome to mcpgate's documentation!

A stateless gateway that turns any OpenAPI spec into MCP tools on the fly.

Read the Docs

Installation

PyPI

mcpgate is available on PyPI:

# With uv
uv add mcpgate
# With pip
pip install mcpgate
# With Poetry
poetry add mcpgate

GitHub

You can also install the latest version of the code directly from GitHub:

# With uv
uv add git+https://github.com/MicaelJarniac/mcpgate
# With pip
pip install git+git://github.com/MicaelJarniac/mcpgate
# With Poetry
poetry add git+git://github.com/MicaelJarniac/mcpgate

Quick Start

Run the server directly without installing:

# With uv
uvx mcpgate
# With pipx
pipx run mcpgate

Usage

For more examples, see the full documentation.

from mcpgate import mcp

mcp.run(transport="http")

Headers

mcpgate is configured per-request via HTTP headers sent by the MCP client:

Header Required Description
x-openapi-url Yes URL of the OpenAPI JSON specification to load
x-api-url Yes Base URL of the target API for proxied requests
x-cookies No Cookie string to forward with API requests

When both x-openapi-url and x-api-url are present, mcpgate fetches the OpenAPI spec, generates MCP tools from it, and proxies tool calls to the target API. When these headers are absent, the server returns no tools.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

More details can be found in CONTRIBUTING.

Contributors ✨

License

MIT

This project was created with the MicaelJarniac/crustypy template.

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

mcpgate-0.3.2.tar.gz (109.4 kB view details)

Uploaded Source

Built Distribution

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

mcpgate-0.3.2-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file mcpgate-0.3.2.tar.gz.

File metadata

  • Download URL: mcpgate-0.3.2.tar.gz
  • Upload date:
  • Size: 109.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mcpgate-0.3.2.tar.gz
Algorithm Hash digest
SHA256 c5a558e39a4ba424c502066bfe70cab95aae212919d10a3c87c7a0c6d7bbc3f0
MD5 e8ba5eab83738c18cc47b44c6382f772
BLAKE2b-256 f3b5bcd3f0934641c338e4e4a70f8f9bb96a54f1063935ee77f787ca3cea5ed1

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcpgate-0.3.2.tar.gz:

Publisher: semantic-release.yml on MicaelJarniac/mcpgate

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

File details

Details for the file mcpgate-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: mcpgate-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mcpgate-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fd71edaec29d48090529297e90348c52a7138ca1486ca34517ab0086ee71d6e9
MD5 eadb9128f9c0f1bfdfa994f3f6206be9
BLAKE2b-256 b5d5f28286aba8c6c2cf1014c370e5221220bea8ae1ad7d4b2dff27b89fd126d

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcpgate-0.3.2-py3-none-any.whl:

Publisher: semantic-release.yml on MicaelJarniac/mcpgate

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