Skip to main content

Module mcp

Module mcp 

Source
Expand description

Model Context Protocol server for AI agents.

Layout: auth (bearer tokens → scope), tools (the typed tool functions over crate::state::SharedState), docs (documentation pages embedded in the binary), prompts (precompiled debugging and authoring prompts). Everything here compiles in every build — the Admin API’s /api/mcp/prompts uses the renderer even without a transport. Only server (the rmcp adapter and the mounted Streamable HTTP service) sits behind the mcp cargo feature.

Modules§

auth
Bearer-token authentication for the MCP endpoint.
docs
Documentation pages embedded in the binary and served to agents as MCP resources (featherbit://docs/...). The docs site’s Markdown is the single source of truth for plugin config keys, so agents read the same pages humans do — minus Docusaurus frontmatter and JSX.
prompts
Precompiled prompts: the “what is happening here?” / “why did this node exit on false?” questions, rendered with live data so the agent’s model starts from the facts. The same renderer backs MCP prompts/get and the Admin API’s GET /api/mcp/prompts/{name} (the UI’s “copy as agent prompt”), so the two are byte-identical.
server
rmcp adapter: exposes the tool/resource/prompt layer over MCP and builds the Streamable HTTP tower service mounted on the admin router.
tools
The MCP tool layer: typed functions over SharedState plus the registry the server advertises. Transport-agnostic — the rmcp adapter in server.rs and the Admin API’s prompt renderer both call into here.

Functions§

disabled_router
Router fragment answering the MCP path with 404 when the feature is off or admin.mcp.enabled is false (the /api/debug/* convention: never advertise a disabled surface).
router
The live MCP endpoint: bearer auth → rmcp Streamable HTTP service.