Darwin RAG

io.github.Brightdotdev由 GitHub 帳號 Brightdotdev 發布v0.2.18更新於 Oct 24, 2026

Local-first RAG engine with MCP server for AI agent integration.

發布方自己的服務:Darwin

概覽

AI 產生的概覽

一套本地優先的 RAG 引擎,可匯入文件、建立索引,並讓助理在其上檢索與回答問題。

可以做什麼
Darwin RAG 可匯入 PDF、Markdown、HTML、經 OCR 的圖片、CSV、Excel、ODS 檔案以及 URL,並建立 BM25 關鍵字與稠密向量的混合索引,分段策略可調整。透過 MCP 提供 search_darwin(混合、語意或關鍵字檢索)、search_lists 與 get_schema(結構化檔案)、run_pipeline(匯入並索引),以及檔案狀態、已儲存結果與日誌查詢等工具。答案生成由 LiteLLM 呼叫大型語言模型完成,多個彼此隔離的儲存區可區分不同租戶或專案。
適用情境
當助理需要根據私有本機文件集回答問題,且文件格式混雜(例如掃描版 PDF 與試算表),又不希望把語料傳送到託管服務時,適合採用。也適合需要依專案劃分獨立知識庫並查詢工作階段日誌的情境。
執行需求
以本機程序方式執行,從 PyPI 安裝 darwin-rag,因此需要 Python。需先以 darwin-admin setup 指令完成模型設定。答案生成至少需要一個 LLM 供應商金鑰,透過環境變數提供,例如 OPENAI_API_KEY、ANTHROPIC_API_KEY 或 GEMINI_API_KEY;檢索與索引不需金鑰。DARWIN_BASE_DIR 可覆寫資料目錄。僅支援桌面端。
安裝前請注意
此伺服器透過環境變數索取 LLM 供應商 API 金鑰,這些金鑰用於答案生成,因此查詢內容與檢索到的片段可能被傳送給所選供應商。它會寫入與刪除本機資料:run_pipeline 匯入並索引檔案,purge_artifacts 刪除指定檔案的處理產物。HTTP 或 SSE 模式會把伺服器暴露在網路端點上,綁定位址時需謹慎。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Darwin RAG,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Darwin RAG

Search your own documents with any AI agent, privately, on your own machine.

Darwin is a local-first RAG engine that ingests documents, indexes them with BM25 + dense embeddings, and exposes search through an MCP server. Point Claude, Cursor, or any MCP client at it and your agent can search your PDFs, notes, spreadsheets, and web pages without sending them to a cloud index.

One-time internet is needed to download models during setup. After that, search and indexing run fully offline.

[License: MIT] [PyPI]

  • Ingestion: PDF, Markdown, HTML, images (OCR), CSV, Excel, ODS, URLs
  • Indexing: BM25 keyword + dense embedding hybrid index with configurable chunking strategies
  • Search: Hybrid, semantic, or keyword retrieval with reranking, diversity rerank, and structural penalties
  • Generation: LLM-backed answer synthesis via LiteLLM (OpenAI, Anthropic, Gemini, etc.)
  • Observability: Structured logging with per-session history, queryable via MCP
  • Isolation: Multiple independent stores for tenant/project separation
  • Deployment: stdio (AI agent subprocess), SSE, or Streamable HTTP; Docker-ready
  • Local-first: Everything runs locally, fully offline-capable after setup

Built by BrightDotDev.


Why Darwin?

  • Private by default. Your documents stay on your machine.
  • Works with your agent. Standard MCP server: Claude Desktop, Cursor, and other MCP clients.
  • Search that fits the question. Keyword for exact terms, semantic for meaning, hybrid when unsure.
  • Light to start. The required preset downloads just one embedding model.

Quick Start

1. Install

bash
pip install darwin-rag

2. Set up models

bash
# Interactive: detects hardware, pick your modelsdarwin-admin setup interactive
# Or one-shot (embedding-only, no prompts)darwin-admin setup --preset required

3. Start the MCP server & connect

bash
# stdio mode: for AI agent subprocess (Claude Desktop, Cursor, etc.)darwin mcp
# Or HTTP mode: for remote clientsdarwin mcp --http --port 8765

Configure your MCP client:

