Documentation
¶
Overview ¶
Package mcpserver exposes AgentProvenance's AI tool surface over the Model Context Protocol (MCP, spec revision 2025-06-18) as a stdio JSON-RPC 2.0 server. It is a thin transport over internal/aitools: the tool catalog and dispatcher are the single source of truth, so an MCP client (Claude Desktop, the mcp inspector, etc.) sees exactly the same read surface + inline policy gate as the `agentprov ai` CLI and the provider adapters.
Trust boundary is inherited from aitools (see docs/ai-access.md): tools let a model QUERY the verifiable graph and pre-flight a proposed action; the gate verdict is computed by the trusted engine, never fabricated by the model.
Wire framing is newline-delimited JSON (one JSON-RPC message per line). Only JSON-RPC is written to the output stream -- callers must keep diagnostics on stderr so the stdout channel stays clean for the client.
Index ¶
Constants ¶
const ProtocolVersion = "2025-06-18"
ProtocolVersion is the MCP spec revision this server implements. During the initialize handshake we echo the client's requested version when it sends one (maximizing client compatibility) and fall back to this otherwise.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.