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: mcp-openapi/README.md
+33-2Lines changed: 33 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# MCP OpenAPI Server
2
2
3
-
A generic, configurable MCP (Model Context Protocol) server that automatically generates tools, resources, and prompts from OpenAPI specifications and hosts a proxy, via the MCP protocol, to those API endpoints.
3
+
A multipurpose, configurable MCP (Model Context Protocol) server that automatically generates MCP tools, resources, and prompts from OpenAPI specifications and hosts a proxy, via the MCP protocol, to those API endpoints.
4
4
5
5
Given a set of openapi specs, it will create, via sensible defaults, a set of MCP Tools and MCP Resources. Also given a set of prompts provided as a set of JSON files, it will create MCP prompts for them and will be published together with the MCP Tools and Resources as a complete set of MCP capabilities to be used by any tool enabled LLM.
6
6
@@ -11,11 +11,16 @@ This app will work with an OpenAPI compliant endpoints and specification. The s
11
11
- 🔧 **Automatic Tool Generation**: Converts REST API endpoints to MCP tools
12
12
- 📚 **Resource Management**: Exposes read-only data as MCP resources
Currently the app only takes a single network address as base backend API proxy address.
21
+
22
+
Therefore it is only suitable to be run as a sidecar for microservices where proxying is to localhost or if proxying to many different endpoints, it'll expect an API gateway address.
23
+
19
24
## Installation
20
25
21
26
### Global Installation
@@ -99,6 +104,32 @@ mcp-openapi-server --http
99
104
100
105
When developing the MCP OpenAPI server locally in your IDE, you can run it directly from the source code without installing globally:
101
106
107
+
### OpenAPI Spec Architecture
108
+
109
+
**Important**: This project uses a **spec duplication architecture** that mirrors real-world deployment scenarios:
110
+
111
+
-**Source Specs**: The `sample-banking-api` project contains the authoritative OpenAPI specifications
112
+
-**Example Specs**: The `mcp-openapi/examples/specs/` directory contains **duplicated copies** of these specs
113
+
-**Development Default**: The MCP server defaults to using the example specs for development and testing
114
+
115
+
#### Why Duplication?
116
+
117
+
This architecture **intentionally mimics production environments** where:
118
+
1.**API services** deploy their specs to accessible locations (registries, CDNs, etc.)
119
+
2.**MCP servers** read specs from these deployed locations, not directly from source code
120
+
3.**Spec changes** require explicit deployment/copying to be picked up by consumers
121
+
122
+
#### Keeping Specs in Sync
123
+
124
+
⚠️ **Manual Sync Required**: When you modify OpenAPI specs in `sample-banking-api/specs/`, you **must manually copy** them to `mcp-openapi/examples/specs/` for the MCP server to pick up the latest API signatures.
0 commit comments