pow-mcp-rag-new
This MCP server indexes project documentation, source code, and structured logs into a local vector database and exposes tools to search, inspect, compare, and manage indexed projects.
Semantic search across documentation, specs, and code, with project and file-type filters.
Exact text lookup for hex patterns, variables/constants, and function definitions/usages.
Retrieve full documents, list projects/files, get project summaries, and compare the same concept across two projects.
Manage indexing by adding projects, files, folders, and glob patterns; remove projects, clear project indexes, or remove individual files from the index.
Search indexed logs with semantic query plus filters for severity, time range, error-code prefix, device ID, and event type.
Index specific log files or time windows on demand.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@pow-mcp-rag-new find the function that indexes PDFs"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
pow-mcp-rag-new
A local RAG (Retrieval-Augmented Generation) MCP server for project documentation and code.
Overview
This project provides a Model Context Protocol (MCP) server that indexes project documentation (specs, headers, source files, PDFs, configs) into a local vector database (ChromaDB) and exposes semantic search tools to Kiro or any MCP-compatible client.
Supports multiple tech stacks: C/C++, Python, Go, C#, Node.js/TypeScript.
Distribution name: pow-rag-mcp (unrelated to rag-mcp or rag-mcp-server packages).
Minimum Python version: 3.11 (matches requires-python = ">=3.11" in pyproject.toml).
Three deployment modes:
Docker (Phase 1) — zero local Python needed; server runs in a container
PyPI (recommended for new users) (Phase 2a) — install via
uvx --from,uv tool install, orpip installfrom PyPI; no repo checkout or local index neededLocal PyPI + uvx (Phase 2b) — install
rag-mcpviauvxfrom a local package index; no persistent venv, easiest to keep updated. Stepping stone toward a hosted index.pip install (Phase 2c) — install
rag-mcpdirectly into a Python environment.llamaindex (Phase 3): Using of llamaindex to handle several different data sources.
Related MCP server: ragi
License
This project is licensed under the Apache 2.0 License — see the LICENSE file for details.
Quick Start
PyPI (recommended for new users)
Install from PyPI using your preferred method:
Option 1: One-off execution with uvx
uvx --from pow-rag-mcp rag-mcp serveOption 2: Persistent install with uv tool install
uv tool install pow-rag-mcpOption 3: Traditional pip
pip install pow-rag-mcpAll three methods fetch pow-rag-mcp from PyPI directly — no repository checkout or local package index is required.
See doc/PIP_INSTALL_GUIDE.md for full details (config seeding, bundled docs, upgrades, and migrating to a hosted index).
Local PyPI + uvx (recommended for development/publishing workflows)
cd <your-checkout>/pow-mcp-rag-new
setup-pypi.batThis builds the wheel, publishes it to a local pypiserver index (packages/), installs it as a
persistent uv tool (a stable exe at ~/.local/bin/rag-mcp.exe — resolved once, not on
every launch), and wires up ~/.kiro/settings/mcp.json + .vscode/mcp.json to launch it directly.
No Docker, no persistent venv to manage. See TROUBLESHOOTING.md for why
this is preferred over plain uvx --from on Windows with this package's large dependency tree.
Full guide: doc/PIP_INSTALL_GUIDE.md
Docker (alternative)
cd <your-checkout>/pow-mcp-rag-new
docker build -t rag-mcp-new-pip:latest .
# Index your projects (set SRC to your repos folder)
$SRC = "C:/Users/you/GIT" # PowerShell
docker run --rm -v "${SRC}:/projects:ro" -v rag-mcp-new-pip-data:/app/data rag-mcp-new-pip:latest python indexer.pyThen add to ~/.kiro/settings/mcp.json:
{
"mcpServers": {
"rag-mcp": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-v", "C:/Users/you/GIT:/projects:ro",
"-v", "rag-mcp-new-pip-data:/app/data",
"rag-mcp-new-pip:latest",
"python", "server.py", "--no-reindex"
],
"disabled": false,
"autoApprove": [
"search_docs", "search_specs", "search_code", "search_logs",
"list_projects", "list_files", "get_document", "get_project_summary",
"find_function", "find_variable", "search_hex_pattern", "compare_projects",
"add_project", "add_file", "add_folder", "add_pattern", "index_log_file"
]
}
}
}Restart Kiro — the RAG is ready. Full guide: doc/DOCKER_GUIDE.md
(project management, HTTP server, docker run CLI reference, setup-docker.bat automation).
pip install (hosted index, once available)
pip install torch --index-url https://download.pytorch.org/whl/cpu
rag-mcp config # seeds config on first run, shows resolved paths
rag-mcp index
rag-mcp serveFull guide: doc/PIP_INSTALL_GUIDE.md
Documentation
Reading this from
pip show/ a package-index page instead of the repo? This README's links are relative paths into thepow-mcp-rag-newrepo (GitHub/clone) and won't resolve from an installed package alone. Five docs travel with the install and are available offline viarag-mcp docs <name>(see table below); the rest require the repo checkout.
Guide | Covers | Bundled in package? |
Full Docker setup, adding/removing projects, HTTP server, complete CLI reference (Docker mode) | No — repo only | |
Local PyPI + uvx setup, pip installation, config seeding, building/publishing the wheel | No — repo only | |
How indexing/retrieval works, embedding model, PDF handling, file structure | No — repo only | |
Full | Yes — | |
Full MCP tool reference (21 tools) with usage examples | Yes — | |
Structured log indexing usage guide | Yes — | |
How to write pattern configs for new log formats | Yes — | |
Structured JSON event log (tool calls, embedding failures, backfills), counters, | Yes — | |
Common issues and fixes | No — repo only |
Run rag-mcp docs with no arguments to list the bundled docs from any install (pip, uvx,
or uv tool install) without needing the repo.
What gets indexed
File types are configured in config.yaml under index_extensions. By default: C/C++, Python,
React/JS/TS, C#, Go, Kotlin, Markdown, PDF, text. Directories in excluded_dirs (build,
node_modules, .git, ...) are skipped. See doc/DOCKER_GUIDE.md
for details on configuring projects and adding new sources.
MCP Tools
Once configured, 21 MCP tools are available for searching, browsing, and managing your indexed
projects — see doc/TOOLS_GUIDE.md for the full list with examples
(also available offline: rag-mcp docs tools).
Key tools:
search_docs/search_specs/search_code— semantic search, scoped by file typesearch_hex_pattern,find_function,find_variable— exact text matching for codes/symbolssearch_logs,index_log_file— structured log search and on-demand indexingadd_project,add_pattern,remove_project— index management from Kiro chatget_metrics— live counters (tool calls, embedding failures, backfills); see doc/OBSERVABILITY.md
Log Indexing
Structured log indexing with severity filtering, time-window search, and hex error-code
matching. The pipeline is fully generic — driven by YAML pattern configs, so any log format
can be supported without code changes. See doc/DOCKER_GUIDE.md
and doc/LOG_INDEXING_GUIDE.md (also: rag-mcp docs log-indexing).
Need Help?
See doc/TROUBLESHOOTING.md for common issues, including:
MCP server hangs on startup
Stale search results after re-indexing
entrypoint.shexec errors from CRLF line endings--project <NAME>silently doing nothingConcurrent query errors
Available Tools
20 toolsadd_fileA
Index a specific file into an existing project and persist it in config.yaml so it gets re-indexed automatically on future runs.
Args: file_path: Absolute path to the file to index project: Project name to add the file to (must already exist)
Returns: Confirmation with chunk count, or error message
Inputs: project (required), file_path (required). Returns: result
add_folderA
Index all files in a folder into an existing project and persist the pattern in config.yaml so the folder gets re-indexed automatically on future runs.
Args: folder_path: Absolute path to the folder to index project: Project name to add the folder to (must already exist) pattern: Glob pattern for files within the folder (default: "**/*" for all files)
Returns: Confirmation with file/chunk counts, or error message
Inputs: project (required), folder_path (required), pattern. Returns: result
add_patternA
Add a glob pattern to an existing project and index matching files immediately. Persists the pattern in config.yaml so it gets re-indexed automatically on future runs.
Use this when you want to index a specific set of files by pattern rather than pointing at a concrete folder path. The pattern is relative to the project base_path.
Args: project: Project name to add the pattern to (must already exist) pattern: Glob pattern relative to project base_path (e.g., "doc/specifications/**/*.md") type: File type classification — one of: source, header, documentation, config (default: documentation) description: Optional human-readable description for this source entry
Returns: Confirmation with file/chunk counts, or error message
Examples: add_pattern("my-project", "doc/specifications//*.md", "documentation", "Hardware specs") add_pattern("my-project", "src//*.json", "config", "JSON config files")
Inputs: pattern (required), project (required), type, description. Returns: result
add_projectA
Add a new project to the RAG index. Auto-detects source patterns and indexes immediately.
Args: name: Unique project name (e.g., "my-new-api") path: Absolute path to the project root directory
Returns: Summary of detected patterns and indexing result
Inputs: name (required), path (required). Returns: result
clear_project_indexA
Clear all indexed data for a project without removing it from config.yaml. The project remains configured and can be re-indexed later.
Args: name: Project name to clear (e.g., "my_device_logs")
Returns: Confirmation with number of chunks deleted.
Inputs: name (required). Returns: result
compare_projectsA
Search for the same concept in two projects side by side. Useful for comparing implementations across two versions or variants of the same project.
Args: query: What to search for (e.g., "dispense command flow") project_a: First project name project_b: Second project name top_k: Results per project (default: 3)
Returns: Side-by-side results from both projects
Inputs: query (required), project_a (required), project_b (required), top_k. Returns: result
find_functionA
Find where a function is defined (headers) and used (source files).
Args: function_name: Name of the function to find (e.g., "StoreMoney", "CmdDispense") project: Optional project name filter
Returns: Header declarations and source usages of the function
Inputs: function_name (required), project. Returns: result
find_variableB
Find where a specific variable, constant, enum value, or #define is defined and used. Uses text matching to find exact occurrences across indexed files.
Args: variable_name: Name of the variable/constant to find project: Optional project name filter
Returns: Files containing the variable with context snippets
Inputs: variable_name (required), project. Returns: result
get_documentA
Retrieve all indexed chunks of a specific document.
Args: file_path: Relative file path within the project (e.g., "src/Device.h") project: Project name (e.g., "my-project")
Returns: Full reconstructed document content from indexed chunks
Inputs: project (required), file_path (required). Returns: result
get_project_summaryA
Get a quick overview of an indexed project: description, file counts by type, total chunks.
Args: project: Project name
Returns: Project summary with statistics
Inputs: project (required). Returns: result
index_log_fileA
Index a specific log file (or time window within it) on demand. Use this instead of waiting for background reindex on large log files.
Args: file: Log filename or glob pattern (e.g., "device-26-04-28.log", "device-2026-05-14*.log") project: Project name containing log sources (required) time_from: Optional start time filter, HH:MM:SS format (e.g., "14:00:00"). Only index events at or after this time. time_to: Optional end time filter, HH:MM:SS format (e.g., "15:30:00"). Only index events at or before this time.
Returns: Summary of indexing results (files processed, chunks created, time range)
Inputs: file (required), project, time_to, time_from. Returns: result
list_filesA
List all indexed files for a project, optionally filtered by type.
Args: project: Project name (e.g., "my-project") file_type: Optional filter: "header", "source", "documentation", "config"
Returns: List of indexed file paths with their types
Inputs: project (required), file_type. Returns: result
list_projectsA
List all indexed projects and their statistics.
Returns: List of projects with document counts and descriptions
Inputs: no named parameters. Returns: result
remove_file_from_indexA
Remove all indexed chunks for a specific file from a project's index. Useful for removing large log files or outdated files without clearing the entire project.
Args: file_path: Relative file path within the project (e.g., "device-26-04-28.log") project: Project name (e.g., "my_device_logs")
Returns: Confirmation with number of chunks removed.
Inputs: project (required), file_path (required). Returns: result
remove_projectA
Remove a project from the RAG index. Deletes all indexed chunks and marks the project as removed in config.yaml (preserving configuration for future re-add).
Args: name: Project name to remove (e.g., "my_device_logs")
Returns: Confirmation of removal with chunk count deleted.
Inputs: name (required). Returns: result
search_codeA
Search only source code and header files (filters out documentation). Use when you need implementation details.
Args: query: Natural language search query project: Optional project name filter top_k: Number of results (default: 5, max: 20) headers_only: If true, search only header files (API contracts)
Returns: Relevant source code chunks
Inputs: query (required), top_k, project, headers_only. Returns: result
search_docsA
Semantic search across indexed project documentation.
Args: query: Natural language search query (e.g., "how does dispense rejection work") project: Optional project name to filter results. Leave empty to search all projects. top_k: Number of results to return (default: 5, max: 20) file_type: Optional filter by file type: "header", "source", "documentation", "config"
Returns: Relevant document chunks with metadata (file path, project, type)
Inputs: query (required), top_k, project, file_type. Returns: result
search_hex_patternA
Search for hex error codes or patterns in indexed documents using text matching. Supports partial matches (e.g., '88a153' finds 88a15300, 88a15310, etc.) Use this for device error codes, packet IDs, or any hex value lookup.
Args: pattern: Hex pattern to search for (e.g., "88a153", "0x0521", "ERROR_118") project: Optional project name to filter results. Leave empty to search all. top_k: Maximum results to return (default: 10)
Returns: Document chunks containing the hex pattern with file and project info
Inputs: pattern (required), top_k, project. Returns: result
search_logsA
Search indexed log events with structured filtering and semantic search.
Args: query: Semantic search query (max 512 chars). Optional if filters provided. project: Filter by project name. severity: Filter by severity (DEBUG, INFO, WARNING, ERROR, CRITICAL). time_range_start: ISO 8601 start time filter. time_range_end: ISO 8601 end time filter. error_code_pattern: Prefix match on error codes (e.g., "88a1"). device_id: Filter by device identifier. event_type: Filter by event type (command, response, error, etc.). top_k: Max results (default 20, max 50). Clamped to range [1, 50].
Returns: Formatted results with metadata and relevance scores.
Inputs: query, top_k, project, severity, +5 more. Returns: result
search_specsA
Search only specification and documentation files (filters out source code). Use when you need "what does the spec say about X" without code noise.
Args: query: Natural language search query project: Optional project name filter top_k: Number of results (default: 5, max: 20)
Returns: Relevant documentation chunks (specs, requirements, design docs, PDFs)
Inputs: query (required), top_k, project. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 20 tools
Most tools have clearly distinct purposes: search_code vs search_specs vs search_logs are well-separated, and management tools (add_project, add_file, add_folder, add_pattern) have distinct scope. The only potential overlap is search_docs vs search_specs, where search_docs searches general documentation while search_specs filters to specifications/design docs, which could cause occasional misselection.
All tools follow a consistent snake_case verb_noun pattern: search_*, add_*, remove_*, list_*, get_*, find_*, index_*, clear_*, compare_*. The verbs are descriptive and predictable, making it easy for an agent to guess tool names for actions.
At 20 tools, the server is slightly heavy but each tool covers a distinct operation within the RAG domain: project management, file indexing, semantic search, code navigation, and log search. While more than the typical 15-tool threshold, the count is appropriate for the server's broad scope and each tool has a clear role.
The tool surface covers the full lifecycle: add/remove projects and files, search across docs/code/logs, retrieve document chunks, and list metadata. The only minor gap is that after clear_project_index there's no explicit reindex-all command, requiring users to re-add patterns or files manually, but this is a workaround rather than a dead end.
Maintenance
Related MCP Connectors
Self-hosted AI workspace: semantic RAG document search, long-term memory, and AI chat via MCP.
An MCP server that gives your AI access to the source code and docs of all public github repos
Remote ChromaDB vector database MCP server with streamable HTTP transport
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceLocal MCP server that provides semantic search (RAG) over code repositories, enabling AI clients like Claude and Gemini to access project context without manual re-upload.-
- AlicenseAqualityDmaintenanceLocal-first RAG indexing and semantic search MCP server. Enables document retrieval and context-aware queries using local embedding models.38 npmMIT
- AlicenseNot gradedqualityDmaintenanceA local RAG MCP server that enables AI tools like Claude to search indexed codebases and documentation using vector search with Ollama models.Apache 2.0
- AlicenseNot gradedqualityBmaintenanceMCP server for local RAG over personal notes, PDFs, and documents, enabling plain-English querying and hybrid search with multi-hop context expansion.MIT