MCP server API¶
locallore.server.mcp
¶
mcp = FastMCP('LocalLore', instructions='Offline memory for local Claude Code sessions.', streamable_http_path='/mcp', stateless_http=True, json_response=True, transport_security=TransportSecuritySettings(enable_dns_rebinding_protection=True, allowed_hosts=['127.0.0.1:8765'], allowed_origins=['http://127.0.0.1:8765']))
module-attribute
¶
healthz(_request)
async
¶
Return non-sensitive liveness after migration and listener startup.
Source code in src/locallore/server/mcp.py
statusz(_request)
async
¶
Source code in src/locallore/server/mcp.py
locallore_status()
¶
Report LocalLore index and offline-runtime status.
locallore_search(query, project=None, after=None, before=None, role=None, files=None, limit=8)
¶
Search indexed session history using full-text search and filters.
Source code in src/locallore/server/mcp.py
locallore_context(session_id, message_id, before=3, after=3)
¶
Return bounded messages surrounding one search result.
Source code in src/locallore/server/mcp.py
run_http_server()
¶
Serve the persistent, multi-client Streamable HTTP transport.