mcp_server/
The Model Context Protocol server uses MCPServer from the Python SDK. It exposes analysis tools, playbook prompts, and case resources. See the MCP reference for the catalog.
server.py— registers@mcp.toolhandlers, delegating to the surface-agnostic producers in theapp/layer.presenters.py— the MCP presenter: turns a producer’sServiceResultinto the MCP tool response (inlining any lock diagnostic with the MCP parameter names).session.py— re-exportsmemdiver.app.session.ToolSession(dataset root, scan cache, protocol version).tools.py,tools_inspect.py,tools_xref.py,tools_pipeline.py— aliases for the corresponding modules inmemdiver.app. They preserve existing imports. Usememdiver.appor the publicmemdiver.servicesinterface in new code.Transport:
stdioby default;--sse --portfor Server-Sent Events (listener bound to127.0.0.1; host/port are passed toMCPServer.run()).No authentication (local-only). SSE port must not be exposed publicly.
Shares the process-wide dump and Memory Slice reader cache in
app.reader_cache. The API also exposes it throughapi.services.reader_cache.
Tool catalogue: see MCP tool reference.