json
{  "mcpServers": {    "darwin": {      "command": "darwin",      "args": ["mcp"],      "env": {        "OPENAI_API_KEY": "sk-..."  // At least one LLM provider key      }    }  }}

Or generate config automatically:

bash
darwin config claude          # Claude Desktop configdarwin config cursor          # Cursor configdarwin config all --copy      # All clients + copy to clipboard

4. Try it

Ask your agent: "Ingest ./my-notes with Darwin, then find everything I wrote about ."


Use it as an agent skill

Darwin ships with a skill (skills/darwin-rag/SKILL.md) that tells agents when and how to use the MCP tools: check what's indexed, ingest, pick a search mode, and answer from sources. Copy the darwin-rag folder into your agent's skills directory (for Claude Code: ~/.claude/skills/).


MCP Tools

ToolDescription
search_darwinQuery the knowledge base with hybrid/semantic/keyword search
search_listsSearch structured data (CSVs, JSON arrays) by field values
get_search_resultsList saved search results
get_search_result_by_idLoad a saved search result by filename
get_schemaInspect schemas for structured files (keys, types, record counts)
run_pipelineIngest + index documents from a path or URL
purge_artifactsDelete pipeline artifacts for specific files
create_storeCreate a new isolated data store
list_filesList all tracked files with pipeline status
file_statusDetailed status for a single file across all stages
get_logsQuery session logs (oldest first, INFO excluded)

Full documentation: docs/mcp.md


Remote / HTTP Mode

Start the server on a network-accessible endpoint:

bash
# SSE transport (legacy)darwin mcp --sse --host 0.0.0.0 --port 8765
# Streamable HTTP transport (recommended for production)darwin mcp --http --host 0.0.0.0 --port 8765

Configure your MCP client with the URL:

json
{  "mcpServers": {    "darwin": {      "url": "http://your-host:8765/mcp"  // or /sse for SSE mode    }  }}

Environment Variables

VariableRequiredDescription
OPENAI_API_KEYNo*OpenAI provider key
ANTHROPIC_API_KEYNo*Anthropic provider key
GEMINI_API_KEYNo*Google Gemini provider key
MISTRAL_API_KEYNo*Mistral AI provider key
GROQ_API_KEYNo*Groq provider key
COHERE_API_KEYNo*Cohere provider key
TOGETHER_API_KEYNo*Together AI provider key
OPENROUTER_API_KEYNo*OpenRouter provider key
DEEPSEEK_API_KEYNo*DeepSeek provider key
DARWIN_BASE_DIRNoOverride the base data directory
NO_COLORNoSet to any value to disable ANSI color output

* At least one LLM provider key is required for answer generation. Search/indexing works without any.


Setup Details

CommandWhat it does
darwin-admin setup interactiveGuided setup: detect hardware, choose models
darwin-admin setup --preset requiredDownload embedding model only (fastest)
darwin-admin setup --preset recommendedEmbedding + reranker + OCR models
darwin-admin setup loggingReconfigure logging only
darwin-admin setup validateValidate current setup

See docs/setup.md for the full walkthrough including Docker, from-source install, and API key configuration.


CLI Reference

darwin: User CLI

CommandDescription
darwin mcpStart MCP server (stdio, --sse or --http for network)
darwin config [client]Generate MCP client config

darwin-admin: Power-user CLI

CommandDescription
darwin-admin setupSetup models, logging, and configuration
darwin-admin statusSystem status overview
darwin-admin modelsModel registry: list, install, switch, keys
darwin-admin storeData store: status, files, audit, health, repair
darwin-admin pipelineIngestion pipeline: run, ingest, index, purge
darwin-admin searchInteractive search
darwin-admin logsStructured log viewer and management
darwin-admin systemSystem information
darwin-admin uninstallRemove Darwin data and configuration

See docs/admin.md for the full command reference.


Python API

For embedding darwin-rag as a library in your own app:

python
from core import Darwin
d = Darwin()d.ingest("./papers", recursive=True)results = d.search("what is this paper about")records = d.search_records(filters={"status": "active"})

Full reference: docs/api.md


Documentation

DocWhat
setup.mdFull setup walkthrough
mcp.mdMCP server, tools, resources, transports
admin.mdAdmin CLI reference
architecture.mdFor developers and contributors
pipeline.mdIngestion & indexing
retrieval.mdSearch engine
storage.mdDarwinStore
models.mdModel registry & inference
logger.mdStructured logging
orchestrators.mdHigh-level business logic
api.mdPython API (Darwin class)

Contributing

Found a bug? Want to add something? You're welcome here.

Read CONTRIBUTING.md for the full guidelines.


License

MIT. See LICENSE.

Core architecture and implementation by BrightDotDev.

來源:README.md,提交 dd74e2b

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.2.18最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Darwin 整合