v1.3.11

MCP Endpoints

Last updated


Endpoints for adding, logging in to and managing MCP servers and their tools.
MethodPathDescription
GET POST/v1/mcplocal — list / add MCP servers. POST {name, server} writes one entry to the MCP config; server needs a command or a url (400 otherwise). The GET also returns oauth: {name: bool} for the HTTP servers, saying which ones already hold a token
POST/v1/mcp/removelocal — {name}. Removes an MCP server; 404 when the name is not configured
GET/v1/mcp/statuslocal — connection status per server
POST/v1/mcp/reconnectlocal — reconnect all MCP clients and re-register tools
GET/v1/mcp/oauth?name=Xlocal — SSE OAuth login for one HTTP MCP server, mirroring the provider flow: emits {"url":...} for the browser, then {"done":true,"ok":...} (plus reconnect_error when the post-login reconnect fails). Times out after 10 minutes, or when the client disconnects. 404 when the server is not configured or is not an HTTP/SSE server
POST/v1/mcp/oauth/callbacklocal — {name, url}. Hands the redirect URL back when the browser cannot reach the daemon's loopback listener on localhost:17988; the code is parsed out of the URL's query. 400 if no login is waiting for that server
POST/v1/mcp/oauth/clientlocal — {name, client_id, client_secret?, redirect_uri?}. Stores a pre-registered OAuth client for servers that reject dynamic registration; redirect_uri defaults to http://localhost:17988/callback and must match the provider console exactly. Clears any existing token first and returns {ok, redirect_uri}; 404 under the same conditions as the login
DELETE/v1/mcp/oauthlocal — {name}. Clears both the stored token and the client registration for that server
中文