Appearance
Remote MCP Servers
Register an MCP server you host elsewhere and use it like any UniversalAPI server. Its credentials live with UniversalAPI, not in your agent source code.
Register
bash
curl -X POST https://api.universalapi.co/mcp-admin/create \
-H "Authorization: Bearer $UAPI_TOKEN" -H "Content-Type: application/json" \
-d '{
"serverName": "acme-crm",
"description": "ACME CRM tools",
"endpointUrl": "https://mcp.acme.example/mcp",
"authHeader": { "name": "Authorization", "value": "Bearer sk_live_..." },
"visibility": "private"
}'endpointUrl— your server's Streamable HTTP MCP endpoint (https, a hostname).authHeader— optional. The value is stored as a secret (AWS Secrets Manager) and never returned; responses showhasAuthHeader: true.
The response's serverId is all an agent needs.
Use it from an agent
python
mcp_client = MCPClient(lambda: streamablehttp_client(
f"https://mcp.api.universalapi.co/mcp/{server_id}",
headers={"Authorization": f"Bearer {os.environ['UNIVERSALAPI_BEARER_TOKEN']}"},
))UniversalAPI checks the caller may use the server (owner, or the server is public), forwards the request to endpointUrl with your auth header, and adds the signed session context so your server can scope the call to the right customer. The caller's own bearer token is never forwarded. Calls are billed and logged like any MCP server call.
Update or remove the header
bash
# replace the header value
curl -X PUT https://api.universalapi.co/mcp-admin/update -H "Authorization: Bearer $UAPI_TOKEN" \
-H "Content-Type: application/json" \
-d '{"serverId": "...", "authHeader": {"name": "Authorization", "value": "Bearer sk_new"}}'
# stop sending a header
... -d '{"serverId": "...", "authHeader": null}'endpointUrl can be changed the same way. Deleting the server schedules the secret for deletion (7-day recovery window).
Limits
- POST and DELETE are proxied; standalone GET event streams answer 405.
- Responses up to 5 MB; 25-second timeout per request.
- Reserved header names (
Host,Content-Type,Accept,Mcp-Session-Id, …) are refused.