TO

tomohiro-owada/devrag

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

64 stars 15 forks 质量 50 趋势 14

Claude Code 的 Markdown 向量搜索 MCP 服务器。使用多语言 e5-small 嵌入的 markdown 文件自然语言搜索。

概览

DevRag 是一个轻量级的 RAG(检索增强生成)系统,专为使用 Claude 代码的开发者设计。别再浪费代币阅读整份文档了——让矢量搜索准确找到你需要的内容。 使用 Claude Code 时,使用阅读工具读取文档会消耗大量代币: - ❌ : 每次都读取整个文档(每个文件3,000+令牌) - ❌ : Claude 不知道哪个文件包含什么 - ❌ : 同一文档在会话中多次读取 - ✅ : 向量搜索仅检索相关区块(~200个令牌) - ✅ : 搜索时间为100毫秒,阅读时间为30秒 - ✅ : Claude Code 在不知情文件名的情况下查找文档 - 🤖 - Claude 代码的检索增强生成 - 📝 - 自动索引。

概述(AI 翻译)

Claude 代码的免费本地 RAG - 节省令牌和时间

日本語版はこちら |日语版本

DevRag 是一个轻量级的 RAG(检索增强生成)系统,专为使用 Claude 代码的开发者设计。别再浪费代币阅读整份文档了——让矢量搜索准确找到你需要的内容。

为什么是DevRag?

使用 Claude Code 时,使用阅读工具读取文档会消耗大量代币:

  • ❌ 浪费上下文:每次都要读取整个文档(每个文件3,000+标记)
  • ❌ 搜索性差:Claude不知道哪个文件包含什么
  • ❌ 重复性:同一文档在会话中多次阅读

与DevRag合作:

  • ✅ 40x少令牌:向量搜索仅检索相关区块(~200个令牌)
  • ✅ 15倍快:搜索时间为100毫秒,阅读时间为30秒
  • ✅ 自动发现:Claude Code 无需知道文件名即可查找文档

特色

  • 🤖 Simple RAG - Claude 代码的检索增强生成
  • 📝 Markdown 支持 - 自动索引 .md 文件
  • 🔍 语义搜索 - 自然语言查询,如“JWT 认证方法”
  • 🚀 单一二进制 - 无Python,模型首次运行时自动下载

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

DevRag

Free Local RAG for Claude Code - Save Tokens & Time

日本語版はこちら | Japanese Version

DevRag is a lightweight RAG (Retrieval-Augmented Generation) system designed specifically for developers using Claude Code. Stop wasting tokens by reading entire documents - let vector search find exactly what you need.

Why DevRag?

When using Claude Code, reading documents with the Read tool consumes massive amounts of tokens:

  • ❌ Wasting Context: Reading entire docs every time (3,000+ tokens per file)
  • ❌ Poor Searchability: Claude doesn’t know which file contains what
  • ❌ Repetitive: Same documents read multiple times across sessions

With DevRag:

  • ✅ 40x Less Tokens: Vector search retrieves only relevant chunks (~200 tokens)
  • ✅ 15x Faster: Search in 100ms vs 30 seconds of reading
  • ✅ Auto-Discovery: Claude Code finds documents without knowing file names

Features

  • 🤖 Simple RAG - Retrieval-Augmented Generation for Claude Code
  • 📝 Markdown Support - Auto-indexes .md files
  • 🔍 Semantic Search - Natural language queries like “JWT authentication method”
  • 🚀 Single Binary - No Python, models auto-download on first run
  • 💻 CLI & MCP - Use as MCP server or standalone CLI commands
  • 🖥️ Cross-Platform - macOS / Linux / Windows
  • ⚡ Fast - Auto GPU/CPU detection, incremental sync
  • 🌐 Multilingual - Supports 100+ languages including Japanese & English

Quick Start

1. Download Binary

Get the appropriate binary from Releases:

Platform File
macOS (Apple Silicon) devrag-macos-apple-silicon.tar.gz
macOS (Intel) devrag-macos-intel.tar.gz
Linux (x64) devrag-linux-x64.tar.gz
Linux (ARM64) devrag-linux-arm64.tar.gz
Windows (x64) devrag-windows-x64.zip

macOS/Linux:

tar -xzf devrag-*.tar.gz
chmod +x devrag-*
sudo mv devrag-* /usr/local/bin/

Note: macOS releases include libonnxruntime.dylib for CoreML GPU acceleration. Keep it in the same directory as the devrag binary.

Windows:

  • Extract the zip file
  • Place in your preferred location (e.g., C:\Program Files\devrag\)

2. Configure Claude Code

Add to ~/.claude.json or .mcp.json:

{
  "mcpServers": {
    "devrag": {
      "type": "stdio",
      "command": "/usr/local/bin/devrag"
    }
  }
}

Using a custom config file:

{
  "mcpServers": {
    "devrag": {
      "type": "stdio",
      "command": "/usr/local/bin/devrag",
      "args": ["--config", "/path/to/custom-config.json"]
    }
  }
}

3. Add Your Documents

mkdir documents
cp your-notes.md documents/

That’s it! Documents are automatically indexed on startup.

4. Search with Claude Code

In Claude Code:

"Search for JWT authentication methods"

Configuration

Create config.json:

{
  "document_patterns": [
    "./documents",
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "devrag": { "type": "stdio", "command": "/usr/local/bin/devrag" } } }