Back to Discover

DARWIN

connector

Brightdotdev

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

View on GitHub
0 starsSynced Aug 8, 2026

Install to Claude Code

/plugin marketplace add Brightdotdev/DARWIN

README

Darwin RAG

A local-first RAG engine that ingests documents, indexes them with BM25 + dense embeddings, and exposes search via an MCP server for AI agent integration.

  • 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.
License: MIT with Attribution


Quick Start

1. Install

pip install darwin-rag

2. Set up models

# Interactive — detects hardware, pick your models
darwin-admin setup interactive

# Or one-shot (embedding-only, no prompts)
darwin-admin setup --preset required

3. Start the MCP server & connect

# stdio mode — for AI agent subprocess (Claude Desktop, Cursor, etc.)
darwin mcp

# Or HTTP mode — for remote clients
darwin mcp --http --port 8765

Configure your MCP client:

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

Or generate config automatically:

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

MCP Tools

ToolDescription
search_darwinQuery the knowledge base with hybrid/semantic/keyword search
get_search_resultsList saved search results
get_search_result_by_idLoad a saved search result by filename
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:

# 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:

{
  "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.


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

Contributing

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

  • Issues — open one at github.com/BrightDotDev/DARWIN/issues
  • Code — fork, branch, PR. Keep it minimal.
  • AI-generated code is fine — but you own what you ship. Test it before submitting.

Read CONTRIBUTING.md for the full guidelines.


License

MIT with Attribution — see LICENSE.

Core architecture and implementation by BrightDotDev.

Rendered live from Brightdotdev/DARWIN's GitHub README — not stored, always reflects the source repo.

1 Install Method

NameDescriptionCategorySource
pypi packageInstall via pypi (stdio transport)mcp-serverdarwin-rag

0 Comments

Login required
Log in to post a comment or update on this repo.

No comments yet — be the first to share an update.