Enables AI agents to search and ingest local documents like PDFs, notes, and spreadsheets using a private, local-first RAG engine.
Also known as Brightdotdev/DARWIN, darwin, darwin-rag
- Stars
- 3
- Tools
- 11
- Downloads, 30 days
- 310
- Latest version
- 0.2.18
- Last commit
- Oct 14, 2026
- License
- MIT
What is Darwin RAG MCP?
Darwin RAG enables AI agents to search and ingest local documents like PDFs, notes, and spreadsheets using a private, local-first RAG engine. It exposes 11 tools, such as search_darwin, search_lists, get_search_results.
Summary generated from the project's README
About Darwin RAG MCP server
Darwin RAG provides a local-first retrieval-augmented generation engine designed for developers who want to connect their private documents to AI agents. It allows clients like Claude Desktop and Cursor to search through PDFs, Markdown files, spreadsheets, and even web pages without uploading sensitive data to a cloud index. The system uses a hybrid approach, combining BM25 keyword matching with dense embeddings to ensure high-quality retrieval.
Users can run the server locally via stdio for direct agent integration or deploy it as a remote service using SSE or Streamable HTTP. While the initial setup requires internet access to download embedding models, all subsequent indexing and search operations function fully offline. To enable answer synthesis, you must provide an API key for an LLM provider such as OpenAI, Anthropic, or Gemini through environment variables. The server includes specialized tools for managing data stores, inspecting file schemas, and running ingestion pipelines.
What you can do with it
- 1Private document ingestionInstruct an AI agent to index a local folder containing various file types for future querying.
- 2Hybrid knowledge retrievalPerform searches that combine exact keyword matching with semantic meaning to find relevant information.
- 3Structured data queryingSearch through organized files like CSVs or JSON arrays using specific field values.
- 4Isolated project managementCreate separate data stores to keep different projects or tenants completely independent.
Written from the project's README. Every use case is checked against a quote from it.
How to install Darwin RAG MCP
Formats verified 10 Nov 2026Install Darwin RAG MCP in Claude Code
$ claude mcp add --env ANTHROPIC_API_KEY=<YOUR_ANTHROPIC_API_KEY> --env GEMINI_API_KEY=<YOUR_GEMINI_API_KEY> --env OPENAI_API_KEY=<YOUR_OPENAI_API_KEY> darwin -- uvx darwin-ragInstall Darwin RAG MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"darwin": {
"command": "uvx",
"args": [
"darwin-rag"
],
"env": {
"ANTHROPIC_API_KEY": "<YOUR_ANTHROPIC_API_KEY>",
"GEMINI_API_KEY": "<YOUR_GEMINI_API_KEY>",
"OPENAI_API_KEY": "<YOUR_OPENAI_API_KEY>"
}
}
}
}Install Darwin RAG MCP in VS Code
.vscode/mcp.json
{
"servers": {
"darwin": {
"type": "stdio",
"command": "uvx",
"args": [
"darwin-rag"
],
"env": {
"ANTHROPIC_API_KEY": "<YOUR_ANTHROPIC_API_KEY>",
"GEMINI_API_KEY": "<YOUR_GEMINI_API_KEY>",
"OPENAI_API_KEY": "<YOUR_OPENAI_API_KEY>"
}
}
}
}Install Darwin RAG MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"darwin": {
"command": "uvx",
"args": [
"darwin-rag"
],
"env": {
"ANTHROPIC_API_KEY": "<YOUR_ANTHROPIC_API_KEY>",
"GEMINI_API_KEY": "<YOUR_GEMINI_API_KEY>",
"OPENAI_API_KEY": "<YOUR_OPENAI_API_KEY>"
}
}
}
}Install Darwin RAG MCP in Codex
~/.codex/config.toml
[mcp_servers.darwin] command = "uvx" args = ["darwin-rag"] [mcp_servers.darwin.env] ANTHROPIC_API_KEY = "<YOUR_ANTHROPIC_API_KEY>" GEMINI_API_KEY = "<YOUR_GEMINI_API_KEY>" OPENAI_API_KEY = "<YOUR_OPENAI_API_KEY>"
Install Darwin RAG MCP in Gemini CLI
~/.gemini/settings.json
{
"mcpServers": {
"darwin": {
"command": "uvx",
"args": [
"darwin-rag"
],
"env": {
"ANTHROPIC_API_KEY": "<YOUR_ANTHROPIC_API_KEY>",
"GEMINI_API_KEY": "<YOUR_GEMINI_API_KEY>",
"OPENAI_API_KEY": "<YOUR_OPENAI_API_KEY>"
}
}
}
}Darwin RAG MCP tools 11
Detected from the READMEsearch_darwinsearch_listsget_search_resultsget_search_result_by_idget_schemarun_pipelinepurge_artifactscreate_storelist_filesfile_statusget_logs
| search_darwin | — | |
| search_lists | — | |
| get_search_results | — | |
| get_search_result_by_id | — | |
| get_schema | — | |
| run_pipeline | — | |
| purge_artifacts | — | |
| create_store | — | |
| list_files | — | |
| file_status | — | |
| get_logs | — |
Configuration
ANTHROPIC_API_KEYSecretAnthropic API key for LLM answer generation
GEMINI_API_KEYSecretGoogle Gemini API key
OPENAI_API_KEYSecretOpenAI API key for LLM answer generation
DARWIN_BASE_DIROverride the base data directory
| Name | Description | |
|---|---|---|
| ANTHROPIC_API_KEY | Anthropic API key for LLM answer generation | Secret |
| GEMINI_API_KEY | Google Gemini API key | Secret |
| OPENAI_API_KEY | OpenAI API key for LLM answer generation | Secret |
| DARWIN_BASE_DIR | Override the base data directory |
Automated checks
Ran Nov 12, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work
- Source repository linked and reachablePass
- Open source license (OSI)Pass
- Commit or release in the last yearPass
- Package name not close to a popular packagePass
- Remote endpoint uses HTTPSNot checked
- Destructive tools are labelledNot checked
- No hidden instructions to the modelPass
- No critical advisory in the package or its dependenciesPass
README
View on GitHubDarwin 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.
- 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
requiredpreset downloads just one embedding model.
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
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
| Tool | Description |
|---|---|
search_darwin |
Query the knowledge base with hybrid/semantic/keyword search |
search_lists |
Search structured data (CSVs, JSON arrays) by field values |
get_search_results |
List saved search results |
get_search_result_by_id |
Load a saved search result by filename |
get_schema |
Inspect schemas for structured files (keys, types, record counts) |
run_pipeline |
Ingest + index documents from a path or URL |
purge_artifacts |
Delete pipeline artifacts for specific files |
create_store |
Create a new isolated data store |
list_files |
List all tracked files with pipeline status |
file_status |
Detailed status for a single file across all stages |
get_logs |
Query 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
| Variable | Required | Description |
|---|---|---|
OPENAI_API_KEY |
No* | OpenAI provider key |
ANTHROPIC_API_KEY |
No* | Anthropic provider key |
GEMINI_API_KEY |
No* | Google Gemini provider key |
MISTRAL_API_KEY |
No* | Mistral AI provider key |
GROQ_API_KEY |
No* | Groq provider key |
COHERE_API_KEY |
No* | Cohere provider key |
TOGETHER_API_KEY |
No* | Together AI provider key |
OPENROUTER_API_KEY |
No* | OpenRouter provider key |
DEEPSEEK_API_KEY |
No* | DeepSeek provider key |
DARWIN_BASE_DIR |
No | Override the base data directory |
NO_COLOR |
No | Set 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
| Command | What it does |
|---|---|
darwin-admin setup interactive |
Guided setup: detect hardware, choose models |
darwin-admin setup --preset required |
Download embedding model only (fastest) |
darwin-admin setup --preset recommended |
Embedding + reranker + OCR models |
darwin-admin setup logging |
Reconfigure logging only |
darwin-admin setup validate |
Validate current setup |
See docs/setup.md for the full walkthrough including Docker, from-source install, and API key configuration.
CLI Reference
darwin: User CLI
| Command | Description |
|---|---|
darwin mcp |
Start MCP server (stdio, --sse or --http for network) |
darwin config [client] |
Generate MCP client config |
darwin-admin: Power-user CLI
| Command | Description |
|---|---|
darwin-admin setup |
Setup models, logging, and configuration |
darwin-admin status |
System status overview |
darwin-admin models |
Model registry: list, install, switch, keys |
darwin-admin store |
Data store: status, files, audit, health, repair |
darwin-admin pipeline |
Ingestion pipeline: run, ingest, index, purge |
darwin-admin search |
Interactive search |
darwin-admin logs |
Structured log viewer and management |
darwin-admin system |
System information |
darwin-admin uninstall |
Remove 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:
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
| Doc | What |
|---|---|
| setup.md | Full setup walkthrough |
| mcp.md | MCP server, tools, resources, transports |
| admin.md | Admin CLI reference |
| architecture.md | For developers and contributors |
| pipeline.md | Ingestion & indexing |
| retrieval.md | Search engine |
| storage.md | DarwinStore |
| models.md | Model registry & inference |
| logger.md | Structured logging |
| orchestrators.md | High-level business logic |
| api.md | Python API (Darwin class) |
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. See LICENSE.
Core architecture and implementation by BrightDotDev.
Darwin RAG MCP questions
How do I add Darwin RAG MCP to Claude Code?
Run claude mcp add --env ANTHROPIC_API_KEY=<YOUR_ANTHROPIC_API_KEY> --env GEMINI_API_KEY=<YOUR_GEMINI_API_KEY> --env OPENAI_API_KEY=<YOUR_OPENAI_API_KEY> darwin -- uvx darwin-rag in your terminal. Add --scope user to make it available in every project.
How do I add Darwin RAG MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
What tools does Darwin RAG MCP provide?
It exposes 11 tools, including search_darwin, search_lists, get_search_results, get_search_result_by_id, get_schema.
Does Darwin RAG work offline?
Yes, after an initial internet connection is used to download models during setup, all search and indexing operations run fully offline.
Is my data private?
Yes, Darwin is designed to be local-first, meaning your documents stay on your own machine rather than being sent to a cloud index.
Which AI clients can I use with Darwin?
It works with standard MCP clients such as Claude Desktop and Cursor.