hr-faq-rag
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@hr-faq-ragHow many vacation days do employees get?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
FAQ RAG Chatbot — PeopleForce HR SaaS
Intelligent support chatbot system for FAQs based on Retrieval-Augmented Generation (RAG). It processes an FAQ document from an HR SaaS company, indexes it in a vector database, and answers user questions by retrieving the most relevant fragments from the document to generate accurate responses with an LLM. This eliminates the need for manual searches and reduces the burden on the customer support team.
RAG Architecture
┌──────────────────────────────────────────────────────────────────┐
│ PIPELINE DE INDEXACIÓN │
│ │
│ faq_document.txt ──► Chunking ──► Embeddings ──► ChromaDB │
│ (300 chars, (text-embedding (persistente │
│ 50 overlap) -3-small) local) │
└──────────────────────────────────────────────────────────────────┘
┌──────────────────────────────────────────────────────────────────┐
│ PIPELINE DE CONSULTA │
│ │
│ Pregunta ──► Embedding ──► k-NN Search ──► Contexto ──► LLM │
│ del usuario de query (coseno, (top-k (gpt-4o │
│ ChromaDB) chunks) -mini) │
│ │ │
│ ▼ │
│ JSON Response │
│ { user_question, │
│ system_answer, │
│ chunks_related } │
└──────────────────────────────────────────────────────────────────┘Related MCP server: RAG-MCP
Installation
1. Clone the repository
git clone <repo-url>
cd kunz-mcp-project2. Create virtual environment and install dependencies
python -m venv .venv
source .venv/bin/activate # macOS/Linux
# .venv\Scripts\activate # Windows
pip install -r requirements.txt3. Configure API Key
cp .env.example .env
# Edita .env y agrega tu clave de OpenAI:
# OPENAI_API_KEY=sk-...Usage
Run the indexing pipeline
python src/build_index.pyThis loads data/faq_document.txt, splits it into chunks, generates embeddings, and stores them in ChromaDB (data/chroma_db/).
Run a query
python src/query.py "¿Cuántos días de vacaciones me corresponden?"Example JSON output:
{
"user_question": "¿Cuántos días de vacaciones me corresponden?",
"system_answer": "Todos los colaboradores de tiempo completo tienen derecho a 15 días hábiles de vacaciones al año a partir de su primer aniversario. Con más de 3 años de antigüedad, se reciben 20 días hábiles, y con más de 7 años, 25 días hábiles.",
"chunks_related": [
{
"text": "¿Cuántos días de vacaciones me corresponden?...",
"metadata": {
"chunk_index": 1,
"total_chunks": 30,
"source": "faq_document.txt"
}
}
]
}Run the evaluator agent (Bonus)
python src/evaluator.pyEvaluates the responses in outputs/sample_queries.json and returns a 0-10 score with justification.
MCP Server (Model Context Protocol)
The project includes src/mcp_server.py, which exposes the RAG pipeline as an MCP server so that AI agents (Claude Desktop, Cursor, VS Code with Copilot, etc.) can invoke the tools directly.
Available Tools
Tool | Description |
| Full RAG pipeline: searches in ChromaDB and generates response with GPT-4o-mini |
| Evaluates the quality of a RAG response (0-10 score with justification) |
| Reindex the FAQ document in ChromaDB (useful after updating the FAQ) |
Prerequisite
Make sure you have built the index before starting the server:
python src/build_index.pyOption A — Run directly (stdio mode)
python src/mcp_server.pyThis launches the server in stdio mode, compatible with any MCP client.
Option B — Run with MCP CLI
mcp run src/mcp_server.pyOption C — Integrate with Claude Desktop
Edit the Claude Desktop configuration file:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"hr-faq-rag": {
"command": "python",
"args": ["/ruta/absoluta/a/kunz-mcp-project/src/mcp_server.py"],
"env": {
"OPENAI_API_KEY": "sk-..."
}
}
}
}Restart Claude Desktop. The server will appear as an available tool in the chat.
Option D — Integrate with Cursor or VS Code
Add to the editor's MCP configuration (.cursor/mcp.json or settings.json):
{
"mcpServers": {
"hr-faq-rag": {
"command": "python",
"args": ["src/mcp_server.py"]
}
}
}Note: the server reads
OPENAI_API_KEYfrom the project's.envfile; if the editor does not inherit the environment, pass it explicitly in the"env"block as shown in Option C.
Project structure
kunz-mcp-project/
├── README.md # Documentación del proyecto
├── requirements.txt # Dependencias con versiones
├── .env.example # Plantilla de variables de entorno
├── config.yaml # Configuración del modelo, embeddings y RAG
├── data/
│ └── faq_document.txt # Documento FAQ fuente (≥1000 palabras)
├── src/
│ ├── __init__.py
│ ├── build_index.py # Pipeline de indexación (load → chunk → embed → store)
│ ├── query.py # Pipeline de consulta (search → generate → JSON)
│ ├── evaluator.py # Agente evaluador de calidad (bonus)
│ ├── mcp_server.py # Servidor MCP (expone los tools vía FastMCP)
│ └── shared/
│ ├── __init__.py
│ ├── config_loader.py # Carga config.yaml + .env
│ └── logger.py # Logger con Rich (colores y formato)
└── outputs/
└── sample_queries.json # ≥3 ejemplos de consulta-respuestaTechnical decisions
Chunking strategy
RecursiveCharacterTextSplitter is used with chunk_size=300 and chunk_overlap=50.
Why recursive? Hierarchical separators (
\n\n→\n→.→) preserve the natural semantic boundaries of the text (sections, paragraphs, sentences), producing more coherent chunks than a fixed-size cut.Why 300 characters? It generates chunks of ~75-125 tokens, within the required range of 50-500 tokens. Smaller chunks improve vector search accuracy by reducing semantic noise.
Why 50 overlap? The overlap ensures context continuity between adjacent chunks, preventing relevant information from being cut off at a boundary.
Vector search method
k-NN (k-Nearest Neighbors) with cosine similarity is used over the HNSW index of ChromaDB.
Why k-NN? It is the most direct and predictable method for similar vector search. ChromaDB optimizes internally with HNSW (Hierarchical Navigable Small World) for sub-linear searches.
Why cosine? Cosine similarity measures the semantic direction of vectors, not their magnitude. It is ideal for normalized text embeddings like those from OpenAI (
text-embedding-3-small), where vectors with similar meaning point in the same direction.Top-k = 3 returns between 2-5 chunks per query, enough to provide context without introducing noise.
RAG benefits
Update without re-training: Simply update the source document and re-index, without the need for costly LLM fine-tuning.
Transparency: Each response includes the chunks used (
chunks_related), allowing verification of the information source.Attribution: The metadata of each chunk (
source,chunk_index) enables full traceability of the response.
Configuration
The config.yaml file centralizes all parameters:
Parameter | Value | Description |
|
| LLM model for generation |
|
| Low temperature for consistent responses |
|
| Embedding model (1536 dims) |
|
| Maximum chunk size in characters |
|
| Overlap between chunks |
|
| Chunks to retrieve per query |
|
| Name of the collection in ChromaDB |
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceAn enterprise-ready MCP server that exposes a RAG tool for retrieving relevant context and metadata from a Qdrant vector database using natural language queries.2
- FlicenseNot gradedqualityDmaintenanceA Retrieval Augmented Generation MCP server that ingests documents into a local vector database and enables semantic search queries.10
- FlicenseNot gradedqualityBmaintenanceMCP server for a modular RAG system that enables natural language question answering over enterprise documents with intent-aware routing, adaptive retrieval, and citation-backed responses.
- FlicenseNot gradedqualityCmaintenanceEnables querying company knowledge base using RAG, providing accurate answers from internal documents via MCP.
Related MCP Connectors
MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.
Official Microsoft MCP Server to query Microsoft Entra data using natural language
MCP server giving Claude AI access to 22+ NYC public-record databases for real estate due diligence
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/fellgar246/kunz-mcp-project'
If you have feedback or need assistance with the MCP directory API, please join our Discord server