README.md
Session-based memory and dynamic authentication using LangChain and Gemini.
A FastMCP server providing session-based memory and dynamic authentication using LangChain and Google Gemini. It enables persistent conversation history tracking through a session-ID system over HTTP transport.
Environment Variables
GOOGLE_API_KEYrequiredAPI key for Google Gemini integrationConfiguration
claude_desktop_config.json
{
"mcpServers": {
"mcp-middleware": {
"command": "npx",
"args": ["-y", "@tapanbhavsar/mcp_middleware"],
"env": {
"GOOGLE_API_KEY": "your-api-key-here"
}
}
}
}Try it
→Start a new session with ID 'user-123' to track our conversation history.
→Retrieve the previous context from my last session using the middleware memory.
→Use the Gemini-powered middleware to process this request with persistent session state.