๐ Openapiยฎ MCP
The official Python MCP SDK and ready-to-run MCP server for Openapiยฎ
[](https://github.com/openapi/mcp-server/actions/workflows/build.yml)
[](https://pypi.org/project/openapi-mcp-sdk/)
[](https://www.python.org/)
[](LICENSE)
[](https://modelcontextprotocol.io/)
[](https://www.linuxfoundation.org/about/members)
# Overview
Welcome to **`openapi-mcp-sdk`**, this is the official [openapi.com](https://openapi.com/) MCP SDK.
It ships as a Python package on [PyPI](https://pypi.org/project/openapi-mcp-sdk/) and
can be used in two ways:
- **Ready-to-use server** โ run the MCP gateway directly from the package with a
single command, no cloning or setup required.
- **Python library** โ import `openapi_mcp_sdk` in your own project to build a
custom MCP server that wraps openapi.com APIs with your own logic, tools, or auth
layer on top.
## Environment variables
All configuration is done through environment variables. None are required to
start the server โ defaults are suitable for local use.
### Core
| Variable | Default | Description |
|---|---|------------------------------------------------------------------------------------------|
| `MCP_PORT` | `8080` | HTTP port the server listens on |
| `MCP_ENV` | `production` | Runtime environment: `dev` \| `staging` \| `production` |
| `MCP_BASE_URL` | `http://localhost:8080` | Public URL of this server (used to build callback and file download URLs) |
| `MCP_CALLBACK_URL` | `$MCP_BASE_URL/callbacks` | Explicit callback URL sent to async APIs |
| `MCP_OPENAPI_ENV` | _(empty)_ | Openapi environment: `dev`, `test`, `sandbox` (alias of `test`), or empty for production |
### Storage
The server needs to store files for APIs that return binary documents (e.g.
company official documents). The storage backend is configurable:
| Variable | Default | Description |
|-----------------------|---|---|
| `MCP_STORAGE_BACKEND` | `local` | `local` \| `gcs` \| `s3` |
| `MCP_STORAGE_PATH` | `./openapi_storage` | Local path for `local` backend |
| `MCP_STORAGE_BUCKET` | _(required for cloud)_ | Bucket name for `gcs` or `s3` |
| `MCP_STORAGE_REGION` | _(required for s3)_ | AWS region for the S3 bucket |
### Cache
Used to share async callback results across multiple server instances.
| Variable | Default | Description |
|---------------------|---|---|
| `MCP_CACHE_BACKEND` | `none` | `none` (in-process dict) \| `memcached` \| `redis` |
| `MCP_CACHE_URL` | _(none)_ | Redis connection URL (`MCP_CACHE_BACKEND=redis`), e.g. `redis://host:6379` |
| `MCP_CACHE_HOST` | _(none)_ | Memcached host (`MCP_CACHE_BACKEND=memcached`) |
| `MCP_CACHE_PORT` | `11211` | Memcached port |
See [`docs/env/`](docs/env/) for per-environment configuration guides (local,
Docker, AWS, GCP, Kubernetes).
## Features
- **Secure proxy**: Pass-through of the Bearer Token provided by the client, without direct handling of sensitive credentials.
- **Extensible**: Easily add new tools/APIs by creating modules in [`/apis/`](src/openapi_mcp_sdk/apis/).
- **MCP-compatible**: Designed according to MCP protocol best practices.
- **Modular**: All API call logic and tool registration is centralized in [`mcp_core.py`](src/openapi_mcp_sdk/mcp_core.py).
## Quick Start โ run from PyPI (recommended)
No cloning, no virtual environment. Start the server in one command:
```bash
uvx openapi-mcp-sdk server
```
The server starts immediately at `http://localhost:8080`.
### Other runtimes
```bash
# pipx (ephemeral run, no install needed โ similar to uvx)
pipx run openapi-mcp-sdk server
# pip (installs the package, then run the command)
pip install openapi-mcp-sdk && openapi-mcp-sdk server
# pip3 on systems where python3 is the default
pip3 install openapi-mcp-sdk && openapi-mcp-sdk server
```
### CLI reference
```
openapi-mcp-sdk