Documentation
¶
Overview ¶
Package mcp is the MCP front door (docs/adr/0016): agents read, draft and propose through the same engine as people, with their person's authority and no more. Like the HTTP API and the sync socket, it is a driving adapter; it decides nothing the engine does not.
It is stateless: every request stands alone (MCP's sessionless transport), so it holds nothing open and a deployment still scales to zero (docs/adr/0015).
Index ¶
Constants ¶
const SubagentMeta = "cartograph/subagent"
SubagentMeta is the _meta key a client names a sub-agent by.
Variables ¶
This section is empty.
Functions ¶
func Handler ¶
Handler serves MCP over HTTP, sessionless. The principal is the one the authentication middleware put on the request: the person the agent acts for.
func ProductName ¶ added in v2.6.0
ProductName is a User-Agent's first product as a person reads it: claude-code/2.1 is Claude Code. Empty for a browser or a library.
Types ¶
type Options ¶
type Options struct {
Engine *engine.Engine
// Authz decides whether a principal may act through an agent at all
// (auth.ResourceAgent); nil allows it.
Authz auth.Authorizer
Reports reporting.Reporter
Presence Presence
Version string
// Trace records every tool call by its shape (docs/adr/0028); nil
// records none.
Trace trace.Recorder
}
Options are what the MCP server works through.