Ana içeriğe geç

Create MCP Gateway from an API Proxy

Endpoint

POST /apiops/projects/{projectName}/apiProxies/{apiProxyName}/mcp-gateway/

Creates a new API proxy of type MCP in TOOL_EXPOSE mode whose exposedTools list is derived from the endpoints of the REST/SOAP proxy named in the path. See MCP Gateway for the concepts.

The source proxy is not converted in place: it keeps its type, routing, policies, credentials, ACLs and deploy state, and keeps serving traffic exactly as before. TOOL_EXPOSE loops each tool call back to it, so everything configured on the source proxy still applies to every MCP tool call.

Authentication

Requires a Personal API Access Token.

Authorization: Bearer YOUR_TOKEN

Permission: API_MANAGEMENT × MANAGE.

Request

Headers

HeaderValueRequired
AuthorizationBearer {token}Yes
Content-Typeapplication/jsonNo (the body itself is optional)

Path Parameters

ParameterTypeRequiredDescription
projectNamestringYesProject name
apiProxyNamestringYesName of the source API proxy. Must be of type REST or SOAP.

Request Body

The body is optional; every field in it is optional too.

FieldTypeRequiredDescription
namestringNoName of the MCP proxy to create. Blank defaults to <source name> MCP.
relativePathstringNoClient-facing path of the MCP proxy. Blank defaults to <source relativePath>-mcp.
descriptionstringNoDescription of the MCP proxy. Blank copies the source proxy's description.

Full JSON Body Example

{
"name": "Orders MCP",
"relativePath": "/orders-mcp",
"description": "Orders API exposed as MCP tools"
}

Response

Success Response (200 OK)

{
"status": "SUCCESS",
"apiProxyName": "Orders MCP",
"relativePath": "/orders-mcp",
"sourceApiProxyName": "Orders API",
"deployed": false,
"resultCount": 3,
"resultList": [
{
"toolName": "list_orders",
"httpMethod": "GET",
"path": "/orders",
"description": "List all orders",
"schemaSource": "AUTO"
},
{
"toolName": "create_order",
"httpMethod": "POST",
"path": "/orders",
"description": "Create an order",
"schemaSource": "AUTO"
},
{
"toolName": "delete_orders_id",
"httpMethod": "DELETE",
"path": "/orders/{id}",
"schemaSource": "AUTO"
}
]
}
FieldDescription
apiProxyNameName of the MCP proxy that was created
relativePathClient-facing path of the created gateway
sourceApiProxyNameName of the REST/SOAP proxy the tools loop back to
deployedAlways false — creation never deploys
resultList[].toolNamePublished MCP tool name (normalized, unique within the catalog)
resultList[].httpMethodClient-facing HTTP method of the source endpoint
resultList[].pathSource endpoint path (SOAP: the operation name)
resultList[].schemaSourceAUTO when the input schema is derived from the source proxy's specification at tools/list time, OVERRIDE when a schema is stored on the tool (SOAP sources)

Creation does not deploy the proxy. Deploy it separately with POST /apiops/projects/{projectName}/apiProxies/{apiProxyName}/environments/{environmentName}/.

Error Responses

HTTP CodeCondition
400apiProxyName is empty; no API proxy with that name exists in the project; the source proxy is not REST or SOAP; the source proxy has no active endpoint; an API proxy with the target name already exists in the project; the target relative path is already in use
401Token is missing or invalid
500Unexpected server error
{
"status": "FAIL",
"message": "Only REST and SOAP Api Proxies can be converted into an MCP Gateway"
}

Notes and Warnings

  • Nothing is written to the source proxy. A failed call writes nothing at all: the type, endpoint, project, name and relative-path checks all run before the new proxy is created.
  • Only active endpoints become tools. A deactivated endpoint is skipped — advertising a tool the gateway would reject is worse than not advertising it.
  • Tool names are normalized and de-duplicated. The generated name is lower-cased, non-alphanumeric characters collapse into underscores and the result is capped at 64 characters; two endpoints whose names normalize to the same value get _2, _3 … suffixes. Names are derived from the specification's operationId, then its summary, then <METHOD>_<path>.
  • REST vs SOAP input schema. REST tools carry no stored schema — the gateway derives an operation-specific one from the source proxy's specification at tools/list time. SOAP tools carry a stored schema with a single body string argument, because automatic WSDL-to-MCP mapping is lossy.
  • The generated gateway is created undeployed so the tool list can be reviewed first.
  • Everything else about the created proxy behaves like any other MCP proxy — edit its catalog with Update MCP Routing, attach policies, and deploy it through the normal environment endpoints.