OpenAPI to Model Context Protocol (MCP)
The OpenAPI to Model Context Protocol (MCP) proxy server bridges the gap between AI agents and external APIs by dynamically translating OpenAPI specifications into standardized MCP tools. This simplifies the integration process, significantly reducing development time and complexity associated with custom API wrappers.
Overview
OpenAPI-MCP is a proxy server that bridges AI agents and external APIs by translating OpenAPI specifications into standardized Model Context Protocol (MCP) tools, simplifying integration and reducing development complexity.
To use OpenAPI-MCP, clone the repository, install the required packages, configure the environment variables, and run the server using the provided commands.
- Dynamic tool generation from OpenAPI endpoints. - Supports multiple transport methods including stdio and Server-Sent Events (SSE). - OAuth2 support for secure interactions. - Dry run mode for safe API simulations. - JSON-RPC 2.0 compliance for robust communication. - Integration with popular AI orchestrators like Cursor and Windsurf.
- Seamless integration of AI agents with various APIs.
- Rapid development of applications requiring API interactions.
- Simplifying the process of creating custom API wrappers.
Add to your AI client
Use these steps to connect OpenAPI to Model Context Protocol (MCP) in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"openapi-mcp-gujord": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-openapi-mcp-gujord"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"openapi-mcp-gujord": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-openapi-mcp-gujord"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"openapi-mcp-gujord": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-openapi-mcp-gujord"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"openapi-mcp-gujord": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-openapi-mcp-gujord"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"openapi-mcp-gujord": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-openapi-mcp-gujord"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"openapi-mcp-gujord": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-openapi-mcp-gujord"
]
}
}
}FAQ
What is the purpose of OpenAPI-MCP?
It simplifies the integration of AI agents with external APIs by standardizing communication through MCP.
Is OpenAPI-MCP easy to set up?
Yes! It requires cloning the repository and configuring a few environment variables.
Can OpenAPI-MCP handle multiple APIs?
Yes! It can dynamically generate tools for multiple OpenAPI specifications.