Documentation
¶
Overview ¶
Package mcpserver exposes Beacon's local configuration and operational state through the Model Context Protocol. It is a thin transport over the same config.Service and stats.Registry used by the REST API and web UI, so MCP writes get identical validation, persistence, and hot reconciliation.
Index ¶
Constants ¶
const EndpointPath = "/mcp"
Variables ¶
This section is empty.
Functions ¶
func Handler ¶
func Handler(svc *config.Service, reg *stats.Registry, version string, log *slog.Logger) http.Handler
Handler serves the current MCP Streamable HTTP transport. It uses ordinary JSON responses because Beacon's tools complete synchronously and do not need server-to-client streaming. Sessions are still negotiated normally for broad client compatibility. Cross-origin protection enforces the MCP transport's Origin requirement while continuing to allow non-browser local/LAN agents.