FAQ RAG MCP Server

FAQ RAG MCP Server

Enables semantic search and question-answering over FAQ documents using RAG (Retrieval-Augmented Generation) with OpenAI embeddings and in-memory vector similarity.

Category
Visit Server

README

FAQ RAG + MCP Tool (Starter Skeleton)

This is a minimal starting point for the MCP option.

Contents

  • rag_core.py — RAG core
  • mcp_server.py — MCP server exposing ask_faq
  • faqs/ — tiny sample corpus
  • requirements.txt

Quick Start

python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt

export OPENAI_API_KEY=sk-...

# Optional model overrides
# export EMBED_MODEL=text-embedding-ada-002
# export LLM_MODEL=gpt-3.5-turbo

# Run a quick CLI smoke test
python rag_core.py

# Configure your MCP client to spawn the server
# command: python
# args: [/absolute/path/to/mcp_server.py]
# env: { OPENAI_API_KEY: "sk-..." }

Design Principles (Evaluation Criteria)

This implementation prioritizes Simplicity, Practicality, and Interface Correctness.

1. Simplicity over Over-Engineering

  • No Vector Database: Instead of adding heavy dependencies like Chroma or Pinecone, we use numpy for in-memory cosine similarity. For a filtered FAQ lists, this is faster, easier to debug, and removes deployment complexity.
  • FastMCP: We use the high-level FastMCP interface to reduce boilerplate, keeping the server code focused on logic rather than protocol details.
  • Global State: We preload the corpus at import time for simplicity in this specific "server" context, avoiding complex dependency injection containers.

2. Practicality

  • Robust Error Handling: The server uses structured logging and catches API errors (e.g., rate limits) to prevent crashes, returning user-friendly error messages to the LLM.
  • Exposed Resources: The faq:// resource allows the LLM (and developers) to inspect the raw content of any FAQ file, which is crucial for verifying answers or debugging retrieval issues.
  • Pre-defined Prompts: The ask_faq_expert prompt helps users/LLMs start with the right context immediately.

3. Interface Correctness

  • Standard MCP Patterns: We strictly follow MCP standards by exposing Tools (action), Resources (data), and Prompts (context).
  • Type Safety: All tools use Python type hints (str, int) which FastMCP automatically converts to JSON-Schema for the LLM to understand.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured