Import an OpenAPI spec → MCP
The API‑to‑MCP adapter lets you expose selected operations of an existing REST API as MCP tools — without standing up a separate MCP server. Imported APIs become gateway‑hosted tool facades: input schemas are validated, hosts are allowlisted, credentials are brokered, and only operations you select and approve are ever exposed.
- Preview the contract to see candidate operations the adapter can generate.
- Import with the operations you want, creating tool candidates for approval.
- Approve the generated tools (Approvals) before they’re discoverable.
1 · Preview candidate operations
Section titled “1 · Preview candidate operations”Preview an API contract
- Open Govern → API sources → Import.
- Provide the OpenAPI / Swagger / Postman contract (URL or file) and review the candidate operations the adapter detects.
curl -X POST "$GATEWAY/v1/api-sources/preview" \
-H "authorization: Bearer $TOKEN" \
-H "content-type: application/json" \
--data @openapi-source.jsonpreviewApiSourceImport in the API reference →gatewayctl import-api --preview --spec ./openapi.yamlimport-openapi is an accepted alias for import-api.
2 · Import selected operations
Section titled “2 · Import selected operations”Import selected operations as tool candidates
- Select the operations to expose — leave the rest out.
- Click Import. Selected operations are persisted as generated‑tool candidates with status awaiting approval.
curl -X POST "$GATEWAY/v1/api-sources/import" \
-H "authorization: Bearer $TOKEN" \
-H "content-type: application/json" \
--data @openapi-source.jsonimportOpenApiSource in the API reference →gatewayctl import-api --spec ./openapi.yaml --operation getDeal --operation updateDealEvery gatewayctl verb accepts --format text|json.
Approve the generated tools, after which they’re projected to the data plane and become callable per policy — just like a registered MCP server.
Type set in Geist, Source Serif 4, and Departure Mono.