Create a new MCP module that exposes the NotPatrick RAG functionality through a FastMCP server for LibreChat integration.
- Add fastmcp to pyproject.toml dependencies
- Update project to support the new MCP module
src/
mcp/
__init__.py
main.py # FastMCP server implementation
- Create "hello world" MCP server in src/mcp/main.py
- Add a simple hello_world tool that returns a greeting
- Configure server to run on http://localhost:8000/mcp as expected by LibreChat
- Test integration with LibreChat to ensure MCP wiring works correctly
- Create rag.py to encapsulate the RAG setup logic from src/query/main.py
- Extract the chat engine initialization, Pinecone setup, and query processing
- Make it reusable for both CLI and MCP interfaces
- Add query_podcast tool to MCP server
- Create Dockerfile for containerizing the MCP server
- Create docker-compose.yml for easy deployment
- Ensure environment variables are properly configured
- Test containerized deployment
- Document the new MCP module and how to run it
- Add commands: uv run -m mcp.main and Docker instructions
- Document LibreChat integration steps
- Tool: hello_world() -> str - Simple greeting to test MCP integration
- Tool: query_podcast(question: str) -> str - Query the podcast knowledge base
- Resource: Potentially expose available episodes/metadata
- Test MCP integration early with simple functionality
- Containerized deployment for easy LibreChat integration
- Incremental development approach
- Maintains separation between CLI and web interfaces
- Start with minimal MCP server to verify LibreChat integration
- Incrementally add RAG functionality
- Containerize for production deployment
- Document for easy setup and maintenance