MCP servers API: register and manage your org's servers
Register a Streamable HTTP MCP server once, keep its headers sealed, pick the tools it offers on /mcp/org, and read recent tool calls, with an admin key.
The gateway can put your own MCP servers behind one endpoint, https://api.uplinkswitch.com/mcp/org, and six routes under https://api.uplinkswitch.com/v1/mcp-servers decide which servers it fronts. Each server is a Streamable HTTP MCP endpoint on a public https address. Its tools appear on /mcp/org as name__tool, so a server registered as crm that has a lookup tool is offered to clients as crm__lookup.
The six management routes take an admin key, which you create in the console, or a signed-in console session. /mcp/org works the other way round: it accepts only a regular API key and refuses admin keys, so the key that registers servers is never the key that calls their tools.
The six routes
| Method and path | What it does |
|---|---|
GET /v1/mcp-servers | Returns the registered servers in data. |
POST /v1/mcp-servers | Registers a server and answers 201 with the stored record. |
GET /v1/mcp-servers/{server_id} | Reads a single server. |
PATCH /v1/mcp-servers/{server_id} | Updates any subset of its fields. |
DELETE /v1/mcp-servers/{server_id} | Deletes the server. |
GET /v1/mcp-servers/calls | Tool calls made through /mcp/org, newest first. |
A server id is mcp_ plus 24 hex characters, and one organization can register up to 20 servers.
Fields for POST
| Field | Type | Notes |
|---|---|---|
name | string, required | Lowercase letters, digits, _ and -, starting with a letter or digit, at most 32 characters. Two underscores in a row and a final underscore are both rejected, because __ is what separates server from tool. |
url | string, required | Public https only. Private, loopback, link-local and reserved targets fail, the target is checked again ahead of each call, and redirects are never followed. |
headers | object or null | At most 20 headers, sent with each call to this server (an Authorization value, say). Sealed at rest; reads expose only header_names. |
tool_allowlist | array or null | The server's own tool names to publish; null publishes them all. |
enabled | boolean | Turns the server off or on without deleting it. |
The record that comes back holds id, name, url, header_names, tool_allowlist, enabled, prefix (the name followed by __), created_at and updated_at, both timestamps in Unix milliseconds. On PATCH, a headers object replaces the whole stored set, null wipes every header, and any field you omit stays as it was.
The call log
GET /v1/mcp-servers/calls answers with data, one entry per tool call with ts, key_id, server, tool, status, http_status, error, latency_ms and arguments. The status is ok, tool_error, failed, denied (the tool sits outside that server's allowlist) or blocked (the calling key's tool policy forbids it). arguments is filled in only when the calling key keeps request bodies and is null for every other key. Pass limit from 1 to 200 (50 when absent) and server_id to see one server alone.
Status codes
- 201 (POST): the server was registered.
- 400
invalid_urlwhen the address is not public https, orinvalid_requestfor any other malformed field. - 401
invalid_api_key: the request brought neither an accepted key nor a console session. - 404
not_found: your organization has no server with that id. - 409 (POST)
name_takenwhen another server already uses the name, orlimit_reachedonce 20 exist.
Example
curl https://api.uplinkswitch.com/v1/mcp-servers \
-H "Authorization: Bearer sk-uplink-live-..." \
-H "Content-Type: application/json" \
-d '{"name": "crm", "url": "https://tools.example.com/mcp", "headers": {"Authorization": "Bearer ..."}, "tool_allowlist": ["lookup"], "enabled": true}'Send that with an admin key. Then give an MCP client https://api.uplinkswitch.com/mcp/org and a regular API key, and its tools/list shows crm__lookup. The MCP gateway feature page covers the endpoint from the client's side.