agent-openapi-mcp
Live OpenAPI runtime proxy that enables calling any REST API from MCP clients without writing wrapper code, by pointing at any OpenAPI spec URL.
README
agent-openapi-mcp
Live OpenAPI runtime proxy — call any REST API from Claude, Cursor, or any MCP client without writing wrapper code.
The Problem
Every time you want Claude to interact with a REST API, you have to:
- Write a custom MCP server (2-3 hours of boilerplate)
- Deploy it
- Maintain it forever
Static generators like MCPForge require code gen + deploy — one-time, not live.
This server is the missing runtime layer. Point it at any OpenAPI spec URL — it handles everything at request time.
Quick Start
Add to your MCP config (claude_desktop_config.json, .cursor/mcp.json, etc.):
{
"mcpServers": {
"openapi": {
"url": "https://agent-openapi-mcp.onrender.com/mcp"
}
}
}
That's it. Now ask Claude:
"Load the Petstore API spec from https://petstore3.swagger.io/api/v3/openapi.json and list all the pet operations"
MCP Tools
openapi_load_spec
Load and cache an OpenAPI spec by URL. Returns a summary.
spec_url: "https://petstore3.swagger.io/api/v3/openapi.json"
cache_ttl: 300 # seconds (default 300, max 3600)
Returns: { spec_id, title, version, base_url, operation_count, tags, servers }
openapi_list_operations
List all operations in a spec (auto-loads if not cached).
spec_url: "https://petstore3.swagger.io/api/v3/openapi.json"
tag: "pet" # optional filter
method: "GET" # optional filter
Returns array of { operation_id, method, path, summary, tags, parameters, request_body }
openapi_call_endpoint
Execute a specific API endpoint. This is the core tool.
spec_url: "https://petstore3.swagger.io/api/v3/openapi.json"
operation_id: "getPetById"
path_params: '{"petId": "1"}'
query_params: '{"limit": "10"}'
body: '{"name": "doggie"}'
headers: '{"Authorization": "Bearer token123"}'
timeout: 30
Returns: { status_code, headers, body, elapsed_ms, url, method }
openapi_search_operations
Keyword search across operation summaries and descriptions.
spec_url: "https://petstore3.swagger.io/api/v3/openapi.json"
query: "find pets by status"
Returns ranked list of matching operations.
Example Conversation
You: Load https://petstore3.swagger.io/api/v3/openapi.json and find all operations
related to "inventory"
Claude: [calls openapi_load_spec, then openapi_search_operations]
Found 1 operation: getInventory — GET /store/inventory
"Returns pet inventories by status"
You: Call it
Claude: [calls openapi_call_endpoint with operation_id="getInventory"]
Status 200 — {"available": 847, "sold": 42, "pending": 3}
REST API
The server also exposes a REST API at /api/v1/*:
| Endpoint | Method | Description |
|---|---|---|
/api/v1/load-spec |
POST | Load and cache a spec |
/api/v1/list-operations |
POST | List operations |
/api/v1/call-endpoint |
POST | Execute an endpoint |
/api/v1/search-operations |
POST | Search operations |
/health |
GET | Health check |
/docs |
GET | Swagger UI |
Example REST call
curl -X POST https://agent-openapi-mcp.onrender.com/api/v1/load-spec \
-H "Content-Type: application/json" \
-d '{"spec_url": "https://petstore3.swagger.io/api/v3/openapi.json"}'
Self-Hosting with Docker
docker build -t agent-openapi-mcp .
docker run -p 8080:8080 \
-e PUBLIC_HOST=localhost:8080 \
agent-openapi-mcp
Then use http://localhost:8080/mcp as your MCP URL.
Environment Variables
| Variable | Default | Description |
|---|---|---|
PUBLIC_HOST |
agent-openapi-mcp.onrender.com |
Public hostname |
PORT |
8080 |
Port to listen on |
X402_WALLET_ADDRESS |
(none) | Enable x402 micropayment paywall |
Supported Spec Formats
- OpenAPI 3.x (JSON and YAML)
- Swagger 2.x (JSON and YAML)
- Any publicly accessible URL
Rate Limits
- Free tier: 100 requests per IP per day
- Paid: Include
X-Paymentheader (x402 micropayments)
Development
git clone https://github.com/aparajithn/agent-openapi-mcp
cd agent-openapi-mcp
pip install -e ".[dev]"
# Run tests
pytest tests/ -v
# Run locally
uvicorn src.main:app --reload --port 8080
License
MIT © aparajithn
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。