You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@
9
9
10
10
**Generate MCP tool definitions directly from a Swagger/OpenAPI specification file.**
11
11
12
-
OpenAPI-MCP is a library and command-line tool that reads a `swagger.json` or `openapi.yaml` file and generates a corresponding [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) toolset. This allows MCP-compatible clients like [Cursor](https://cursor.sh/) to interact with APIs described by standard OpenAPI specifications.
12
+
OpenAPI-MCP is a dockerized MCP server that reads a `swagger.json` or `openapi.yaml` file and generates a corresponding [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) toolset. This allows MCP-compatible clients like [Cursor](https://cursor.sh/) 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.
13
13
14
14
## Table of Contents
15
15
@@ -22,22 +22,26 @@ OpenAPI-MCP is a library and command-line tool that reads a `swagger.json` or `o
22
22
-[Command-Line Options](#command-line-options)
23
23
-[Environment Variables](#environment-variables)
24
24
25
+
## Demo
26
+
27
+
Run the demo yourself: [Running the Weatherbit Example (Step-by-Step)](#running-the-weatherbit-example-step-by-step)
28
+
25
29
## Why OpenAPI-MCP?
26
30
27
31
-**Standard Compliance:** Leverage your existing OpenAPI/Swagger documentation.
28
32
-**Automatic Tool Generation:** Create MCP tools without manual configuration for each endpoint.
29
33
-**Flexible API Key Handling:** Securely manage API key authentication for the proxied API without exposing keys to the MCP client.
30
34
-**Local & Remote Specs:** Works with local specification files or remote URLs.
31
-
-**Command-Line Tool:** Easily integrate MCP generation into build or deployment scripts.
35
+
-**Dockerized Tool:** Easily deploy and run as a containerized service with Docker.
32
36
33
37
## Features
34
38
35
39
-**OpenAPI v2 (Swagger) & v3 Support:** Parses standard specification formats.
36
40
-**Schema Generation:** Creates MCP tool schemas from OpenAPI operation parameters and request/response definitions.
37
41
-**Secure API Key Management:**
38
-
- Injects API keys into requests (`header`, `query`, `path`, `cookie`) based on command-line configuration.
39
-
- Loads API keys directly from flags (`--api-key`), environment variables (`--api-key-env`), or `.env` files located alongside local specs.
40
-
- Keeps API keys hidden from the end MCP client (e.g., the AI assistant).
42
+
- Injects API keys into requests (`header`, `query`, `path`, `cookie`) based on command-line configuration.
43
+
- Loads API keys directly from flags (`--api-key`), environment variables (`--api-key-env`), or `.env` files located alongside local specs.
44
+
- Keeps API keys hidden from the end MCP client (e.g., the AI assistant).
41
45
-**Server URL Detection:** Uses server URLs from the spec as the base for tool interactions (can be overridden).
42
46
-**Filtering:** Options to include/exclude specific operations or tags (`--include-tag`, `--exclude-tag`, `--include-op`, `--exclude-op`).
43
47
-**Request Header Injection:** Pass custom headers (e.g., for additional auth, tracing) via the `REQUEST_HEADERS` environment variable.
0 commit comments