pub struct MCPApi { /* private fields */ }Expand description
Model Context Protocol server endpoints
Implementations§
Source§impl MCPApi
impl MCPApi
Sourcepub async fn create_mcp_server(
&self,
body: &CreateMCPServerRequest,
) -> Result<MCPServer>
pub async fn create_mcp_server( &self, body: &CreateMCPServerRequest, ) -> Result<MCPServer>
Create MCP server
POST /api/v1/mcp/servers
Sourcepub async fn delete_mcp_server(&self, server_id: &str) -> Result<Value>
pub async fn delete_mcp_server(&self, server_id: &str) -> Result<Value>
Delete MCP server
DELETE /api/v1/mcp/servers/{serverId}
Sourcepub async fn get_mcp_server(&self, server_id: &str) -> Result<MCPServer>
pub async fn get_mcp_server(&self, server_id: &str) -> Result<MCPServer>
Get MCP server
GET /api/v1/mcp/servers/{serverId}
Sourcepub async fn list_mcp_servers(&self) -> Result<ListMCPServersResponse>
pub async fn list_mcp_servers(&self) -> Result<ListMCPServersResponse>
List MCP servers
GET /api/v1/mcp/servers
Sourcepub async fn mcp_json_rpc(
&self,
body: &McpjsonRpcRequest,
params: &MCPJSONRpcParams,
) -> Result<Value>
pub async fn mcp_json_rpc( &self, body: &McpjsonRpcRequest, params: &MCPJSONRpcParams, ) -> Result<Value>
MCP JSON-RPC endpoint
JSON-RPC 2.0 dispatch into the MCP server runtime. The X-UARP-Agent-Id header is required
so the MCP server can scope tool/resource visibility to a single agent; missing or malformed
headers return 400.
POST /api/v1/mcp
Sourcepub fn mcp_sse(&self) -> EventStream
pub fn mcp_sse(&self) -> EventStream
MCP SSE transport (Server-Sent Events)
GET /api/v1/mcp
Returns a server-sent event stream.
Sourcepub async fn test_mcp_server(
&self,
server_id: &str,
) -> Result<MCPServerTestResult>
pub async fn test_mcp_server( &self, server_id: &str, ) -> Result<MCPServerTestResult>
Probe an MCP server’s live connection
Opens a real connection and lists the server’s tools. A failed probe is still 200 — ok
is the verdict, not the status code, because a server that refuses to connect is an answer
about the server rather than about the request. Read ok first: on false, error carries
the reason (including an SSRF refusal when the URL resolves to a private address) and
tool_count/tools are absent.
POST /api/v1/mcp/servers/{serverId}/test
Sourcepub async fn update_mcp_server(
&self,
server_id: &str,
body: &Map<String, Value>,
) -> Result<MCPServerWithConnectResult>
pub async fn update_mcp_server( &self, server_id: &str, body: &Map<String, Value>, ) -> Result<MCPServerWithConnectResult>
Update MCP server
PATCH /api/v1/mcp/servers/{serverId}