Skip to main content

[beta] MCP API

This page documents the 1 gateway endpoint tagged [beta] MCP in the gateway's OpenAPI document. Every example targets a gateway on http://localhost:4000 and authenticates with the SPANWAY_API_KEY environment variable, which holds the master key or a virtual key that has access to the route. Request and response fields are taken from the schema the running gateway publishes at /openapi.json, and the same document is bundled with this site as openapi.json.

MethodPathSummary
GET/public/mcp_hubList the MCP servers published on the AI hub

Endpoints​

GET /public/mcp_hub​

List the MCP servers published on the AI hub

List the MCP servers on the hub's publication list, with transport, description and the tools they expose, never with a credential. Anyone may call it without a key while the AI hub is open, otherwise any valid key is needed. Nothing is changed.

Docs

Example request:

curl -X GET "http://localhost:4000/public/mcp_hub" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200The published MCP servers without credentials, an empty list when none are published.application/json array of MCPPublicServer
401Authentication Error, No api key passed in.application/json ProxyError
429One address sent more requests to the public pages this minute than the gateway allows. Wait the number of seconds in Retry-After and try againapplication/json ErrorDetail