API Reference
API Reference
Complete API documentation for RouterMCP's MCP Protocol and Admin APIs.
API Reference
RouterMCP provides the MCP Protocol API for MCP clients to interact with aggregated tools.
Base URLs
| Environment | URL |
|---|---|
| Production | https://gateway.routermcp.com |
| Local Development | http://localhost:8787 |
Authentication
Authentication is configured per-project:
| Auth Mode | Description |
|---|---|
none | No authentication required |
api_key | Requires Authorization: Bearer <api-key> header |
Documentation
MCP Protocol
JSON-RPC 2.0 endpoints for tool listing and execution.
Error Codes
Standard and custom error codes with handling guidance.
Quick Example
const projectSlug = 'my-project';
const apiKey = 'rmc_1234567890abcdef';
const response = await fetch(`https://gateway.routermcp.com/v1/mcp/${projectSlug}/request`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${apiKey}`
},
body: JSON.stringify({
jsonrpc: '2.0',
id: 1,
method: 'tools/list'
})
});
const data = await response.json();
console.log(data.result.tools);