08c56700c8170d5967b5878b5029aa4c85326b30
FAQ‑Bot – ChromaDB + MCP Tool
Overview
This project implements an FAQ‑bot that answers questions about local course notes stored in Markdown files using ChromaDB for retrieval and a single MCP‑style tool for metadata queries.
- Local knowledge – 2–3
.mdfiles indata/. - Vector store – ChromaDB with Ollama embeddings.
- Tool –
fetch_course_metathat performs a GET request to a local JSON file (mock MCP server). - Agent – LangGraph agent that routes the query to the appropriate source and labels the answer with
source: chroma | mcp_meta. - CLI – 3 example questions (2 for Chroma, 1 for meta) and an interactive mode.
Setup
# Pull Ollama model
ollama pull nomic-embed-text
# Install dependencies
pip install -r requirements.txt
# Start local mock MCP server (JSON file)
python -m http.server 8000 --directory mock
Running the Bot
python main.py --question "What is the course schedule?"
Example Questions
- Chroma – "What topics are covered in week 3?"
- Chroma – "How many hours per week are required?"
- Meta – "What is the course schedule?"
Project Structure
├── data/ # Markdown FAQ files
├── mock/ # JSON mock MCP server
├── src/
│ ├── agent.py # LangGraph agent definition
│ ├── chunker.py # Chroma loader
│ ├── cli.py # CLI interface
│ ├── config.py # Config & constants
│ ├── init_loader.py # Bulk loader
│ ├── qdrant_store.py # Vector store helper
│ ├── rag_tools.py # Search & meta tools
│ ├── tools.py # MCP wrapper
│ └── vector_store.py # Chroma store
└── requirements.txt
License
MIT
Description
Languages
Python
100%