Documentation
¶
Overview ¶
Package mcp exposes a roost's privileged tools as a role-scoped MCP server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OriginAllowed ¶
Native MCP clients omit Origin. Browser-originated requests must be same-host to prevent DNS rebinding; reverse proxies preserve the external Host header.
Types ¶
type CallEnvFunc ¶
CallEnvFunc supplies trusted per-request identity variables to the privileged tool process.
type CallObserver ¶
CallObserver receives allowed and denied tool-call attempts for centralized auditing.
type RolePolicy ¶
type RolePolicy = config.MCPRoleConfig
RolePolicy aliases one role in the wing.yaml MCP configuration.
type RolesFunc ¶
RolesFunc resolves all caller roles from the request. Disabled roles contribute no access; tools allowed by any enabled role are included in the caller's maximum subset.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is an MCP-over-HTTP (Streamable HTTP) endpoint over a shared ToolRunner, gated by a per-role Policy.
func (*Server) ServeHTTP ¶
func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP handles a single JSON-RPC request per POST (stateless Streamable HTTP).
func (*Server) SetCallEnv ¶
func (s *Server) SetCallEnv(callEnv CallEnvFunc)
func (*Server) SetCallObserver ¶
func (s *Server) SetCallObserver(observer CallObserver)