Dockerized MCP server that generates MCP tools from OpenAPI/Swagger specs to enable AI agents API access.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
One-click editor setup isnβt available for this listing yet β we donβt have a confirmed install command, and weβd rather show nothing than point your editor at the wrong package or host. Follow the projectβs own setup instructions, linked above.
Inspect callable tools, capabilities, and parameters exposed to AI agents by Openapi MCP.

Generate MCP tool definitions directly from a Swagger/OpenAPI specification file.
OpenAPI-MCP is a dockerized MCP server that reads a swagger.json or openapi.yaml file and generates a corresponding Model Context Protocol (MCP) toolset. This allows MCP-compatible clients like Cursor to interact with APIs described by standard OpenAPI specifications. Now you can enable your AI agent to access any API by simply providing its OpenAPI/Swagger specification - no additional coding required.
Run the demo yourself: Running the Weatherbit Example (Step-by-Step)
header, query, path, cookie) based on command-line configuration.
--api-key), environment variables (--api-key-env), or .env files located alongside local specs.--include-tag, --exclude-tag, --include-op, --exclude-op).REQUEST_HEADERS environment variable.The recommended way to run this tool is via Docker.
Alternatively, you can use the pre-built image available on Docker Hub.
docker run examples above, but replace openapi-mcp:latest with ckanthony/openapi-mcp:latest.Build the Docker Image Locally:
Run the Container: You need to provide the OpenAPI specification and any necessary API key configuration when running the container.
Example 1: Using a local spec file and .env file:
./my-api) containing your openapi.json or swagger.yaml..env file in the same directory (e.g., ./my-api/.env) with API_KEY=your_actual_key (replace API_KEY if your --api-key-env flag is different).(Adjust --spec, --api-key-env, --api-key-name, --api-key-loc, and -p as needed.)
Example 2: Using a remote spec URL and direct environment variable:
Key Docker Run Options:
-p <host_port>:8080: Map a port on your host to the container's default port 8080.--rm: Automatically remove the container when it exits.-v <host_path>:<container_path>: Mount a local directory containing your spec into the container. Use absolute paths or $(pwd)/.... Common container path: /app/spec.--env-file <path_to_host_env_file>: Load environment variables from a local file (for API keys, etc.). Path is on the host.-e <VAR_NAME>="<value>": Pass a single environment variable directly.openapi-mcp:latest: The name of the image you built locally.--spec ...: Required. Path to the spec file inside the container (e.g., /app/spec/openapi.json) or a public URL.--port 8080: (Optional) Change the internal port the server listens on (must match the container port in -p).--api-key-env, --api-key-name, --api-key-loc: Required if the target API needs an API key.--help for all command-line options by running docker run --rm openapi-mcp:latest --help)This repository includes an example using the Weatherbit API. Here's how to run it using the public Docker image:
Find OpenAPI Specs (Optional Knowledge):
Many public APIs have their OpenAPI/Swagger specifications available online. A great resource for discovering them is APIs.guru. The Weatherbit specification used in this example (weatherbitio-swagger.json) was sourced from there.
Get a Weatherbit API Key:
Clone this Repository: You need the example files from this repository.
Prepare Environment File:
cd example/weathercp .env.example .env.env file and replace YOUR_WEATHERBIT_API_KEY_HERE with the actual API key you obtained from Weatherbit.Run the Docker Container:
From the openapi-mcp root directory (the one containing the example folder), run the following command:
-v $(pwd)/example/weather:/app/spec: Mounts the local example/weather directory (containing the spec and .env file) to /app/spec inside the container.--env-file $(pwd)/example/weather/.env: Tells Docker to load environment variables (specifically API_KEY) from your .env file.ckanthony/openapi-mcp:latest: Uses the public Docker image.--spec /app/spec/weatherbitio-swagger.json: Points to the spec file inside the container.--api-key-* flags configure how the tool should inject the API key (read from the API_KEY env var, named key, placed in the query string).Access the MCP Server:
The MCP server should now be running and accessible at http://localhost:8080 for compatible clients.
Using Docker Compose (Example):
A docker-compose.yml file is provided in the example/ directory to demonstrate running the Weatherbit API example using the locally built image.
example/weather/.env.example to example/weather/.env and add your actual Weatherbit API key:
Factual signals from GitHub, npm, and our automated checks β not a rating.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/ckanthony-openapi-mcp)<a href="https://allmcps.com/mcp/ckanthony-openapi-mcp"><img src="https://allmcps.com/api/badge/ckanthony-openapi-mcp?style=directory" alt="Openapi MCP on AllMCPs" /></a>