009fa095a2b7073b88c6b6dc0e39e1ab8fa4d12e
FAQ Bot with ChromaDB and MCP-style Tool
Overview
This repository implements a FAQ bot that answers questions about course materials using a local ChromaDB vector store and, when needed, a single MCP-style tool that fetches course metadata.
Features
- ChromaDB for semantic search over lecture markdown files.
- MCP-style tool (
fetch_course_meta) that simulates an external MCP service. - LangGraph‑based agent that routes queries to the appropriate tool and prefixes the answer with the source.
- CLI with preset questions and an interactive mode.
Setup
# Pull embeddings model
ollama pull nomic-embed-text
# Install dependencies
pip install -r requirements.txt
# Run a simple HTTP server to serve meta.json (for the MCP tool)
# In a separate terminal:
# python -m http.server 8000
Running the Bot
python main.py
The script will load the FAQ data, build the ChromaDB index, and then run the demo questions followed by an interactive prompt.
Project Structure
├── data/ # Markdown files with lecture notes
├── main.py # Entry point
├── requirements.txt
└── README.md
Notes
- The MCP tool currently points to
http://localhost:8000/meta.json. Replace with your actual endpoint if needed. - The agent uses
ChatOpenAIvia OpenRouter; setOPENAI_API_KEYin your environment.
Description
Languages
Python
100%