RAG MCP Server (Pinecone)
Enables searching and asking questions over your PDF documents using a Pinecone vector index with local embeddings and language model, no external LLM API key required.
README
RAG MCP Server (Pinecone)
FastMCP server exposing search_docs and ask_docs tools backed by a Pinecone
vector index. Embeddings (Qwen3-Embedding-0.6B) and answer generation
(Qwen2.5-1.5B-Instruct GGUF) run locally via transformers / llama.cpp — no
LLM API key required, only a Pinecone account.
Setup
- Copy
.env.exampleto.envand fill in:PINECONE_KEY=your_pinecone_api_key PINECONE_INDEX=your_index_name - Drop PDFs into
data/. - Install deps and ingest:
uv sync uv run python ingest.py - Run the server:
uv run python main.py - Query it:
uv run python client.py "your question"
Docker
Build and run with Docker Compose (recommended — persists the HuggingFace model cache in a named volume so models aren't re-downloaded on every restart):
docker compose up --build
The server listens on http://localhost:8000/mcp. data/ is mounted as a
volume, so PDFs added on the host are visible inside the container.
To ingest PDFs into Pinecone from inside the running container:
docker compose exec rag-mcp-server uv run python ingest.py
Without Compose
docker build -t rag-mcp-server .
docker run --rm -p 8000:8000 --env-file .env -v "$(pwd)/data:/app/data" rag-mcp-server
Notes
- The image installs build tools to compile
llama-cpp-python; first build is slow, subsequent ones are cached. - Models are downloaded from HuggingFace on first run, not baked into the
image — mount a volume over
/root/.cache/huggingface(already done indocker-compose.yml) to avoid re-downloading. MCP_HOST/MCP_PORTenv vars override the listen address (default0.0.0.0:8000in the container,127.0.0.1:8000for localuv run).
Files
ingest.py— chunk PDFs fromdata/, embed, upsert into Pinecone.server.py— MCP toolssearch_docs(retrieval + rerank) andask_docs(retrieval + local generation).models.py— local embedding/generation models.main.py— server entrypoint.client.py— example MCP client for manual testing.eval.py— Ragas evaluation (Faithfulness, AnswerRelevancy) of the RAG pipeline using the local Qwen models; writeseval_results.csv.
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.