Mcp app
mcp_app
AXM MCP Server — discovery shell with a compact facade.
Discovers all AXMTool entry points from installed packages (e.g. axm,
axm-bib, axm-formal). By default it exposes them through a compact
facade (axm_search / axm_describe / axm_call /
axm_capabilities) plus a small hot path of tools that opt in via
expose_directly = True — keeping the tools/list payload small.
Set AXM_MCP_FACADE=0 to fall back to the legacy behaviour (register
every discovered tool directly), which makes the bascule reversible.
Imports from axm core are limited to axm.tools.base (shared types +
tool_metadata) — no business-tool implementations are imported here.
bind_session_from_headers(headers)
Bind a declared write contract to its request session identity.
Source code in packages/axm-mcp/src/axm_mcp/mcp_app.py
build_http_app()
contract_for_session_id(session_id)
Resolve the write contract attached to one MCP session identity.
current_session_id()
Return the identity of the in-flight MCP HTTP request.
Source code in packages/axm-mcp/src/axm_mcp/mcp_app.py
session_id_from_headers(headers)
Return the MCP session identity carried by request headers.
Source code in packages/axm-mcp/src/axm_mcp/mcp_app.py
| Python | |
|---|---|