Documentation
¶
Overview ¶
Package mcp implements a Model Context Protocol server over stdio so an AI agent can operate Interceptor as a set of tools. It is a thin, well-described front end over the running control API (REST) — every tool maps to an endpoint the web UI also uses, so the human and the agent drive the same engine.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is an MCP stdio server backed by the control API at base.
func New ¶
New builds an MCP server that talks to the control API at baseURL (e.g. http://127.0.0.1:9966).
func (*Server) ServeHTTP ¶
func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements the MCP "Streamable HTTP" transport over a single endpoint. A client POSTs a JSON-RPC message (or batch) and receives the JSON-RPC response as application/json. The server is stateless — no Mcp-Session-Id is required — and offers no server-initiated SSE stream, so GET returns 405 (per spec). This lets a hosted/remote agent drive Interceptor without launching the `interceptor mcp` stdio subcommand. Bind localhost-only; it shares the (unauthenticated, local) trust model of the control API it fronts.