Skip to main content

MCP Gateway API

The MCP Gateway provides a unified HTTP interface for the Model Context Protocol. MCP clients can authenticate with OAuth, then list and call tools through one endpoint.

Key Concepts

Endpoint

POST https://clevername.net/api/hub/mcp/gateway

MCP protocol over HTTP

The gateway translates the MCP protocol (originally designed for stdio/SSE transport) into a standard HTTP request/response format. This lets any HTTP client interact with MCP servers without needing a persistent connection or MCP client library.

Authentication

MCP-capable IDEs should connect to https://clevername.net/api/hub/mcp/gatewayand follow the OAuth browser login flow automatically. Raw HTTP clients can call the same endpoint with an OAuth access token or a fallback cn-live-* gateway token.

Supported operations

MethodDescription
tools/listList all available tools from active MCP servers
tools/callExecute a specific tool with provided arguments
Step-by-Step Guide
1

List available tools

Send a tools/list request to see all tools available from your active MCP servers:

POST /api/hub/mcp/gateway Authorization: Bearer <oauth_access_token_or_cn-live_token> { "method": "tools/list" }

The response includes each tool's name, description, and parameter schema. Tools are namespaced by their MCP server (e.g., github__create_issue).

tools/list response showing tool names, descriptions, and parameter schemas from multiple MCP servers
The tools/list response shows all available tools grouped by MCP server.
2

Call a tool

Execute a tool by sending a tools/call request with the tool name and arguments:

POST /api/hub/mcp/gateway Authorization: Bearer <oauth_access_token_or_cn-live_token> { "method": "tools/call", "params": { "name": "github__list_repos", "arguments": { "org": "my-company", "per_page": 10 } } }
Note
Tool names use double-underscore notation:{server}__{tool}. The server prefix identifies which MCP server handles the call.
3

Understand how the tool list is scoped

tools/list takes no filter parameters. The set you see is determined by the caller: a human token or OAuth session lists tools from all of your active MCP servers, while an agent-bound token lists only the tools assigned to that agent (or, once a governed session carries a guardrail-profile allowlist, only the tools that allowlist permits). Proxy clients with a tool allowlist are narrowed further.

4

Handle tool responses

Tool call responses follow the MCP result format with a content array. Each item has a type (usually “text”) and the result data. Error responses include an isError flag.