mcp-poc
A minimal MCP server with four tools (add, greet, text_stats, divide) demonstrating typed parameters, structured outputs, and error handling over stdio transport.
README
mcp-poc
A small Model Context Protocol (MCP) server that exposes the retrieval step of the sibling rag-poc project as an MCP tool — "RAG over MCP."
MCP is a standard way to give an LLM client (Claude Code, Claude Desktop, …) access to tools that live outside the model. Here the pattern is deliberate: the server does retrieval only — it embeds your query, finds the most similar chunks in rag-poc's local vector store, and hands them back. The client's model does the generation, reading those chunks and writing a grounded, cited answer. The server never calls a chat model.
The tool
| Tool | Signature | What it does |
|---|---|---|
rag_search |
(query: str, k: int = 4) -> list[dict] |
Embeds query with the same local Ollama model that built the store, cosine-ranks the stored chunks, and returns the top k as {source, score, text} (most similar first). |
The model calling it is expected to answer from the returned chunks and cite each
source, or say it doesn't know if they don't contain the answer.
How it connects to rag-poc
This repo doesn't reimplement RAG — it imports rag-poc's rag package. The server
puts the rag-poc folder on sys.path and reuses its vector store, query embedder,
and input-sanitising hook. By default it expects rag-poc as a sibling folder
(../rag-poc); point elsewhere with the RAG_POC_PATH environment variable. The
store is read from RAG_POC_PATH/store.npz.
Prerequisites
- Ollama running at
localhost:11434with thenomic-embed-textmodel pulled (ollama pull nomic-embed-text). The query must be embedded by the same model that embedded the documents. - rag-poc ingested so its store exists — in the rag-poc folder:
python main.py ingest.
Setup
cd "C:\Coding Space\mcp-poc"
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
Test it — two ways
1. MCP Inspector (no Claude needed):
mcp dev server.py
Open the printed URL, pick rag_search, enter a query (e.g. "What is retrieval-augmented generation?"),
and inspect the returned chunks with their similarity scores.
2. From Claude Code. Register the server so rag_search appears in your session:
claude mcp add mcp-poc -- "C:\Coding Space\mcp-poc\.venv\Scripts\python.exe" "C:\Coding Space\mcp-poc\server.py"
If rag-poc is not a sibling of this repo, pass its location when registering:
claude mcp add mcp-poc --env RAG_POC_PATH="C:\path\to\rag-poc" -- "C:\Coding Space\mcp-poc\.venv\Scripts\python.exe" "C:\Coding Space\mcp-poc\server.py"
Then /mcp lists connected servers, and you can ask a question about your indexed
docs — Claude will call rag_search, pull the relevant chunks, and answer from them.
Remove it with claude mcp remove mcp-poc.
Next steps
- Add a
rag_answertool that runs rag-poc's full local pipeline (Ollama generation) to compare "the client model generates" vs "the local model generates." - Expose the indexed documents as MCP resources, or add a prompt template for a standard "answer with citations" instruction.
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
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
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.