mcp-local-rag

mcp-local-rag

A local MCP server performing RAG-like web search with DuckDuckGo and MediaPipe embeddings.

91
Stars
19
Forks
0
Releases

Overview

mcp-local-rag is a local MCP server implementing a primitive RAG-like web search context protocol. It runs locally with no APIs exposed, designed to integrate with MCP clients that support tool calls. When an LLM submits a query, the server uses DuckDuckGo to fetch search results (10 results per query), obtains embeddings from Google's MediaPipe Text Embedder, and computes similarity to rank the results. It then selects the top results and extracts context from the URLs by converting HTML content to Markdown for the LLM. The resulting contextual content is returned to the language model, which can generate a final response that incorporates fresh web information. The repository provides a Mermaid diagram illustrating the end-to-end flow, and deployment options via uvx or Docker. Docker deployment uses the container image ghcr.io/nkapila6/mcp-local-rag:latest. Overall, this is a lightweight, API-free MCP server intended for local experimentation with retrieval-augmented generation.

Details

Owner
nkapila6
Language
Python
License
MIT License
Updated
2025-12-07

Features

Local MCP server with no APIs

Runs locally with no external APIs exposed; designed for offline-style operation and easy local integration.

DuckDuckGo web search integration

Queries DuckDuckGo to fetch 10 search results for each query to drive retrieval.

Embedding-based ranking

Fetches embeddings from Google's MediaPipe Text Embedder and ranks results by similarity to the query.

Context extraction from URLs

Extracts contextual content from the top results and formats it as Markdown for the LLM.

MCP client compatibility

Designed to work with MCP clients that support tool calling; tested with Claude Desktop, Cursor, Goose.

Primitive RAG-like workflow

Implements a retrieval-augmented generation flow to provide fresh web context to the LLM.

Configurable via MCP settings

Configured through MCP server settings JSON using uvx or Docker-based commands.

Dockerized deployment

Provides a Docker image ghcr.io/nkapila6/mcp-local-rag:latest for straightforward deployment.

Audience

LLM developersIntegrate a local, API-free MCP server to fetch recent web information for chat prompts.
ResearchersPrototype RAG-like retrieval workflows on local infrastructure using MCP clients that support tool calls.

Tags

mcpMCP serverRAG-likeweb searchembeddingsDuckDuckGoMediaPipe Text Embedderlocalno APIsuvxDocker