MCP JSON-RPC endpoint
A Model Context Protocol server over JSON-RPC (Streamable HTTP). Supports `initialize`, `ping`, `tools/list`, and `tools/call`. Authenticate with the MCP bearer token (external clients) or a signed-in session. A client sees only the tools switched on in the MCP tab of the Assistant settings (`mcpTools` on `GET /api/ai/settings`; null means the recommended set), and each call is gated by the token's (or user's) role. `initialize` returns an `Mcp-Session-Id` header to send on later requests. Protocol versions 2024-11-05, 2025-03-26, and 2025-06-18 are accepted. Send `Accept: text/event-stream` to receive the reply as a Server-Sent Event; a `tools/call` that carries a progress token streams progress notifications before its result.
The Udon MCP access token, generated in Settings → Assistant. Sent as Authorization: Bearer <token> by external MCP clients.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/mcp" \ -H "Content-Type: application/json" \ -d '{ "method": "string" }'MCP server-initiated stream (unsupported) GET
The MCP Streamable HTTP transport's GET opens a server-initiated event stream. Udon does not offer one, so this always answers 405 with an `Allow` header, as the MCP specification prescribes.
Revoke the MCP access token DELETE
Deletes the stored MCP access token, so external clients using it stop being authenticated. Admin only.