- Home
- MCP servers
- OpenAPI
OpenAPI
- typescript
6
GitHub Stars
typescript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"jaceromri-openapi-mcp-proxy": {
"command": "npx",
"args": [
"openapi-mcp-proxy",
"--spec",
"./path/to/openapi.yml",
"--target",
"http://your-api.com",
"--port",
"3000"
],
"env": {
"PORT": "3000",
"OMP_TARGET_BASE_URL": "https://petstore.swagger.io/v2",
"OMP_OPENAPI_SPEC_FILE": "./path/to/openapi.yml"
}
}
}
}You can transform any OpenAPI service into an MCP server so AI agents and tools that understand Model Context Protocol can discover and interact with your REST API without modifying the service itself. This proxy translates between MCP and REST, letting you expose existing OpenAPI-described endpoints to MCP clients.
How to use
Start an MCP server for your OpenAPI service by pointing the proxy to your OpenAPI spec, the actual API target, and the port you want the MCP interface to listen on.
Common usage pattern looks like this, where you provide your API spec and target, and choose a port for the MCP endpoint.
npx openapi-mcp-proxy --spec ./path/to/openapi.yml --target http://your-api.com --port 3000
MCP testing and integration
To verify the MCP server is responding as expected, you can use the MCP Inspector and VS Code integration to interact with the server and see the available MCP endpoints.
MCP Inspector lets you connect to your server’s MCP endpoint (ending with /mcp) and inspect requests and responses in a UI.
VS Code integration allows you to add your MCP server to the agent mode and interact with it directly from the editor.
# Install MCP Inspector
npx @modelcontextprotocol/inspector
# Start your MCP server (example shown above)
# Open the inspector UI at the server path ending with /mcp, e.g. http://localhost:3000/mcp
OpenAPI example
An example setup uses a Petstore OpenAPI spec to expose the API via MCP.
npx openapi-mcp-proxy --spec resources/petstore.openapi.yml --target https://petstore.swagger.io/v2
Available tools
mcp_inspector
A CLI/UI tool to test and inspect MCP servers, showing requests and responses.
vscode_agent_integration
VS Code integration to add MCP servers to the built-in agent mode for interactive usage.