API Reference
MCP
List MCP Servers
- API Name: List MCP Servers
- API Route:
GET /api/v1/mcp - Request:
- Auth: Session required
- What it does: Returns all Model Context Protocol (MCP) servers registered by the authenticated user.
- Returns: Array of MCP server objects
[ { "id", "name", "url", "description", "status", "tools", "userId" } ]
Add MCP Server
- API Name: Add MCP Server
- API Route:
POST /api/v1/mcp - Request:
- Body:
json
{
"name": "string (required)",
"url": "string (required)",
"description": "string (optional)",
"headers": { "key": "value" }
}- What it does: Registers a new MCP server endpoint for the authenticated user. Does not attempt to connect or discover tools at this stage.
- Returns:
201with the created MCP server record.400ifnameorurlis missing.
Delete MCP Server
- API Name: Delete MCP Server
- API Route:
DELETE /api/v1/mcp/[id] - Request:
- Params:
id(string) — MCP Server ID - Auth: Session required (must be the server owner)
- Params:
- What it does: Deletes an MCP server registration. Validates ownership before deletion.
- Returns:
204 No Contenton success.404if not found.403if not the owner.
Connect MCP Server
- API Name: Connect to MCP Server and Discover Tools
- API Route:
POST /api/v1/mcp/[id]/connect - Request:
- Params:
id(string) — MCP Server ID - Auth: Session required (must be the server owner)
- Params:
- What it does: Connects to the MCP server using auto-detected transport protocol. First tries Streamable HTTP (MCP 2025-03-26 spec, used by GitHub Copilot / Claude.ai); falls back to legacy SSE transport (MCP 2024-11-05 spec) if the server returns
405 Method Not Allowed. Discovers all available tools and persists them to the database, updating the server status toconnected. - Returns:
json
{
"id", "name", "url", "status": "connected",
"tools": [ { "name": "string", "description": "string" } ]
}Returns 502 with error details if connection fails.