muninn-local-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@muninn-local-mcp search project memory for dependency management decisions"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Muninn Local MCP
A local-first Model Context Protocol (MCP) server that gives AI agents (such as OpenCode) persistent, project-scoped memory powered by ChromaDB and Ollama embeddings.
All data stays on your machine — no external API calls, no cloud storage.
Note: This project is adapted from muninn-mcp and modified to run fully locally using Ollama + ChromaDB instead of cloud services.
Features
Persistent memory — store and recall context across sessions via vector search
Project isolation — each git project gets its own memory namespace, automatically
Global memory — share cross-project knowledge (tooling, patterns, decisions)
Local embeddings — vectors generated by a local Ollama model, zero data leaves your machine
MCP-native — works with any MCP-compatible client (OpenCode, Claude Desktop, etc.)
Zero-config defaults — sensible defaults that work out of the box
Related MCP server: knitbrain
Prerequisites
ollama pull mxbai-embed-largeInstallation
git clone https://github.com/wolfcao/muninn-local-mcp.git
cd muninn-local-mcp
uv syncConfiguration
Environment Variables
Variable | Default | Description |
|
| ChromaDB data directory |
|
| Ollama service URL |
|
| Embedding model name |
| (auto from git root) | Force a specific project ID |
OpenCode Integration
Add the server to your opencode.json:
{
"mcp": {
"muninn": {
"type": "stdio",
"command": "uv",
"args": [
"--directory",
"/path/to/muninn-local-mcp",
"run",
"python",
"-m",
"muninn_local"
]
}
}
}Standalone
Run the MCP server directly:
python -m muninn_localMCP Tools
Muninn exposes 7 tools, split between project-scoped and global memory.
Project Memory
Tool | Parameters | Description |
|
| Store a project-scoped memory |
|
| Semantic search within current project |
|
| List memories (newest first) |
|
| Delete a specific memory |
Global Memory
Tool | Parameters | Description |
|
| Store a cross-project memory |
|
| Semantic search across all projects |
|
| List global memories (newest first) |
Memory Types
The memory_type parameter accepts: summary, decision, next-steps, code-pattern, note (default).
How Project Isolation Works
Muninn automatically identifies the current project by resolving the git repository root (git rev-parse --show-toplevel) and hashing the path with SHA256. The resulting fingerprint becomes the project_id, ensuring each project's memories are isolated in their own ChromaDB collection.
Architecture
Layer | Module | Responsibility |
Entry |
| MCP FastMCP server |
Business |
| Memory CRUD operations |
Storage |
| ChromaDB persistence wrapper |
Embedding |
| Vector generation via Ollama API |
Config |
| data_dir / ollama_url / embed_model |
Identity |
| git root → auto project_id |
Notes
Ollama must be running — the server depends on a local Ollama instance for embedding generation.
Data is persistent — ChromaDB stores data in
~/.config/opencode/muninn/chroma/. Deleting this directory wipes all memories.Path-sensitive project IDs — cloning or forking to a different path generates a new
project_id, so memories won't carry over. Override withMUNINN_PROJECT_IDif needed.
License
MIT
Available Tools
7 toolsglobal_memory_listA
List globally stored memories, ordered by creation time (newest first).
Args: limit: Maximum number of memories to return (default 20).
Inputs: limit. Returns: result
global_memory_searchA
Search the global (cross-project) memory store using semantic similarity.
Embeds the query and returns the most relevant stored memories from all projects.
Args: query: The search query text (required). top_k: Maximum number of results to return (default 5).
Inputs: query (required), top_k. Returns: result
global_memory_writeA
Write a memory entry to the global (cross-project) memory store.
Global memories are shared across all projects and can be queried regardless of which project the MCP server is running in.
Args: text: The memory content to store (required). memory_type: Type of memory. Must be one of: summary, decision, next-steps, code-pattern, note (default). tags: Comma-separated tags for categorization (optional).
Inputs: text (required), tags, memory_type. Returns: result
memory_deleteB
Delete a specific memory from the current project by its ID.
Args: memory_id: The full or partial ID of the memory to delete (required).
Inputs: memory_id (required). Returns: result
memory_listA
List memories stored in the current project, ordered by creation time (newest first).
Args: limit: Maximum number of memories to return (default 20). offset: Number of memories to skip for pagination (default 0).
Inputs: limit, offset. Returns: result
memory_searchA
Search the current project's memory store using semantic similarity.
Embeds the query and returns the most relevant stored memories.
Args: query: The search query text (required). top_k: Maximum number of results to return (default 5).
Inputs: query (required), top_k. Returns: result
memory_writeA
Write a memory entry to the current project's memory store.
Use this tool to save important context, decisions, code patterns, or next-steps that should be persisted for future sessions.
Args: text: The memory content to store (required). memory_type: Type of memory. Must be one of: summary, decision, next-steps, code-pattern, note (default). tags: Comma-separated tags for categorization (optional).
Inputs: text (required), tags, memory_type. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Tools are clearly separated by scope (global vs. project-specific) using consistent prefixes, and each tool performs a distinct operation (list, search, write, delete). No ambiguity between tools.
All tool names follow a consistent pattern: scope prefix (global_memory_ or memory_) followed by a verb (list, search, write, delete). Naming is predictable and uniform.
With 7 tools covering both global and project memory operations (list, search, write, delete), the count is well-scoped and appropriate for a focused memory store server.
The tool surface is mostly complete for both scopes, but the global scope lacks a delete operation, which is a minor gap. CRUD operations are otherwise covered.
Maintenance
Related MCP Connectors
Cloud-hosted MCP server for durable AI memory
An MCP server that gives your AI access to the source code and docs of all public github repos
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
Hosted memory for AI agents over MCP. One memory shared by all your agents.
Related MCP Servers
- AlicenseAqualityBmaintenanceA local-first MCP server that gives AI coding agents persistent memory and controlled commands. Features a git-backed markdown knowledge vault with FTS5 search, surgical section edits, token-aware context budgeting, and a sandboxed command engine with human approval gates. Works with Claude Code, Cursor, Copilot, Gemini, and more.58196 npm1Apache 2.0
- AlicenseAqualityCmaintenanceLocal-first MCP server that gives any AI coding agent per-project memory, workflow intelligence, and always-on, lossless token & context optimization.3765 npm6MIT
- AlicenseNot gradedqualityDmaintenanceA local-first long-term memory system for AI coding agents, exposed as an MCP server.57 npmMIT
- AlicenseNot gradedqualityDmaintenanceA local MCP server that gives AI coding agents persistent memory and context across sessions.4 npmMIT