Enables containerized deployment of the entire Mimir stack with automated service orchestration and platform-specific optimizations.
Integrates with GitHub Copilot API for AI model access, enabling chat completions and orchestration workflows through OpenAI-compatible endpoints.
Provides persistent graph database storage for AI agents with knowledge graph capabilities, semantic search, and relationship tracking for tasks and context.
Supports local LLM execution and embeddings generation for semantic search, offering offline AI capabilities with models like qwen2.5-coder and nomic-embed-text.
Provides OpenAI API integration for chat completions, embeddings, and AI model access with support for GPT-4 and other models.
M.I.M.I.R - Multi-agent Intelligent Memory & Insight Repository
AI-Powered Memory Bank + Task Management Orchestration with Knowledge Graphs
Give your AI agents a persistent memory with relationship understanding.
Imagine your AI assistant that can remember every task you've discussed, understand how they relate to each other, and recall relevant context from weeks ago. Mimir makes this possible by combining Neo4j's powerful graph database with AI embeddings and the Model Context Protocol. Your AI doesn't just store isolated factsβit builds a living knowledge graph that grows smarter with every conversation. Perfect for developers managing complex projects where tasks depend on each other, contexts overlap, and you need an AI that truly understands your work.
Mimir is a Model Context Protocol (MCP) server that provides AI assistants (Claude, ChatGPT, etc.) with a persistent graph database to store tasks, context, and relationships. Instead of forgetting everything between conversations, your AI can remember, learn, and build knowledge over time.
π Table of Contents
Why Mimir? - What problems does it solve?
Quick Start - Get running in 5 minutes
Configuration - Environment setup
Usage - How to use with AI agents
File Indexing - Index your codebase for RAG
Architecture - How it works
Features - What can it do?
PCTX Integration - 98% token reduction with Code Mode
Troubleshooting - Common issues
Documentation - Learn more
π― Why Mimir?
Without Mimir:
AI forgets context between conversations
No persistent task tracking
Can't see relationships between tasks
Limited to current conversation context
With Mimir:
AI remembers all tasks and context
Persistent Neo4j graph database
Discovers relationships automatically
Multi-agent coordination
Semantic search with AI embeddings
Perfect for:
Long-term software projects
Multi-agent AI workflows
Complex task orchestration
Knowledge graph building
β‘ Quick Start (3 Steps)
π‘ New to Mimir? Check out the 5-minute Quick Start Guide for a step-by-step walkthrough.
π Connecting to IDE? See the IDE Integration Guide for VS Code, Cursor, and Windsurf setup!
π― VS Code Users? Try the Dev Container setup for instant environment with zero configuration!
1. Prerequisites
Docker Desktop - Download here
Node.js 18+ - Download here
Git - Download here
2. Install & Start
That's it! Services will start in the background. The startup script automatically detects your platform (macOS ARM64, Linux, Windows) and uses the optimized docker-compose file.
β οΈ IMPORTANT - Configure Workspace Access:
The ONLY required configuration is HOST_WORKSPACE_ROOT in .env:
What this does:
Mounts your source directory to the container (default: read-write)
You manually choose which folders to index via UI or VSCode plugin
Don't panic! Indexing is per-folder and requires your explicit action
Tilde expansion:
~/srcautomatically expands to your home directory (e.g.,/Users/john/src)
For read-only access, edit docker-compose.yml:
3. Verify It's Working
Available Commands:
npm run start- Start all servicesnpm run stop- Stop all servicesnpm run restart- Restart servicesnpm run logs- View logsnpm run status- Check service statusnpm run rebuild- Full rebuild without cache
See scripts/START_SCRIPT.md for more details.
You're ready! The Mimir Web UI is now available at http://localhost:9042
What you get:
π― Portal: Main hub with navigation and file indexing http://localhost:9042/portal
π¨ Orchestration Studio: Visual workflow builder (beta) http://localhost:9042/studio
π MCP API: RESTful API at
http://localhost:9042/mcp㪠Chat API: OpenAI-compatible endpoints at
http://localhost:9042/v1/chat/completionsand/v1/embeddings
βοΈ Configuration
Environment Variables
Edit the .env file to customize your setup. Most users can use the defaults.
Core Settings (Required)
LLM Configuration (For Chat API & Orchestration)
Provider Options:
openaiorcopilot: OpenAI-compatible endpoints (GitHub Copilot, OpenAI API, or any compatible service)ollamaorllama.cpp: Local LLM providers (Ollama or llama.cpp - interchangeable)
Configuration Examples:
Example 1: Copilot API (GitHub Copilot license, recommended for development):
Example 2: Local Ollama (offline, fully local):
Example 3: OpenAI API (cloud-based, requires API key):
Available Models (Dynamic):
Models are fetched dynamically from your configured LLM provider at runtime. To see available models:
All models from the LLM provider's /v1/models endpoint are automatically available - no hardcoded list!
Switching Providers: Change MIMIR_DEFAULT_PROVIDER and MIMIR_LLM_API in .env, then restart:
Existing conversations remain unchanged - the new provider is used for subsequent messages.
Embeddings (Optional - for semantic search)
Embeddings can use the same endpoint as your LLM, or a separate specialized service (like llama.cpp for embeddings only).
Supported Embedding Models:
nomic-embed-text(default - lightweight, 768 dims)bge-m3(higher quality, 1024 dims)text-embedding-3-small(OpenAI, 1536 dims - requires OpenAI LLM provider)
Advanced Settings (Optional)
Documentation Auto-Indexing:
By default, Mimir automatically indexes its own documentation (/app/docs) on startup. This allows you to immediately query Mimir's documentation using semantic search:
To disable auto-indexing, set in .env:
See env.example or docker-compose.yml for complete list of configuration options.
Optional Services
By default, only the core services run (Mimir Server, Neo4j, Copilot API). You can enable additional services by uncommenting them in docker-compose.yml:
Enable Ollama (Local LLM Provider)
Why enable? Run LLMs completely offline, no external dependencies.
Using External Ollama Instead:
If you already have Ollama running on your host or another machine:
Enable Open-WebUI (Alternative Chat Interface)
Why enable? Alternative web UI for chatting with Ollama models, useful for testing.
Configuration:
Uses Copilot API by default for models
Can be configured to use Ollama instead
See
docker/open-webui/README.mdfor details
π― Usage
VSCode Extension (β NEW!)
Mimir Chat Assistant brings Graph-RAG directly into VSCode with native chat integration.
Installation
Package the extension:
cd vscode-extension npm install npm run compile npm run package # Creates mimir-chat-0.1.0.vsixInstall in VSCode:
Cmd+Shift+Pβ "Extensions: Install from VSIX..."Select
mimir-chat-0.1.0.vsixReload VSCode
Usage
Type @mimir in the VSCode Chat window:
Flags (Per-Message Overrides)
Flag | Short | Description | Example |
|
| Preamble/chatmode |
|
|
| Model override |
|
|
| Graph depth (1-3) |
|
|
| Max results |
|
|
| Threshold (0-1) |
|
|
| Max tool calls |
|
| Disable tools |
|
Extension Settings
Configure via Preferences > Settings > Mimir:
Model Selection:
The extension respects the VS Code Chat dropdown (the "Claude Sonnet 4.5" selector in Chat UI)
Override with
-mflag:@mimir -m gpt-4.1 ...Fallback to
mimir.modelsetting if dropdown not available
Chatmode/Preamble Behavior:
First message: Uses
mimir.defaultPreamblesettingFollow-ups: Keeps existing preamble from conversation
Switch with
-uflag:@mimir -u hackerman analyze this
See Also
vscode-extension/README.md - Detailed extension documentation
vscode-extension/TESTING.md - Testing and development
Using with AI Agents (MCP)
Mimir works as an MCP server - AI assistants can call it to store and retrieve information.
Example conversation with Claude/ChatGPT:
Available Tools
Mimir provides 13 MCP tools for AI agents:
Memory Operations (6 tools):
memory_node- Create/read/update nodes (tasks, files, concepts)memory_edge- Create relationships between nodesmemory_batch- Bulk operations for efficiencymemory_lock- Multi-agent coordinationmemory_clear- Clear data (use carefully!)get_task_context- Get filtered context by agent type
File Indexing (3 tools):
index_folder- Index code files into graphremove_folder- Stop watching folderlist_folders- Show watched folders
Vector Search (2 tools):
vector_search_nodes- Semantic search with AI embeddingsget_embedding_stats- Embedding statistics
Todo Management (2 tools):
todo- Manage individual taskstodo_list- Manage task lists
File Indexing
Mimir can automatically index your codebase for semantic search and RAG (Retrieval-Augmented Generation). Files are watched for changes and re-indexed automatically.
Quick Start
Add a folder to index:
List indexed folders:
Remove a folder:
β οΈ Note: Large folders may take several minutes to index. Don't kill the process! Watch the logs to see chunking progress. The script will show "β¨ Done!" when complete.
Supported File Types
β Fully Supported (with syntax highlighting):
Languages: TypeScript (.ts, .tsx), JavaScript (.js, .jsx), Python (.py), Java (.java), Go (.go), Rust (.rs), C/C++ (.c, .cpp), C# (.cs), Ruby (.rb), PHP (.php)
Markup: Markdown (.md), HTML (.html), XML (.xml)
Data: JSON (.json), YAML (.yaml, .yml), SQL (.sql)
Styles: CSS (.css), SCSS (.scss)
Documents: PDF (.pdf), DOCX (.docx) - text extraction
β Generic Support (plain text indexing):
Any text file not in the skip list below
β Automatically Skipped:
Images: .png, .jpg, .jpeg, .gif, .bmp, .ico, .svg, .webp, .tiff
Videos: .mp4, .avi, .mov, .wmv, .flv, .webm, .mkv
Audio: .mp3, .wav, .ogg, .m4a, .flac, .aac
Archives: .zip, .tar, .gz, .rar, .7z, .bz2
Binaries: .exe, .dll, .so, .dylib, .bin, .wasm
Compiled: .pyc, .pyo, .class, .o, .obj
Databases: .db, .sqlite, .sqlite3
Lock files: package-lock.json, yarn.lock, pnpm-lock.yaml
.gitignore Respect
Mimir automatically respects your :
Additional patterns:
Hidden files (
.git/,.DS_Store)Build artifacts (
build/,dist/,out/)Dependencies (
node_modules/,venv/,vendor/)
Indexing Examples
Index a single project:
Index multiple projects:
Check what's indexed:
How It Works
Scan: Walks directory tree, respecting
.gitignoreParse: Extracts text content (or from PDF/DOCX)
Chunk: Splits large files into 1000-char chunks
Embed: Generates vector embeddings for semantic search (optional)
Store: Creates File nodes and FileChunk nodes in Neo4j
Watch: Monitors for changes and re-indexes automatically
Storage Details
File Node Properties:
path: Relative path from workspace rootabsolute_path: Full filesystem pathname: Filenameextension: File extensionlanguage: Detected language (typescript, python, etc.)content: Full file contentsize_bytes: File sizeline_count: Number of lineslast_modified: Last modification timestamp
FileChunk Node Properties:
text: Chunk content (max 1000 chars)chunk_index: Position in file (0, 1, 2...)embedding: Vector embedding (1024 dimensions)
Relationships:
File -[:HAS_CHUNK]-> FileChunk
Performance
Small projects (<100 files): ~5-10 seconds
Medium projects (100-1000 files): ~30-60 seconds
Large projects (1000+ files): ~2-5 minutes
With embeddings enabled: Add ~50% more time for vector generation.
Troubleshooting
Problem: Local path fails to index
Problem: Files not being indexed
Problem: Process seems stuck
Problem: Too many files indexed
Problem: Embeddings not working
Web UI
Access Mimir through your browser at http://localhost:9042:
π― Portal (Main Hub)
File indexing management (add/remove folders)
Navigation to other features
System status and health
π¨ Orchestration Studio (Coming Soon)
Visual workflow builder
Agent coordination
Task dependency graphs
HTTP APIs
Mimir provides multiple APIs for different use cases:
1. MCP API - For AI assistants (Claude, ChatGPT, etc.)
2. Chat API - OpenAI-compatible chat completions
Chat API with MCP Tools & RAG
The Chat API (/v1/chat/completions) provides OpenAI-compatible chat completions with built-in MCP tool support and Retrieval-Augmented Generation (RAG).
Features
Full MCP Tool Support: Access all 13 Mimir tools (memory, file indexing, semantic search, todos)
Semantic Search: Automatically retrieves relevant context from indexed files
Conversation Memory: Persists conversations with thread IDs
Multi-Provider LLM Support: Switch between Ollama, OpenAI, copilot-api with one config
LLM Configuration
The Chat API uses a unified LLM configuration - switch providers by changing environment variables only:
Provider Examples
Using Copilot API (GitHub Copilot license - recommended for development)
Using Local Ollama
Using OpenAI API
Chat API Request Format
Request Parameters
Parameter | Type | Required | Default | Description |
| string | Γ’Εβ¦ | - | The user's message |
| string | β | new UUID | Conversation thread identifier |
| boolean | β | true | Enable MCP tools (memory, todos, semantic search) |
| boolean | β | true | Enable Retrieval-Augmented Generation |
| string | β | default | Custom system prompt for this conversation |
Response Format (Streaming)
Switching Providers at Runtime
To switch providers, update .env and restart:
All existing conversations and chat history remain intact. The new provider is used for subsequent messages.
Embedding Models
The embedding model determines semantic search quality. bge-m3 is the default (high quality, efficient):
Model | Dimensions | Speed | Notes |
| 1024 | Fast | Default - recommended |
| 768 | Fast | Lightweight alternative |
| 1536 | Fast | OpenAI-compatible, excellent quality |
Change in .env:
3. Orchestration API - For workflow execution
Architecture
What's Running?
When you run docker compose up -d, you get these services:
Service | Port | Purpose | URL |
Mimir Server | 9042 | Web UI + MCP API + Chat API | |
Neo4j | 7474, 7687 | Graph database storage | |
Copilot API | 4141 | AI model access (OpenAI-compatible) |
Optional Services (commented out by default):
Service | Port | Purpose | Enable With |
Ollama | 11434 | Local LLM embeddings | Uncomment in docker-compose.yml |
Open-WebUI | 3000 | Alternative chat UI | Uncomment in docker-compose.yml |
Unified LLM Configuration: The Chat API supports any OpenAI-compatible endpoint:
Copilot API (GitHub Copilot license) - Default provider
Ollama (local, offline)
OpenAI API (cloud-based)
Switch providers by changing
MIMIR_DEFAULT_PROVIDERandMIMIR_LLM_APIin.env
Embeddings: Semantic search uses
MIMIR_EMBEDDINGS_MODEL(default:bge-m3@ 1024 dimensions):
Set
MIMIR_EMBEDDINGS_APIto match your embeddings providerCan use same endpoint as LLM or separate specialized service
See embeddings configuration section above for details
Open-WebUI: Optional alternative chat interface. Useful for testing Ollama models locally. To enable, uncomment the
open-webuiservice in docker-compose.yml and restart.
Optional Services (commented out by default):
Service | Port | Purpose | Enable With |
Ollama | 11434 | Local LLM embeddings | Uncomment in docker-compose.yml |
Open-WebUI | 3000 | Alternative chat UI | Uncomment in docker-compose.yml |
Γ―ΒΏΒ½ Embeddings: For semantic search, you need embeddings. Options:
Use external Ollama server (recommended - set
OLLAMA_BASE_URLin .env)Enable built-in Ollama service (uncomment in docker-compose.yml)
Use Copilot embeddings (experimental - set
MIMIR_EMBEDDINGS_PROVIDER=copilot)Use any OpenAI-compatible embeddings endpoint
οΏ½ Copilot API: Required for orchestration workflows. Provides OpenAI-compatible API using your GitHub Copilot license. Any OpenAI-compatible API also works.
οΏ½ Open-WebUI: Optional alternative chat interface. Useful for testing Ollama models locally. To enable, uncomment the
open-webuiservice in docker-compose.yml and restart.
How It Works
Key Points:
Mimir Server provides both Web UI and APIs on port 9042
Neo4j stores everything (tasks, relationships, files, embeddings)
Copilot API provides AI models for orchestration (optional)
Ollama provides embeddings for semantic search (optional, can be external)
All data persists between restarts in
./data/neo4j/
Data Persistence
Your data is stored in local directories:
β Stopping containers doesn't delete data! Your tasks and knowledge graph persist.
π§ Troubleshooting
Common Issues
Services won't start:
Can't connect to Neo4j:
Embeddings not working:
Port conflicts:
If ports are already in use, edit docker-compose.yml:
Need Help?
Check logs:
docker compose logs [service-name]Service status:
docker compose psHealth checks:
Mimir Web UI: http://localhost:9042
Mimir API Health: http://localhost:9042/health
Neo4j Browser: http://localhost:7474
GitHub Issues: Report a problem
π‘ Usage Examples
Basic Task Management
Create a task:
Add context to task:
List all tasks:
Knowledge Graph Features
Create relationships:
Find related items:
Search with AI:
π Documentation
Getting Started:
π§ Memory Guide - How to use the memory system
πΈοΈ Knowledge Graph Guide - Understanding graph relationships
π³ Docker Deployment - Production deployment
π¨ Portal UI User Guide β
π Model Provider Guide π
For AI Agent Developers:
π€ AGENTS.md - Complete agent workflow guide
π§ Configuration Guide - VSCode, Cursor, Claude Desktop setup
π§ͺ Testing Guide - Test suite overview
π Server API Documentation - Complete TypeScript API reference
Advanced Topics:
ποΈ Multi-Agent Architecture - System architecture
π£οΈ Implementation Roadmap - Development roadmap
π Research - Academic research and analysis
π§ Development
Start services:
Local development:
Project structure:
β¨ Key Features
Core Capabilities:
β Persistent Memory - Tasks and context stored in Neo4j graph database
β Knowledge Graph - Connect tasks, files, and concepts with relationships
β AI Semantic Search - Find tasks by meaning, not just keywords
β Multi-Agent Support - Multiple AI agents can work together safely
β File Indexing - Automatically track and index your codebase
β MCP Standard - Works with any MCP-compatible AI assistant
Advanced Features:
π Task Locking - Prevent conflicts when multiple agents work simultaneously
π Context Enrichment - Automatic relationship discovery
π Vector Embeddings - Optional semantic search with AI embeddings
π Graph Visualization - View your task network in Neo4j Browser
π PCTX Integration (Code Mode)
NEW: Mimir now supports PCTX for Code Mode execution, reducing token usage by up to 98%!
Instead of sequential tool calls, AI agents can write TypeScript code that executes in a sandboxed environment:
Benefits:
β 98% token reduction for complex operations
β Type-safe TypeScript with instant feedback
β Secure sandbox execution (Deno)
β All 13 Mimir tools available via
Mimir.*namespaceβ Multi-server workflows (combine Mimir + GitHub + Slack)
Quick Start:
Documentation:
π PCTX Integration Guide - Complete usage guide with examples
π¬ Integration Analysis - Architecture and rationale
πΊοΈ Roadmap
Current Status (v1.0): Production ready with core features
Coming Soon:
Multi-agent orchestration patterns (PM/Worker/QC)
Enhanced context deduplication
Agent performance monitoring
Distributed task execution
See full roadmap for details.
π Quick Reference
Common Commands
Important URLs
Mimir Web UI: http://localhost:9042 (Portal, file indexing, APIs)
Neo4j Browser: http://localhost:7474 (user:
neo4j, pass:password)Copilot API: http://localhost:4141 (AI model access)
Ollama (if external): http://localhost:11434 (embeddings)
Open-WebUI (if enabled): http://localhost:3000 (alternative chat UI)
Data Locations
Neo4j data:
./data/neo4j/Logs:
./logs/Config:
.env(100% ENV-based, no config files needed)
π Why Choose Mimir?
Mimir is the only open-source solution that combines Graph-RAG (graph relationships + vector embeddings) with multi-agent orchestration and AI assistant integration.
Feature Comparison
Feature | Mimir | Pinecone | Weaviate | Milvus | Qdrant |
Graph Relationships | β Native | β None | β οΈ Limited | β None | β None |
Vector Search | β Yes | β Yes | β Yes | β Yes | β Yes |
ACID Transactions | β Full | β None | β None | β None | β None |
Graph Algorithms | β Built-in | β None | β None | β None | β None |
MCP Integration | β Native | β None | β None | β None | β None |
Multi-Agent Support | β Built-in | β None | β None | β None | β None |
Self-Hosting | β Free | β Cloud-only | β Yes | β Yes | β Yes |
Open Source | β Yes | β No | β Yes | β Yes | β Yes |
Starting Cost | π° Free | π° $70/mo | π° $25/mo | π° Free | π° Free |
Mimir's Unique Advantages:
πΈοΈ Only solution with native graph traversal + vector search - Understand relationships, not just similarity
π€ Built-in multi-agent orchestration - PM β Worker β QC workflows out of the box
π Direct AI assistant integration - Works with Claude, ChatGPT via MCP protocol
πΎ ACID transactions - Your data is always consistent and reliable
π 100% open-source and free - No vendor lock-in, full control
Perfect for developers building AI agents that need to understand how tasks relate to each other, not just find similar items.
π€ Contributing
Contributions welcome! Please:
Fork the repository
Create a feature branch
Submit a pull request
See CONTRIBUTING.md for guidelines.
π License
MIT License with additional terms for AI/ML systems - see LICENSE for details
π Acknowledgments
Built on research from Anthropic, Microsoft, and the Graph-RAG community.
Questions? Open an issue or check the documentation