`POST /api/v1/mcp/servers/:name/restart`, Restart a specific MCP server session.
POST/api/v1/mcp/servers/:name/restart
Restarts an existing session or first-time-connects one declared in mcp.db.
Stops the current session and spawns a new one using the original
configuration. When the server was declared in mcp.db but never
connected (e.g. the previous start was blocked by a missing OAuth token,
later supplied via apollia-os mcp oauth login), we fall back to a
fresh add_server call using the persisted config, making this route
the single "(re)connect this server now" endpoint operators need.
Returns 404 Not Found when the name is unknown to both the manager
and the repository.
Returns 503 Service Unavailable when MCP is not configured.
Request
Responses
- 200
- 400
- 403
- 404
- 500
- 503
Server restarted or (re)connected
Fallback connect failed
Forbidden by the organisation policy since the last start
Server not found
Repository error
MCP not configured