agent_mcp
MCP-style bridge for the agent surface: JSON-RPC over a backend-neutral
agent_core::Backend vtable, gated by AuthGate on the External channel.
Transports include newline-delimited JSON over Unix-domain sockets and a
loopback HTTP endpoint used where a local socket is not the platform path.
[dependencies]
agent_mcp = "*"
agent_core = "*"
json = "*"
stdlib = "*"
import "agent_mcp/agent_mcp" as mcp;
import "agent_core/auth" as auth;
import "agent_core/events" as events;
import "agent_core/backend" as backend;
import "stdlib/text" as text;
// vt = backend.mcp_backend() from a platform agent backend
// surf = #addr_of(surface) as *u8
let line: str = "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"describe_ui\",\"params\":{}}";
let resp: text::Text = mcp::handle_request(surf, vt, sub, gate, line);
Docs
- docs/tutorial.md — dispatch + UDS sketch
- docs/guide.md — protocol, consent, transport
- docs/ref.md — API + methods
Tests
Unit tests live with the package source when present:
cd vendor/agent_mcp && cpc test