Production-ready MCP memory server with Chroma Cloud vector storage.
A modern Model Context Protocol (MCP) server that provides persistent semantic memory using Chroma Cloud vector database. Built with Python, FastAPI, and following Context7 best practices.
- MCP Protocol 2025-03-26 - Streamable HTTP transport (stateless)
- Chroma Cloud - CloudClient integration (recommended by Context7)
- Path-Based Routing1 - Multi-project support with ONE Docker container
- Semantic Search - Vector-based similarity search with ONNX embeddings2
- Tag Management - Organize memories with custom tags and metadata
- Time-Based Queries - Natural language time expressions ("yesterday", "last week")
- Docker Ready - Multi-stage build, non-root user, proper healthchecks
- Production Best Practices - Context7 validated patterns throughout
- 28 MCP Tools - Complete CRUD, search, export, merge, cleanup operations
- Python 3.13
- MCP Server Stack:
- FastMCP - MCP protocol implementation (2025-03-26)
- FastAPI - Async web framework
- Uvicorn - ASGI server
- Chroma Cloud - Vector database for embeddings
- Docker - Containerization platform
Yggdrasil/
├── docs/ # Documentation
├── [deployment files] # docker-compose.yml, Dockerfile, pyproject.toml
├── .env.example # Configuration template
│
└── src/
├── server.py # MCP server stack
├── config/ # Application settings
│ ├── settings.py
│ ├── chroma_client.py
│ └── request_context.py
├── services/ # Business logic
│ └── memory_service.py
└── utils/ # Helper functions
└── time_parser.py
- Docker (Engine or Desktop)
- Chroma Cloud Account - https://www.trychroma.com
- MCP Client - Claude Code (recommended) or Claude Desktop (not tested)
- Create account Chroma Cloud3 at https://www.trychroma.com
- Create a new Tenant (your organisation)
- Create a Database in your tenant
- Generate an API Key
- Note down:
tenant,database,api_key
# Clone this repository
git clone https://github.com/IT-Square-Plus/Yggdrasil.git
# Navigate to project directory
cd Yggdrasil
# Copy environment template
cp .env.example .env
# Edit .env with your credentials
nano .envRequired variables:
CHROMA_API_KEY=your_api_key_here
CHROMA_TENANT=your_tenant_name
CHROMA_DATABASE=your_database_name
CHROMA_COLLECTION=default_memories # Used only when URL is /mcp (not /mcp-project_name)# Build and start
docker compose up --build -d
# Check logs (wait for ONNX model download ~79MB, ~20 seconds)
docker compose logs -f
# You'll see: "🤖 ONNX embedding model successfully downloaded!"
# Check health
curl http://localhost:8080/ready
# Or open in browser: http://localhost:8080/ready
# If you see JSON response, MCP server is running and ONNX model loaded!Note: First startup downloads ONNX model2 (~80MB, ~20 seconds) from Hugging Face and caches it locally.
Create a .mcp.json file in your project root:
{
"mcpServers": {
"Yggdrasil": {
"type": "http",
"url": "http://localhost:8080/mcp-your_project_name",
"metadata": {
"description": "Yggdrasil MCP Memory Server"
}
}
}
}Important:
- Replace
your_project_namewith your actual project name (e.g.,mcp-enigma,mcp-myapp) - The
"type": "http"field is required - without it Claude Code won't connect! - Each project can have its own
.mcp.jsonwith a unique URL suffix for isolated memory
For multi-project setup details, see: docs/PATH_BASED_ROUTING.md
- Claude Desktop compatibility (might work, haven't tested it yet)
- [WiP] Document/file parsing
- Gemini CLI compatibility
If you're wondering about what the Chroma Cloud Quotas (Org Settings -> Quotas) and its values mean?
Have a look at this guide: docs/CHROMA_QUOTAS.md
Does it work on Open AI's Codex?
Not sure. Haven't tested and have no intention to work on Codex's compatibility yet. It's the lowest priotity now for me.
Might work out-of-the-box, might not. Not a Codex user, sorry.
Why only Chroma Cloud and not self-hosted ChromaDB?
I actually developed previously Yggdrasil using self-hosted ChromaDB 0.6.x so you could run it on your own server.
But then ChromaDB Devs released new version of ChromaDB rewritten in Rust and they haven't implemented Auth mechanism yet.
I was kind of too lazy to implement any sort of OAuth for 1.x and then I've discovered that they're providing Chroma Cloud.
It's damn cheap. No monthly contract, just pay-as-you-go model. You pay for what you use and API Auth included so why not?
-
Heavily inspired by Henry "doobidoo" Krupp's MCP Memory Service project.
-
Special thanks to Jakub Gościniak for inspiring this project through our discussions about separate MCP Memory.
-
Also thanks to Maciej Waśniewski thanks to whom and our shared memory, we can work on the same project.
[1] Path-Based Routing
Enables one Yggdrasil Docker container to serve multiple Claude Code projects simultaneously, each with isolated memory collections.
For complete setup guide with examples, see: docs/PATH_BASED_ROUTING.md
[2] ONNX Model
Open Neural Network Exchange (ONNX) is ChromaDB's AI engine for semantic search - it converts text into 384/768/1536/3072/4096-dimensional vectors representing meaning, enabling search by concept rather than keywords.
For detailed technical explanation, see: docs/ONNX.md
[3] Chroma Cloud
For full guide on how to set up and configure Chroma Cloud account, see: docs/CHROMA_CLOUD.md