muninn-local-mcp

muninn-local-mcp

A local-first MCP server providing persistent, project-scoped and global memory for AI agents using ChromaDB and Ollama embeddings, fully offline.

Category
Visit Server

README

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

Prerequisites

  • Python >= 3.11
  • uv — Python package manager
  • Ollama running locally with the mxbai-embed-large model:
ollama pull mxbai-embed-large

Installation

git clone https://github.com/wolfcao/muninn-local-mcp.git
cd muninn-local-mcp
uv sync

Configuration

Environment Variables

Variable Default Description
MUNINN_DATA_DIR ~/.config/opencode/muninn ChromaDB data directory
MUNINN_OLLAMA_URL http://localhost:11434 Ollama service URL
MUNINN_EMBED_MODEL mxbai-embed-large Embedding model name
MUNINN_PROJECT_ID (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_local

MCP Tools

Muninn exposes 7 tools, split between project-scoped and global memory.

Project Memory

Tool Parameters Description
memory_write text, memory_type, tags Store a project-scoped memory
memory_search query, top_k Semantic search within current project
memory_list limit, offset List memories (newest first)
memory_delete memory_id Delete a specific memory

Global Memory

Tool Parameters Description
global_memory_write text, memory_type, tags Store a cross-project memory
global_memory_search query, top_k Semantic search across all projects
global_memory_list limit 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 __main__.py / server.py MCP FastMCP server
Business memory.py (MemoryManager) Memory CRUD operations
Storage chroma_store.py (ChromaStore) ChromaDB persistence wrapper
Embedding embeddings.py (OllamaEmbedder) Vector generation via Ollama API
Config config.py (Config) data_dir / ollama_url / embed_model
Identity project.py git root → auto project_id

Notes

  1. Ollama must be running — the server depends on a local Ollama instance for embedding generation.
  2. Data is persistent — ChromaDB stores data in ~/.config/opencode/muninn/chroma/. Deleting this directory wipes all memories.
  3. Path-sensitive project IDs — cloning or forking to a different path generates a new project_id, so memories won't carry over. Override with MUNINN_PROJECT_ID if needed.

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured