Logo Rag Code MCP

Rag Code MCP

Cộng đồng
doITmagic

Privacy-first semantic code navigation MCP server using RAG. Features deep AST multi-language support (Go, PHP/Laravel/WP, JS/TS/React, Python), 100% local LLMs (Ollama), and vector search (Qdrant) for AI IDEs like Antigravity, Cursor, Windsurf, Copilot, and Claude.

Nhà phát hànhdoITmagic
Kho mãrag-code-mcp
Ngôn ngữGo
Bản fork
7
Sao
55
Công cụ có sẵn
0
Phương thức truyền tảistdio
Giấy phépMIT
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    Rag Code MCP cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    55 sao và 7 bản fork từ kho mã được liên kết.

RagCode MCP - Make Your Codebase AI-Ready

The privacy-first MCP server that transforms any repository into an AI-ready codebase with semantic search and RAG.

RagCode is a Model Context Protocol (MCP) server that instantly makes your project AI-ready. It enables AI assistants like GitHub Copilot, Cursor, Windsurf, and Claude to understand your entire codebase through semantic vector search, bridging the gap between your code and Large Language Models (LLMs).

Built with the official Model Context Protocol Go SDK, RagCode provides 9 powerful tools to index, search, and analyze code, making it the ultimate solution for AI-ready software development.

⚡ One-Command Installation

No Go, no build tools, no configuration needed. Just Docker.

Linux (amd64)

bash
curl -fsSL https://github.com/doITmagic/rag-code-mcp/releases/latest/download/rag-code-mcp_linux_amd64.tar.gz | tar xz && ./ragcode-installer -ollama=docker -qdrant=docker

macOS (Apple Silicon / Intel)

bash
# Apple Silicon (M1/M2/M3)
curl -fsSL https://github.com/doITmagic/rag-code-mcp/releases/latest/download/rag-code-mcp_darwin_arm64.tar.gz | tar xz && ./ragcode-installer -ollama=docker -qdrant=docker

# Intel Macs
curl -fsSL https://github.com/doITmagic/rag-code-mcp/releases/latest/download/rag-code-mcp_darwin_amd64.tar.gz | tar xz && ./ragcode-installer -ollama=docker -qdrant=docker

Windows (PowerShell)

powershell
Invoke-WebRequest -Uri "https://github.com/doITmagic/rag-code-mcp/releases/latest/download/rag-code-mcp_windows_amd64.zip" -OutFile "ragcode.zip"; Expand-Archive ragcode.zip -DestinationPath . -Force; .\ragcode-installer.exe -ollama=docker -qdrant=docker

That's it! The installer automatically:

  • ✅ Downloads and installs the rag-code-mcp binary
  • ✅ Sets up Ollama and Qdrant in Docker containers
  • ✅ Downloads required AI models (phi3:medium, mxbai-embed-large)
  • ✅ Configures your IDE (VS Code, Cursor, Windsurf, Claude Desktop)
  • ✅ Adds binaries to your PATH

🔄 Keep Updated

The auto-update feature is available starting with v1.1.18.

