Skip to Content
API ReferenceMCP Servers

MCP Servers

MCP (Model Context Protocol) servers extend agents with custom tools. Any MCP-compatible server can be connected and its tools become available to agents.

List MCP servers

GET /api/mcp-servers Authorization: Bearer nxr_...

Create MCP server

POST /api/mcp-servers Authorization: Bearer nxr_... Content-Type: application/json { "name": "Internal tools", "url": "https://mcp.internal.example.com", "auth_token": "optional-bearer-token" }
FieldTypeDescription
namestringDisplay name
urlstringMCP server endpoint
auth_tokenstring?Bearer token for the MCP server

Update MCP server

PATCH /api/mcp-servers/{mcp_id} Authorization: Bearer nxr_... Content-Type: application/json { "url": "https://mcp-v2.internal.example.com" }

Delete MCP server

DELETE /api/mcp-servers/{mcp_id} Authorization: Bearer nxr_...

Tools

Get cached tools

Returns the tool list from the last successful fetch:

GET /api/mcp-servers/{mcp_id}/tools Authorization: Bearer nxr_...

Fetch tools from live server

Probe the MCP server now and update the cached tool list:

POST /api/mcp-servers/{mcp_id}/tools/fetch Authorization: Bearer nxr_...

Response:

[ { "name": "query_database", "description": "Run a read-only SQL query", "input_schema": { "type": "object", "properties": { "sql": { "type": "string" } } } } ]

To make an MCP server’s tools available to an agent, add "mcp" to the agent’s tools array and assign the MCP server to the agent in the UI or via the agent update endpoint.

Tool schemas are cached on fetch. If the MCP server adds new tools, call the fetch endpoint to refresh.