ZAP RAG MCP Server

ZAP RAG MCP Server

Read-only MCP server that exposes ZAP's RAG search modes (plain, hybrid, hybrid_rerank) for agents to perform semantic code retrieval.

Category
Visit Server

README

ZAP RAG MCP Server

Standalone Model Context Protocol (MCP) server that exposes only ZAP’s RAG search modes for other agents (Kilo, Cursor, Claude Desktop, Continue, etc.).

Works with the SQLite index built by the ZAP IntelliJ plugin (rag.db).

Tool Description
zap_rag_status DB health, chunk/embedding counts, models, modes
zap_rag_search Semantic search: PLAIN / HYBRID / HYBRID_RERANK

Read-only. No write tools, no agent loop — retrieval only.

Modes

Mode Behavior Needs
PLAIN Cosine over code-chunk embeddings Index + embeddings
HYBRID Weighted class summaries + code Class summaries at index time
HYBRID_RERANK Hybrid pool → LLM rerank Chat API key

Install

cd zap-rag-mcp
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt

Environment

Variable Required Description
ZAP_DB_PATH Yes Absolute path to ZAP rag.db
ZAP_EMBEDDING_BASE_URL Yes* OpenAI-compatible embeddings base URL
ZAP_EMBEDDING_API_KEY Yes* API key (ollama ok for local)
ZAP_EMBEDDING_MODEL Yes* Must match model used when indexing
ZAP_CHAT_BASE_URL Rerank Chat completions base
ZAP_CHAT_API_KEY Rerank Chat API key
ZAP_CHAT_MODEL Rerank Chat model name
ZAP_RETRIEVAL_MODE No Default mode (PLAIN)
ZAP_TOP_K No Default top_k (10)
ZAP_PROJECT_PATH No Scope to this project path
ZAP_SEARCH_ENTIRE_DATABASE No true = no project filter

* Falls back to OPENAI_BASE_URL / OPENAI_API_KEY if set.

Find the DB path in IntelliJ: Settings → ZAP → Database path.

Run

$env:ZAP_DB_PATH = "C:\path\to\rag.db"
$env:ZAP_EMBEDDING_BASE_URL = "http://127.0.0.1:11434/v1"
$env:ZAP_EMBEDDING_API_KEY = "ollama"
$env:ZAP_EMBEDDING_MODEL = "nomic-embed-text"
python server.py

MCP over stdio (no HTTP port).

MCP host config (Kilo / Cursor / Claude Desktop)

See mcp.example.json. Example:

{
  "mcpServers": {
    "zap-rag": {
      "command": "C:\\path\\to\\zap-rag-mcp\\.venv\\Scripts\\python.exe",
      "args": ["C:\\path\\to\\zap-rag-mcp\\server.py"],
      "env": {
        "ZAP_DB_PATH": "C:\\path\\to\\rag.db",
        "ZAP_EMBEDDING_BASE_URL": "http://127.0.0.1:11434/v1",
        "ZAP_EMBEDDING_API_KEY": "ollama",
        "ZAP_EMBEDDING_MODEL": "nomic-embed-text"
      }
    }
  }
}

Agent skill

See .grok/skills/searching-zap-rag/SKILL.md (Anthropic Agent Skills: third-person description, progressive references/) for how coding agents should call the tools.

Related

License

Apache-2.0

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
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
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
E2B

E2B

Using MCP to run code via e2b.

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
Qdrant Server

Qdrant Server

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

Official
Featured