How to Upgrade:

  1. If you are on an older version (< v1.1.18): Your version does not know the update command. You must re-run the installation command (the curl command above) one last time. (Don't worry, your indexes and configuration will be preserved).

  2. If you are on v1.1.18 or newer: Simply run:

    bash
    rag-code-mcp --update

For new installations: The update system is built-in. Use the installer once, then simply run rag-code-mcp --update anytime to get the latest features.

📖 Full Installation Guide → | Windows WSL Setup →


🎯 Zero-Config Usage

Once installed, you don't need to configure anything:

  1. Open your project in your IDE (VS Code, Cursor, Windsurf)
  2. Ask your AI assistant a question about your code
  3. That's it! RagCode automatically indexes and answers
💬 "How does the authentication system work?"
💬 "Find all API endpoints in this codebase"
💬 "Show me the User model and its relationships"

First query triggers background indexing. Subsequent queries are instant.


📋 Table of Contents

SectionDescription
🔒 Privacy & Security100% local, zero cloud dependencies
🚀 Why RagCode?Performance benefits, comparisons
🛠️ MCP ToolsAll 9 tools explained
🌐 Supported LanguagesGo, PHP, Python support
💻 IDE IntegrationWindsurf, Cursor, VS Code, Claude
⚙️ ConfigurationAdvanced settings, models, env vars
🐛 TroubleshootingCommon issues and solutions
📚 DocumentationAll guides and references

🔒 Privacy-First: 100% Local AI

Your code never leaves your machine. RagCode runs entirely on your local infrastructure:

  • ✅ Local AI Models - Uses Ollama for LLM and embeddings (runs on your hardware)
  • ✅ Local Vector Database - Qdrant runs in Docker on your machine
  • ✅ Zero Cloud Dependencies - No external API calls, no data transmission
  • ✅ No API Costs - Free forever, no usage limits or subscriptions
  • ✅ Offline Capable - Works without internet (after initial model download)

Perfect for: Enterprise codebases, proprietary projects, security-conscious teams.


🚀 Why RagCode? Performance Benefits

5-10x Faster Code Understanding

TaskWithout RagCodeWith RagCodeSpeedup
Find authentication logic30-60s (read 10+ files)2-3s (semantic search)10-20x
Understand function signature15-30s (grep + read)1-2s (direct lookup)15x
Find all API endpoints60-120s (manual search)3-5s (hybrid search)20-40x

98% Token Savings

  • Without RagCode: AI reads 5-10 files (~15,000 tokens) to find a function
  • With RagCode: AI gets exact function + context (~200 tokens)

RagCode vs Cloud-Based Solutions

FeatureRagCode (Local)Cloud AI Search
Privacy✅ 100% local❌ Code sent to cloud
Cost✅ $0 forever❌ $20-100+/month
Offline✅ Works offline❌ Requires internet
Data Control✅ You own everything❌ Vendor controls data

RagCode vs Generic RAG

AspectGeneric RAGRagCode
ChunkingArbitrary text splitsSemantic units (functions, classes)
MetadataFilename onlyName, type, params, dependencies, lines
ResultsMay return partial codeAlways complete, runnable code

🛠️ 9 Powerful MCP Tools

ToolDescriptionUse When
search_codeSemantic search by meaningFirst choice for exploration
hybrid_searchKeyword + semantic for exact matchesNeed exact identifiers
get_function_detailsComplete function source codeKnow exact function name
find_type_definitionType/class with fields and methodsUnderstand data models
find_implementationsAll usages and callersBefore refactoring
list_package_exportsAll exported symbolsExplore unfamiliar packages
search_docsSearch Markdown documentationSetup, architecture info
get_code_contextCode snippet with contextHave file:line reference
index_workspaceReindex codebaseAfter major changes

📖 Full Tool Reference →


🌐 Multi-Language Code Intelligence

LanguageSupport LevelFeaturesDocs
Go✅ FullFunctions, types, interfaces, methods, AST analysis📖 Go Analyzer
PHP✅ FullClasses, methods, interfaces, traits, PHPDoc📖 PHP Analyzer
PHP + Laravel✅ FullEloquent models, routes, controllers, middleware📖 Laravel Analyzer
Python✅ FullClasses, functions, decorators, type hints, mixins📖 Python Analyzer
JavaScript/TypeScript🔜 PlannedComing soon (tree-sitter based)-

Multi-Workspace Support

RagCode automatically detects and manages multiple workspaces with isolated indexes.

📖 Workspace Detection → - Auto-detection, stable IDs, caching


💻 IDE Integration

RagCode works with all major AI-powered IDEs:

IDEStatusSetup
Windsurf✅ Auto-configuredJust install
Cursor✅ Auto-configuredJust install
VS Code + Copilot✅ Auto-configuredRequires VS Code 1.95+
Claude Desktop✅ Auto-configuredJust install
Antigravity✅ Auto-configuredJust install

📖 Manual IDE Setup → | VS Code + Copilot Guide →


📦 System Requirements

Minimum Requirements

ComponentRequirementNotes
CPU4 coresFor running Ollama models
RAM16 GB8 GB for phi3:medium, 4 GB for mxbai-embed-large, 4 GB system
Disk10 GB free~8 GB for models + 2 GB for data
OSLinux, macOS, WindowsDocker required for Qdrant

Recommended (for better performance)

ComponentRequirementNotes
CPU8+ coresBetter concurrent operations
RAM32 GBComfortable multi-workspace indexing
GPUNVIDIA 8GB+ VRAMSignificantly speeds up Ollama (optional)
Disk20 GB SSDFaster indexing and search

📖 Full Requirements →


📚 Documentation

Getting Started

Configuration & Operations

Language Analyzers

Technical Reference

External Resources


🤝 Contributing

We welcome contributions! Here's how you can help:

  • 🐛 Report Bugs
  • 💡 Request Features - Share ideas for new tools or languages
  • 🔧 Submit PRs - Improve code, docs, or add features
  • ⭐ Star the Project - Show your support

Development Setup

bash
git clone https://github.com/doITmagic/rag-code-mcp.git
cd rag-code-mcp
go mod download
go run ./cmd/rag-code-mcp

📄 License

RagCode MCP is open source software licensed under the MIT License.


🏷️ Keywords & Topics

semantic-code-search rag retrieval-augmented-generation mcp-server model-context-protocol ai-code-assistant vector-search code-navigation ollama qdrant github-copilot cursor-ai windsurf go php laravel python django flask fastapi code-intelligence ast-analysis embeddings llm-tools local-ai privacy-first offline-ai self-hosted on-premise zero-cost no-cloud private-code-search enterprise-ai secure-coding-assistant


Built with ❤️ for developers who want smarter AI code assistants

⭐ Star us on GitHub if RagCode helps your workflow!

Built and maintained by DO IT MAGIC SOFTWARE, custom software and applied AI from Pitești, Romania.

Questions? Open an Issue • Read the Docs • Join Discussions

Dùng MCP Rag Code MCP với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối Rag Code MCP, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm Rag Code MCP làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của Rag Code MCP.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "rag-code-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của Rag Code MCP, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của Rag Code MCP.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng Rag Code MCP giúp tôi làm việc này không?
Rag Code MCP
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng Rag Code MCP.

Câu hỏi thường gặp

Máy chủ MCP Rag Code MCP dùng để làm gì?

Rag Code MCP là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP Rag Code MCP với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng Rag Code MCP với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP Rag Code MCP với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối Rag Code MCP, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP Rag Code MCP với TypingMind?

Rag Code MCP hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP Rag Code MCP cung cấp những công cụ nào trong TypingMind?

Rag Code MCP cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP Rag Code MCP không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu Rag Code MCP yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