Dali MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
π¦ Dali Memory
Local vector memory system for AI coding assistants. Gives Claude Code (or any MCP client) persistent semantic memory across sessions using SQLite + sqlite-vec + Ollama embeddings.
Includes an optional OpenClaw plugin adapter for automatic context injection.
Why
AI coding assistants forget everything between sessions. The typical workaround β dumping large .md files into every prompt β wastes tokens on irrelevant context.
Dali replaces static context dumps with semantic retrieval: only memories relevant to the current conversation are injected, saving ~1,000 tokens per turn.
Related MCP server: io.github.cdnsteve/sugar
Architecture
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Claude Code / MCP Client β
β β
β store_memory βββ search_memory βββ β
β search_by_type β€ forget_memory β€ β
β get_audit_log β€ list_recent β€ β
β get_session β β β
ββββββββββββββββ¬ββββββββββββββββββββββββ¬βββββββββββββββ
β stdio (MCP) β
v v
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Dali MCP Server (src/) β
β β
β ββββββββββββ ββββββββββββββ ββββββββββββββββββββ β
β β memory/ β β embeddings/β β audit/ β β
β β store.ts β β ollama.ts ββββ logger.ts β β
β β search.tsβ β β β query.ts β β
β ββββββ¬ββββββ βββββββ¬βββββββ ββββββββββββββββββββ β
β β β β
β v v β
β βββββββββββββββββββββββββββ β
β β SQLite + sqlite-vec β β
β β 768-dim cosine KNN β β
β β WAL mode β β
β βββββββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
v
ββββββββββββββββββββββββββββ
β Ollama (local) β
β nomic-embed-text β
β 768-dim embeddings β
ββββββββββββββββββββββββββββQuickstart
1. Install Ollama
brew install ollama # macOS
ollama pull nomic-embed-text
ollama serve # start the server2. Clone and Build
git clone https://github.com/linnaxis/dali-memory-openclaw.git
cd dali-memory-openclaw
npm install
npm run build3. Configure MCP
Copy .mcp.json.example to ~/.claude/mcp.json (or merge into your existing config):
{
"mcpServers": {
"dali": {
"command": "node",
"args": ["/absolute/path/to/dali-memory-openclaw/dist/index.js"],
"env": {
"DALI_DB_PATH": "~/.claude/dali/dali.db",
"OLLAMA_BASE_URL": "http://localhost:11434",
"OLLAMA_MODEL": "nomic-embed-text"
}
}
}
}4. Verify
Start Claude Code. You should see 7 new tools:
store_memoryβ persist a memory with auto-embeddingsearch_memoryβ semantic vector searchsearch_by_typeβ filter by type + text queryget_audit_logβ query tool invocation historyget_session_summaryβ all memories for a sessionlist_recent_memoriesβ chronological listingforget_memoryβ archive or delete
Efficiency Benchmarks
Based on a real deployment with 165 memories (3.5 MB database):
Token Savings Per Turn
Metric | Static (Before) | Dynamic (After) | Savings |
Managed .md files | 1,287 tokens | ~20 token stubs | -1,267 |
Dali context injection | 0 | ~100-400 avg | +100-400 |
Net per turn | 1,287 tokens | ~220-420 tokens | ~870-1,070 |
Cost Projections (Claude Sonnet 4, $3/M input tokens)
Scenario | Tokens/turn | 100 turns/day | Monthly cost |
Static (all .md) | 3,373 | 337,300 | $30.36 |
With Dali (avg) | 2,406 | 240,600 | $21.65 |
Savings | ~967 | 96,700 | $8.70 |
Latency
Operation | Latency | Notes |
Ollama embed (nomic-embed-text) | 15-50ms | Local inference |
SQLite KNN search (768-dim) | <5ms | In-memory after first query |
Full retrieval pipeline | 20-60ms | Dominated by Ollama |
Ollama down (fallback) | 0ms | Graceful no-op |
Database Size
Memories | Size |
165 | 3.5 MB |
~1,000 | ~15 MB |
~10,000 | ~120 MB |
Run npm run benchmark for live measurements against your instance.
OpenClaw Integration
The openclaw/ directory contains an optional plugin adapter that integrates Dali into OpenClaw. It provides:
Automatic context injection β a
before_prompt_buildhook embeds the user's message, searches for relevant memories, and injects them into the system promptAgent tools β
dali_searchanddali_storelet the agent query and persist memoriesWorkspace indexer β one-time script to seed Dali from existing
.mdworkspace files
Install the Plugin
# From npm
openclaw plugins install @openclaw/dali-memory
# From GitHub (no npm publish required)
openclaw plugins install github:linnaxis/dali-memory-openclaw
# From a local clone
openclaw plugins install ./openclawSee openclaw/README.md for configuration and detailed setup.
Claude Code Integration Prompts
The prompts/ directory contains ready-to-paste prompts for Claude Code:
Prompt | Purpose |
Install and configure the Dali MCP server | |
Wire the plugin into an OpenClaw instance | |
Test the full integration end-to-end |
Configuration
Environment Variables
Variable | Default | Description |
|
| SQLite database path |
| Current directory name | Default project name |
|
| Ollama API endpoint |
|
| Embedding model |
Database Schema
Dali uses SQLite with the sqlite-vec extension for vector search.
Tables
Table | Purpose |
| Core storage β type, content, summary, tags, metadata, project |
| Bridge: maps UUID |
| vec0 virtual table β 768-dim cosine distance vectors |
| Tool invocation history with timing |
| Session tracking with project association |
| File modification records linked to memories |
| Migration version tracking |
Design Decisions
Bridge table pattern: sqlite-vec requires integer rowids; memories use UUIDs. The
memory_vec_maptable bridges them.WAL mode: Enables concurrent reads during writes.
Graceful degradation: Memories are stored immediately; embeddings are backfilled asynchronously when Ollama becomes available.
JSON storage: Tags and metadata stored as JSON strings, parsed on read.
Project Structure
dali-memory-openclaw/
βββ README.md
βββ package.json
βββ tsconfig.json
βββ .mcp.json.example
βββ LICENSE
βββ src/ # Dali MCP server
β βββ index.ts # Entry point (stdio transport)
β βββ server.ts # Tool + resource definitions
β βββ types.ts # Interfaces + Zod schemas
β βββ db/
β β βββ client.ts # Database init, WAL, migrations
β β βββ schema.ts # DDL + version tracking
β βββ memory/
β β βββ search.ts # KNN vector search + text filtering
β β βββ store.ts # Insert, embed, archive, delete
β βββ embeddings/
β β βββ ollama.ts # Ollama /api/embed client
β βββ audit/
β βββ logger.ts # Audit log insertion
β βββ query.ts # Audit log query + filtering
βββ openclaw/ # OpenClaw plugin (optional)
β βββ README.md
β βββ package.json
β βββ openclaw.plugin.json
β βββ api.ts
β βββ index.ts
β βββ src/
β β βββ db.ts
β β βββ embedder.ts
β β βββ search-tool.ts
β β βββ store-tool.ts
β β βββ context-hook.ts
β βββ scripts/
β βββ index-workspace.ts
βββ scripts/
β βββ benchmark.ts # Token savings + latency benchmark
βββ prompts/
βββ INSTALL_DALI.md
βββ INSTALL_OPENCLAW_PLUGIN.md
βββ VERIFY_INTEGRATION.mdLicense
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
Persistent memory for AI agents across Claude, ChatGPT and any MCP client.
Persistent memory for AI assistants. Save once; recall from Claude, ChatGPT, or any MCP client.
Persistent personal memory for AI assistants β save, search, and recall across every MCP client.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceProvides persistent memory for AI coding agents via MCP, enabling agents to store and semantically recall facts, events, and lessons across sessions, all running locally without cloud dependencies.Apache 2.0
- FlicenseNot gradedqualityAmaintenanceEnables AI coding agents to read and write persistent, local-first memory over MCP, storing decisions, preferences, error patterns, research, and cross-project guidelines in SQLite with semantic search. Agents can recall relevant context before tasks and store new learnings mid-session, keeping knowledge across sessions and projects without any external API calls.-
- FlicenseNot gradedqualityAmaintenanceEnables AI coding agents to store, search, and recall project-specific and global memory through MCP, using local SQLite and semantic search. It also optionally supports autonomous task execution powered by the same memory layer.-
- AlicenseNot gradedqualityBmaintenanceEnables MCP-compatible AI coding tools to store and recall persistent memories across sessions and projects, with keyword and semantic search backed by a local SQLite database.2,060 npm76Apache 2.0