Mcp
Every registered mcp instance operation, with source-derived inputs, outputs, access policy, and errors.
This reference covers 6 HTTP operations registered by the Akasha daemon. Call these paths on your instance base URL. See authentication, errors, and coverage before integrating.
| Method | Path | Operation |
|---|---|---|
POST | /v1/mcp/tools/list | Mcp tools list |
POST | /v1/mcp/tools/call | Mcp tools call |
GET | /v1/mcp/health | Mcp health |
GET | /v1/mcp/connection | Mcp connection |
GET | /v1/mcp/stats | Mcp stats |
GET | /v1/mcp/history | Mcp history |
POST /v1/mcp/tools/list
List available MCP tools.
| Availability | Source contract |
|---|---|
| Registration | config.enable_mcp |
| Runtime service | mcp |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Json — McpToolsListRequest
struct McpToolsListRequest {}Response
Declared return: Result<impl IntoResponse, DaemonError>
The following are the exact JSON construction expressions in the handler. Values such as rows, result, and delegated types are runtime values, not literal example payloads.
serde_json::json!({
"tools": tool_list,
})Errors and validation
Directly referenced error variants: none in the handler body. Middleware and delegated services can return additional errors described in the shared error reference.
Source: akasha-daemon/src/mcp/handlers.rs:115. Registration: akasha-daemon/src/main.rs:4732.
POST /v1/mcp/tools/call
Call an MCP tool. The namespace and capabilities are derived from the authenticated capability token (injected by the auth layer), NOT from the request body. This prevents callers from escalating their privileges by sending an arbitrary namespace or capability set in the JSON payload.
| Availability | Source contract |
|---|---|
| Registration | config.enable_mcp |
| Runtime service | mcp |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped. Handler additionally checks require(required_action, Some(required_keyspace)).
Request
Json — McpToolsCallRequest
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
name | String | Yes | The name of the tool to call |
arguments | JsonValue | No; optional or defaulted | Arguments to pass to the tool Serde: default |
namespace | Option<String> | No; optional or defaulted | Optional caller-supplied namespace used by Cambium recall augmentation. Serde: default |
struct McpToolsCallRequest {
/// The name of the tool to call
pub name: String,
/// Arguments to pass to the tool
#[serde(default)]
pub arguments: JsonValue,
/// Optional caller-supplied namespace used by Cambium recall augmentation.
#[serde(default)]
pub namespace: Option<String>,
}JSON field accesses in handler: memory_types. Nested lookups are included; this list alone does not establish requiredness.
Response
Declared return: Result<impl IntoResponse, DaemonError>
The following are the exact JSON construction expressions in the handler. Values such as rows, result, and delegated types are runtime values, not literal example payloads.
resultErrors and validation
Directly referenced error variants: Internal, InvalidRequest. Middleware and delegated services can return additional errors described in the shared error reference.
Source: akasha-daemon/src/mcp/handlers.rs:132. Registration: akasha-daemon/src/main.rs:4733.
GET /v1/mcp/health
MCP service health endpoint.
| Availability | Source contract |
|---|---|
| Registration | config.enable_mcp |
| Runtime service | mcp |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
No typed JSON, query, or path extractor is declared in the handler signature. Headers or request objects may still be consumed; the signature below is authoritative.
Response
Declared return: Result<impl IntoResponse, DaemonError>
The following are the exact JSON construction expressions in the handler. Values such as rows, result, and delegated types are runtime values, not literal example payloads.
serde_json::json!({
"status": "healthy",
"tool_count": tools.tool_count(),
})Errors and validation
Directly referenced error variants: none in the handler body. Middleware and delegated services can return additional errors described in the shared error reference.
Source: akasha-daemon/src/mcp/handlers.rs:208. Registration: akasha-daemon/src/main.rs:4734.
GET /v1/mcp/connection
Mcp connection
| Availability | Source contract |
|---|---|
| Registration | config.enable_mcp |
| Runtime service | mcp |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
No typed JSON, query, or path extractor is declared in the handler signature. Headers or request objects may still be consumed; the signature below is authoritative.
Response
Declared return: Result<impl IntoResponse, DaemonError>
The following are the exact JSON construction expressions in the handler. Values such as rows, result, and delegated types are runtime values, not literal example payloads.
serde_json::json!({
"endpoint": "embedded",
"protocol": "stdio",
"status": if connected { "connected" } else { "disconnected" },
"lastPing": chrono::Utc::now().to_rfc3339(),
"version": "1.0",
"capabilities": ["tools"]
})Errors and validation
Directly referenced error variants: none in the handler body. Middleware and delegated services can return additional errors described in the shared error reference.
Source: akasha-daemon/src/main.rs:10552. Registration: akasha-daemon/src/main.rs:4735.
GET /v1/mcp/stats
Mcp stats
| Availability | Source contract |
|---|---|
| Registration | config.enable_mcp |
| Runtime service | mcp |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Implementation limit: Only tool_count is read from the registry; callsToday, avgLatencyMs, errorRate, and topTools are fixed placeholder values.
No typed JSON, query, or path extractor is declared in the handler signature. Headers or request objects may still be consumed; the signature below is authoritative.
Response
Declared return: Result<impl IntoResponse, DaemonError>
The following are the exact JSON construction expressions in the handler. Values such as rows, result, and delegated types are runtime values, not literal example payloads.
serde_json::json!({
"totalTools": tool_count,
"callsToday": 0,
"avgLatencyMs": 0,
"errorRate": 0,
"topTools": []
})Errors and validation
Directly referenced error variants: none in the handler body. Middleware and delegated services can return additional errors described in the shared error reference.
Source: akasha-daemon/src/main.rs:10566. Registration: akasha-daemon/src/main.rs:4736.
GET /v1/mcp/history
Mcp history
| Availability | Source contract |
|---|---|
| Registration | config.enable_mcp |
| Runtime service | mcp |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
No typed JSON, query, or path extractor is declared in the handler signature. Headers or request objects may still be consumed; the signature below is authoritative.
Response
Declared return: Result<impl IntoResponse, DaemonError>
The following are the exact JSON construction expressions in the handler. Values such as rows, result, and delegated types are runtime values, not literal example payloads.
serde_json::json!(entries)Errors and validation
Directly referenced error variants: none in the handler body. Middleware and delegated services can return additional errors described in the shared error reference.
Source: akasha-daemon/src/main.rs:10583. Registration: akasha-daemon/src/main.rs:4737.