Skip to main content

Module mcp

Module mcp 

Source
Expand description

MCP server exposing guarded query tools to agents MCP (Model Context Protocol) server over Streamable HTTP, for agents that cannot run the micromegas-query CLI.

The module holds the tool logic, guardrails and rendering and knows nothing about the host application. The host validates the bearer token (putting the resulting micromegas_auth::types::AuthContext in the request extensions) and supplies the tool providers; queries are forwarded to FlightSQL with the caller’s token, which stays the enforcement point.

Modules§

config
configuration read from MICROMEGAS_MCP_*
flight
FlightSQL access used by the query tools
provider
the ToolProvider seam between this module and its host
read_only
rejection of anything but read-only queries
render
capped markdown rendering of query results
server
MCP handler
skills
skills served over the MCP skills extension
tools
query and discovery tools

Functions§

register_routes
Adds the MCP route at config.path. The route does not authenticate: the host must layer a bearer validation middleware on the returned router.