class WarpEngine::Api::Admin::McpController
The Admin API’s MCP (Model Context Protocol) endpoint: JSON-RPC over HTTP POST, exposing the registered operations as tools. Responds 404 unless the host enabled MCP.
Public Instance Methods
Source
# File app/controllers/warp_engine/api/admin/mcp_controller.rb, line 16 def create authenticate! WarpEngine::AdminApi::Mcp.ensure_available! message = parse_message return if performed? answer = WarpEngine::AdminApi::Mcp.server(principal: current_principal, base_url: engine_base_url) .handle(message) answer.nil? ? head(:accepted) : render(json: answer) end
POST <admin path>/mcp.
Authenticates the admin token, parses the JSON-RPC message from the raw body and hands it to the MCP server. Renders the JSON-RPC answer, 202 with no body for a notification, or 400 with a JSON-RPC parse error when the body is not JSON.
Source
# File app/controllers/warp_engine/api/admin/mcp_controller.rb, line 32 def method_not_allowed response.headers["Allow"] = "POST" head :method_not_allowed end
GET and DELETE <admin path>/mcp.
Responds 405 with Allow: POST; the endpoint keeps no streams or sessions.