MCP server for indra_db - a content-addressed graph database for versioned thoughts
npm install indra_db_mcp> Think out loud. Remember what matters. Watch understanding evolve.
An MCP (Model Context Protocol) server that gives AI models a place to externalize their thinking. Built on indra_db โ a content-addressed graph database for versioned thoughts.
Most AI interactions are ephemeral. Insights evaporate. Reasoning chains vanish. Good ideas get rediscovered instead of built upon.
indra_db_mcp changes that by giving models (and humans) a shared space to:
- ๐ง Capture thoughts as they emerge during reasoning
- ๐ Connect ideas into a web of understanding
- ๐ฎ Search by meaning not just keywords
- ๐ฟ Branch and explore alternative lines of thinking
- ๐ Track evolution of understanding over time
It's git for thoughts. Version-controlled thinking. A knowledge graph that grows with every conversation.
- Bun runtime (v1.0+)
- Rust/Cargo (for auto-installing indra_db CLI)
The simplest way to use this server is via bunx:
``json`
{
"mcpServers": {
"indra": {
"command": ["bunx", "-y", "indra_db_mcp"],
"type": "local"
}
}
}
Models won't automatically use Indra unless instructed. Add the bundled instructions file to your config:
OpenCode (~/.config/opencode/opencode.json or project opencode.json):`json`
{
"instructions": ["node_modules/indra_db_mcp/INDRA_INSTRUCTIONS.md"]
}
Claude Code (project CLAUDE.md or global ~/.claude/CLAUDE.md):`markdown`
@import node_modules/indra_db_mcp/INDRA_INSTRUCTIONS.md
Or copy INDRA_INSTRUCTIONS.md to your project and reference it directly.
Or with a custom database path:
`json`
{
"mcpServers": {
"indra": {
"command": ["bunx", "-y", "indra_db_mcp"],
"environment": {
"INDRA_DB_PATH": "~/.indra"
},
"type": "local"
}
}
}
`bashInstall globally
bun add -g indra_db_mcp
$3
| Variable | Description | Default |
|----------|-------------|---------|
|
INDRA_DB_PATH | Path to database file | ./.indra (hidden file) |When
INDRA_DB_PATH is set, uses that path (supports ~ for home directory).
When unset, creates a hidden .indra file in the current working directory.Available Tools
$3
| Tool | Description |
|------|-------------|
|
remember | Capture a thought with optional ID. Embeddings auto-generated for semantic search. |
| recall | Retrieve a specific thought by ID. |
| revise | Update a thought while preserving history. |
| forget | Remove from current state (preserved in history). |
| list_thoughts | See all thoughts in the graph. |$3
| Tool | Description |
|------|-------------|
|
connect | Create typed relationship between thoughts. |
| disconnect | Remove a relationship. |
| explore | Traverse connections from a thought. |Built-in relationship types:
-
supports โ evidence/backing
- contradicts โ conflicts with
- derives_from โ evolved from
- part_of โ component of larger idea
- causes โ leads to
- precedes โ temporal ordering
- similar_to โ related concepts
- relates_to โ general connection$3
| Tool | Description |
|------|-------------|
|
search | Find thoughts by meaning using vector embeddings. |$3
| Tool | Description |
|------|-------------|
|
checkpoint | Commit current state with a message. |
| history | View commit log showing evolution. |
| branch | Create new line of exploration. |
| switch_branch | Move between branches. |
| list_branches | See all branches. |
| compare | Diff between states. |
| status | Current database overview. |Example Session
Here's how an AI might use this during reasoning:
`
User: Help me think through whether to use microservices or a monolith for my startup.AI: Let me capture my initial thoughts on this decision...
[Uses remember] "The microservices vs monolith decision depends heavily on team size,
expected scale, and operational maturity"
[Uses remember] "Startups typically benefit from monoliths initially - faster iteration,
simpler deployment, easier debugging"
[Uses remember] "Microservices add operational overhead: service discovery, distributed
tracing, network latency, deployment complexity"
[Uses connect] "monolith-benefits" --[supports]--> "startup-recommendation"
[Uses connect] "microservices-overhead" --[contradicts]--> "premature-microservices"
[Uses checkpoint] "Initial analysis of architecture decision"
Let me explore an alternative perspective...
[Uses branch] "microservices-case"
[Uses switch_branch] "microservices-case"
[Uses remember] "If expecting rapid team growth, microservices enable independent
team ownership and deployment"
[Uses search] "team scaling"
// Finds related thoughts about team dynamics
[Uses switch_branch] "main"
[Uses compare] "main" vs "microservices-case"
// Shows what each branch explored
`Architecture
`
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ MCP Client (Claude) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ MCP Protocol (stdio)
โโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ indra_db_mcp (Bun) โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โ
โ โ MCP SDK โ โ IndraClient โ โ Type Safety โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโฌโโโโโโโโ โโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ CLI subprocess (JSON)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ indra CLI (Rust) โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โ
โ โ Graph Store โ โ Embeddings โ โ Git-like VCS โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ thoughts.indra (Single File) โ
โ Content-addressed objects, BLAKE3 hashes, zstd compressedโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
`Development
`bash
Run with watch mode
bun run devType check
bun run typecheckRun tests
bun test
`How It Works
1. Content Addressing: Every thought is hashed (BLAKE3). Identity comes from content.
2. Embeddings: Using
sentence-transformers/all-MiniLM-L6-v2 locally via HuggingFace.
Thoughts are embedded on creation for semantic search.3. Graph Structure: Thoughts are nodes, relationships are typed/weighted edges.
Edges "float" to latest node versions.
4. Version Control: Git-like commits create snapshots. Branches enable parallel exploration.
Full history preserved โ nothing truly deleted.
5. Single File: Everything stored in one
.indra` file. Easy to backup, share, version.This project is named after Indra's Net โ
a Buddhist metaphor where reality is a vast net of jewels, each reflecting all others.
Your thoughts are like those jewels. Each one reflects and connects to others.
The web of connections is your understanding. This tool makes that web visible,
versionable, and searchable.
MIT
- indra_db โ The underlying Rust database
- MCP Specification โ Model Context Protocol docs
- indranet โ Online viewing tool (coming soon)