openapi-to-mcp
OpenAPI to MCP: turn any OpenAPI/Swagger or REST API into an MCP server for Claude & ChatGPT. Every endpoint a tool, no code.
Install / Use
claude mcp add HelpCode-ai -- npx -y github:HelpCode-ai/openapi-to-mcpIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
AI & Machine LearningSupported Platforms
Our assessment of openapi-to-mcp
openapi-to-mcp scores 74/100 on our quality scale, 853rd of 944 AI & Machine Learning skills we index.
Its MCP Server is 6.6 KB long, well organised into 16 sections with 2 code examples: a thorough specification that gives an agent plenty to work with.
It has 3 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated about 2 months ago, so openapi-to-mcp is actively maintained.
- It is released under AGPL-3.0, a copyleft license: you can use it, but modified versions you distribute must carry the same license.
- Its trust signals score 92/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
openapi-to-mcp compared with similar skills
All 4 of these similar skills score higher than openapi-to-mcp; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| openapi-to-mcp (this skill)by HelpCode-ai | 74 | 3 | 51d ago | MCP Server |
| claude-memby thedotmack | 100 | 118.0k | today | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 112.8k | 10d ago | CLAUDE.md |
| Understand-Anythingby Egonex-AI | 100 | 93.0k | 2d ago | CLAUDE.md |
| rufloby ruvnet | 100 | 82.0k | today | CLAUDE.md |
Frequently asked questions
- How do I install openapi-to-mcp?
- Run
claude mcp add HelpCode-ai -- npx -y github:HelpCode-ai/openapi-to-mcp. The install tabs above show the steps for each supported agent. - Which AI agents does openapi-to-mcp work with?
- It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
- Is openapi-to-mcp safe to use?
- It is AGPL-3.0-licensed and scores 92/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is openapi-to-mcp still maintained?
- The repository was last updated about 2 months ago, so openapi-to-mcp is actively maintained.
Skill content
View source on GitHubOpenAPI to MCP
Turn any OpenAPI/Swagger or REST API into an MCP server for Claude, ChatGPT and Copilot. Powered by AnythingMCP.
OpenAPI to MCP turns any REST API with an OpenAPI or Swagger spec into MCP tools that Claude, ChatGPT, Copilot and Cursor can call, without code. Import the spec and every operation becomes a tool with its parameters and auth. This repository runs the whole chain locally against a demo orders API.
Last verified: 2026-09-26 against the bundled demo orders API (OpenAPI 3.0.3, API-key auth) (docker compose up + scripts/smoke.mjs: spec import, tools/list, GET with query and path parameters, POST with a JSON body).
Adapter synced: <!-- synced -->2026-09-27
Maintained by helpcode.ai, the team that builds and maintains AnythingMCP.
Try it in five minutes
Needs Docker 24+, openssl and Node 18+.
git clone https://github.com/HelpCode-ai/openapi-to-mcp.git
cd openapi-to-mcp
./scripts/install.sh
npm install && node scripts/smoke.mjs
install.sh starts AnythingMCP and a small REST API (examples/api-demo: customers and sales orders, protected by an API key), creates a REST connector with that key, imports openapi.json and creates an MCP API key. smoke.mjs lists the tools and asks for the open orders.
| OpenAPI operation | MCP tool | Changes data |
|---|---|---|
| GET /customers (listCustomers) | listcustomers | no |
| GET /customers/{id} (getCustomer) | getcustomer | no |
| GET /orders (listOrders) | listorders | no |
| GET /orders/{orderNumber} (getOrder) | getorder | no |
| POST /orders/{orderNumber}/notes (addOrderNote) | addordernote | yes |
Tool names are the operationId in lower case (or <method>_<path> without one); descriptions come from summary and description. The API key lives in the connector and never reaches the model.
Use your own API
- In the AnythingMCP UI, Connectors → New connector → REST: base URL and auth (API key, bearer, Basic, OAuth 2.0, HMAC…).
- Import → OpenAPI with the spec URL, a Swagger UI page URL, or the spec pasted as JSON or YAML. OpenAPI 3.0, 3.1 and Swagger 2.0 work.
- Rename tools with cryptic
operationIds and rewrite descriptions in the words your users ask with. - Assign the connector to an MCP server whose role whitelists the operations the AI may call.
Through the API:
curl -s http://localhost:4000/api/connectors/$ID/import -H "Authorization: Bearer $TOKEN" -H "content-type: application/json" \
-d '{"source":"openapi","url":"https://api.example.com/openapi.json"}'
Re-importing updates changed operations, adds new ones and disables the ones that disappeared. Roles, response mappings and tools you disabled survive; names and descriptions are refreshed from the spec, so put wording you want to keep into the spec itself.
Connect Claude, ChatGPT, Copilot or Cursor
-
Claude (claude.ai, Desktop, mobile): Customize → Connectors → Add custom connector, paste your MCP server URL and sign in. Claude connects from Anthropic's cloud, so the URL must be public HTTPS: your AnythingMCP Cloud URL, or your own instance behind TLS.
-
Claude Code:
claude mcp add --transport http openapi-to-mcp http://localhost:4000/mcp --header "X-API-Key: <MCP_API_KEY>" -
Cursor (
.cursor/mcp.json) and VS Code / GitHub Copilot (.vscode/mcp.json, keyserversinstead ofmcpServers, plus"type": "http"):{ "mcpServers": { "openapi-to-mcp": { "url": "http://localhost:4000/mcp", "headers": { "X-API-Key": "<MCP_API_KEY>" } } } } -
ChatGPT: add the public HTTPS URL as a connector (app) in ChatGPT's settings. A
localhostURL does not work there.
Example prompts
- Which sales orders are still open, and when did we promise them?
- Show customer 2 and all of their orders.
- Which customers are in Switzerland?
- What is the total value of the open orders?
- Add a note to order SO-24044: "Customer asked for delivery before 10 am." (a write tool)
- Which tickets were opened today in our helpdesk API?
More in examples/prompts.md.
Security
- Credentials stay in the connector, encrypted with AES-256-GCM; the model never sees them.
- Roles decide which operations each MCP server exposes. Start with the GET operations.
- Response mapping trims large or sensitive responses per tool before they reach the model.
- Audit log: every call with input, output, duration and status.
FAQ
How do I turn an OpenAPI spec into an MCP server?
Create a REST connector in AnythingMCP, import the spec (URL, Swagger UI page or pasted JSON/YAML), and add the MCP server URL to your AI client. Each operation becomes a tool; no code.
Which spec versions work?
OpenAPI 3.0, OpenAPI 3.1 and Swagger 2.0.
What if my API has no spec?
Import a Postman collection or cURL commands instead, or define the tools by hand in the visual editor.
Where do the API credentials go?
Into the connector, encrypted with AES-256-GCM. They are added to each request by AnythingMCP; the model never sees them.
Can I stop the AI from calling operations that change data?
Yes. Give the MCP server a role that whitelists only the GET operations; the others are invisible to that client.
What happens when the API changes?
Re-import the spec. Changed operations are updated, new ones added, and removed ones disabled instead of failing at call time.
Troubleshooting
| Problem | Fix |
|---|---|
| The import finds no operations | Point it at the JSON/YAML spec, or at the Swagger UI page: AnythingMCP looks for the spec behind it. |
| Tool names are unreadable | The spec has no operationIds. Add them to the spec, or rename the tools in the editor. |
| 401 from the API | The connector auth is missing or wrong. Check header name and key on the connector. |
| "SSRF" or "blocked host" error | The API is on a private network. Add its hostname to SSRF_ALLOWED_HOSTS on a self-hosted instance. |
Related
- odata-to-mcp: OData to MCP: turn any OData V2 or V4 service, SAP Gateway included, into MCP tools for Claude & ChatGPT. Reads $metadata, no code.
- soap-to-mcp: Turn any SOAP/WSDL web service into MCP tools for Claude & ChatGPT. Legacy SOAP APIs as AI tools, no code, self-hosted.
- AnythingMCP: the open-source MCP server and gateway this repository is built on.
License
AGPL-3.0-only. The adapter definition in adapter/ comes from AnythingMCP (AGPL-3.0).
Related Skills
claude-mem
118.0kPersistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Agent-Reach
112.8kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
Understand-Anything
93.0kGraphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
ruflo
82.0k🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
