No manual wrappers
Import a Swagger/OpenAPI JSON or YAML URL and generate MCP-compatible tools from operation metadata instead of writing and hosting a custom MCP server per API.
OpenAPI to MCP
Swagger to MCP Gateway imports an OpenAPI URL, generates MCP tools from REST operations, lets you edit descriptions and hide unsafe endpoints, then publishes a Gateway-routed MCP URL for AI clients. Your API does not need to change, and clients do not need upstream credentials.
No credit card required.
app.swaggertomcp.com/publish
Swagger to MCP
Import OpenAPI source
https://api.example.com/openapi.json
Generated tools
18 selectedget_order_by_id
GET /orders/{id}
create_support_ticket
POST /tickets
search_customers
GET /customers/search
MCP endpoint
/mcp/acme-orders
Claude, Cursor, VS Code, or Gateway Chat can discover the selected API tools.
Why it matters
A hand-written MCP adapter can be enough for one demo. It becomes harder when every API needs auth handling, tool descriptions, limits, redacted logs, and a way to hide unsafe operations.
Import a Swagger/OpenAPI JSON or YAML URL and generate MCP-compatible tools from operation metadata instead of writing and hosting a custom MCP server per API.
Rewrite generated descriptions so the tool says what it does, when to use it, which inputs matter, and what the result means.
Inspect tool calls, latency, success rates, failures, and response payloads while sensitive request and response values are masked before storage.
Use cases
Use OpenAPI to MCP when your application already has useful HTTP APIs and you need a smaller, safer, model-facing tool layer.
Expose selected service, ticketing, order, or support actions to AI assistants without publishing the whole internal API catalog.
Offer an MCP endpoint for product workflows while keeping account limits, published tool state, and upstream credential policy in the Gateway.
Turn a public or sample OpenAPI spec into a working MCP surface for evaluations, demos, and agent workflow tests.
Curation
An OpenAPI file often contains endpoints that are useful for developers but bad as AI-callable tools. The MCP catalog should be smaller than the full REST API.
Begin with search, lookup, status, reporting, or support helper endpoints. Add write actions only after the tool description and logging behavior are clear.
Do not expose user-delete, token-management, permission-changing, refund, or bulk-update endpoints just because they exist in the OpenAPI document.
Use Gateway Chat to ask realistic questions and see whether the model chooses the intended published tool with useful arguments.
Before / after
The upstream REST API stays the same. The Gateway creates an AI-facing MCP tool with a clearer name, typed arguments, a better description, and a server-side route to the original operation.
| API operation | Published MCP tool | Why it helps agents | |
|---|---|---|---|
| Search orders | GET /orders with query parameters such as customerId, status, fromDate, and limit. | search_orders: Search approved orders by customer, status, or date range before support follow-up. | The AI client sees a task-oriented tool and typed inputs instead of raw route details or upstream credentials. |
| Create support ticket | POST /tickets with a request body containing customerId, subject, priority, and message. | create_support_ticket: Create a support ticket after the user confirms the customer and issue summary. | The published description can explain when the write action is allowed and which arguments must be present. |
| Customer status | GET /customers/{id}/status using a path parameter and upstream bearer authentication. | get_customer_status: Read the current customer status and account flags for a specific customer ID. | The Gateway keeps upstream auth server-side while the MCP client gets a narrow lookup tool. |
Agent-ready descriptions
The OpenAPI document gives the Gateway a starting point. The published MCP catalog works better when descriptions are written for tool choice, not only for human API documentation.
Bad example: Gets orders. This is too vague; it does not tell the model when to use the tool, which filters matter, or what result to expect.
Better example: Search approved orders by customer, status, or date range before support follow-up. Use limit to keep the result small.
Only published tools appear in tools/list. Keep destructive, broad, internal, or confusing operations hidden until there is a clear workflow.
MCP clients call the Gateway MCP URL. The Gateway checks publication state, account limits, credential policy, and redacted logging before forwarding to the REST API.
Workflow
The Gateway keeps source discovery, publishing, execution, and monitoring separated so the AI-facing surface stays controlled.
Step 1
Paste the Swagger/OpenAPI JSON or YAML URL, confirm the base URL, and add upstream bearer or API key auth if the API requires it.
Step 2
Inspect generated operation tools, hide unsafe endpoints, and improve tool and parameter descriptions before publishing.
Step 3
Test the surface in Gateway Chat, then use the generated MCP URL with Claude, Cursor, VS Code, or any compatible MCP client.
FAQ
Short answers for teams comparing MCP adapters, API gateways, and database access for AI agents.
It is both for the OpenAPI flow. The Gateway reads OpenAPI metadata, generates MCP tool definitions, lets you curate the published catalog, enforces account limits, and routes tool calls to the upstream REST API.
No. In the recommended mode, clients authenticate to the Gateway and the Gateway injects encrypted upstream credentials server-side.
Yes. Generated tools can be published or hidden individually. Use this to keep the MCP catalog focused on the operations an AI workflow should actually call.
Yes. The OpenAPI flow accepts Swagger/OpenAPI JSON or YAML URLs and uses the document metadata to create operation-derived MCP tools.
No. The Gateway can generate tools from OpenAPI operations, but the published surface is curated. You can hide unsafe or unnecessary operations before using the MCP endpoint.
No. The Gateway sits in front of the API. It creates an MCP-facing surface and forwards allowed tool calls to the existing REST operation without requiring the upstream API to become MCP-aware.
Yes. Tool descriptions can be customized so the MCP catalog is more agent-ready. Good descriptions explain the purpose, when to use the tool, important inputs, and expected result.
Only when there is a clear workflow and policy. Start with narrow read or low-risk actions, then publish write actions deliberately after testing descriptions, arguments, and logs.
Yes. Gateway Chat can use the published MCP surface so you can test tool choice, argument quality, and responses before connecting external MCP clients.
The Gateway reads the OpenAPI document during the publish/import flow and stores generated tools for the integration. When the upstream spec changes, review and republish or update the integration so the MCP surface reflects the intended operations and descriptions.
Yes. Public APIs can be used for demos and prototypes, while internal APIs can be published behind Gateway authentication so AI clients do not receive broad upstream credentials.
No. MCP clients call the Gateway MCP endpoint. The Gateway checks integration state, account limits, publication state, credential policy, and logging rules before forwarding the request to the upstream REST API.
An OpenAPI file describes many routes. A Gateway-published MCP surface exposes a smaller tool catalog with edited descriptions, hidden endpoints, Gateway-managed credentials, limits, and redacted observability.