feat: replace server-side RAG with MCP retrieval primitives
- Remove Phase 4 RAG pipeline in favor of retrieval-only architecture - Add FastMCP server exposing search, get_chunk, list_libraries tools - Mount MCP endpoints (streamable HTTP + SSE) via Starlette in ASGI config - Update README to clarify Mnemosyne is a retrieval engine, not RAG - Let calling LLMs drive synthesis and iterative retrieval themselves
This commit is contained in:
19
mnemosyne/mcp_server/context.py
Normal file
19
mnemosyne/mcp_server/context.py
Normal file
@@ -0,0 +1,19 @@
|
||||
"""Helpers for accessing the request-scoped MCP user/token from inside tools."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from fastmcp.server.context import Context
|
||||
|
||||
from .auth import STATE_KEY_TOKEN, STATE_KEY_USER
|
||||
|
||||
|
||||
async def get_mcp_user(ctx: Context | None):
|
||||
if ctx is None:
|
||||
return None
|
||||
return await ctx.get_state(STATE_KEY_USER)
|
||||
|
||||
|
||||
async def get_mcp_token(ctx: Context | None):
|
||||
if ctx is None:
|
||||
return None
|
||||
return await ctx.get_state(STATE_KEY_TOKEN)
|
||||
Reference in New Issue
Block a user