Skip to main content
Glama
wolfcao

muninn-local-mcp

by wolfcao

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

  • 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

Available Tools

7 tools
global_memory_listA

List globally stored memories, ordered by creation time (newest first).

Args: limit: Maximum number of memories to return (default 20).

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations are missing, so description carries full burden. It mentions ordering and default limit, but lacks info on safety (read-only), return format (though output schema exists), and any pagination or auth requirements.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise: one sentence and a brief parameter note, with no wasted words. It front-loads the main action.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the presence of an output schema, the description need not detail return values. It adequately covers purpose and parameter, but lacks explicit guidance and safety context for a tool with no annotations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema coverage, the description compensates by explaining the limit parameter's meaning and default. This adds value beyond the raw schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool lists globally stored memories with a specific ordering (newest first), distinguishing it from siblings like global_memory_search and memory_list.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives such as global_memory_search or memory_list. The description only states what it does without context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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).

ParametersJSON Schema
NameRequiredDescriptionDefault
tagsNo
textYes
memory_typeNonote

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, and the description does not disclose behavioral traits such as idempotency, overwrite behavior, size limits, or auth requirements. The description is functional but lacks depth.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a clear main purpose and bullet points for parameters. It is slightly verbose but efficient overall.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that an output schema exists, return values are handled. The description covers param semantics and purpose well but lacks behavioral transparency, limiting completeness for a mutation tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description covers all three parameters: text (required, content), memory_type (allowed values with default), and tags (optional, comma-separated). However, there is a mismatch: schema lacks enum enforcement, but description lists values.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool writes a memory entry to the global memory store, specifying it is cross-project. This differentiates it from per-project memory tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explains that global memories are shared across projects, implying when to use this vs memory_write. However, it does not explicitly list alternatives or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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).

ParametersJSON Schema
NameRequiredDescriptionDefault
memory_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden for behavioral disclosure. It only states the deletion action, but does not mention irreversibility, confirmation steps, cascading effects, or any other behavioral traits. This is minimal transparency for a destructive operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise: two sentences, the first stating the purpose and the second explaining the argument. No unnecessary words, front-loaded with the core action.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple one-parameter deletion tool, the description covers the basic purpose and parameter meaning. However, it does not mention the output schema (which exists) or any error conditions, leaving some context gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% description coverage; the description adds the nuance that memory_id can be a full or partial ID, which is not in the schema. However, it does not explain the format or how to obtain a memory ID. This partially compensates but lacks completeness.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action (delete), the resource (memory), and the scope (from the current project by its ID). This effectively distinguishes it from sibling tools that list, search, or write memories, including global variants.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not provide any guidance on when to use this tool versus alternatives. It mentions 'current project' but does not contrast with global memory tools, and offers no conditions, prerequisites, or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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).

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
offsetNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description explains ordering and pagination but does not mention safety (read-only implied), output format, or potential rate limits. Adequate but minimal for a read tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences plus a two-line arg list. No wasted words, main purpose front-loaded. Perfectly sized for a simple list tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple list with two optional params and an output schema, the description covers core functionality: listing, ordering, pagination. Lacks mention of filter vs unfiltered listing but sufficient given tool simplicity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 0% description coverage; the description compensates by explaining limit ('maximum number to return, default 20') and offset ('skip for pagination, default 0'). Adds clear meaning beyond schema types and defaults.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states it lists memories in the current project, ordered by creation time newest first. This distinguishes it from sibling tools like global_memory_list (different scope) and memory_search (filtered search).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implies scope ('current project') but does not explicitly say when to use this tool over alternatives like global_memory_list or memory_search. No guidance on prerequisites or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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).

ParametersJSON Schema
NameRequiredDescriptionDefault
tagsNo
textYes
memory_typeNonote

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description bears full responsibility for behavioral clues. It indicates that memories are 'persisted for future sessions,' implying durability. However, it lacks details on whether writes are append-only or overwriting, authorization requirements, size limits, or return values. This leaves room for ambiguity.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise, starting with the core purpose and then detailing parameters. The Args list improves readability. Every sentence is informative, though the parameter descriptions could be slightly more compact without losing clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Although an output schema exists, the description does not mention what the tool returns (e.g., success message, memory ID). It also lacks comparison to global_memory_write, which shares similar purpose but with broader scope. The description is adequate for basic use but misses context that would help the agent choose between siblings.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description fully compensates for 0% schema coverage by providing an explicit Args section that explains each parameter: 'text' required, 'memory_type' with valid options (summary, decision, next-steps, code-pattern, note, default), and 'tags' as comma-separated. This adds significant meaning beyond the schema's type/default fields.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Write a memory entry to the current project's memory store.' It specifies the action (write), the resource (memory entry), and scope (current project). This distinguishes it from siblings like global_memory_write, though not explicitly. The examples of memory types further clarify the domain.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit context for when to use the tool: 'Use this tool to save important context, decisions, code patterns, or next-steps that should be persisted for future sessions.' This guides the agent on appropriate usage, though it does not mention when not to use it or explicitly reference alternatives like global_memory_write.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 7 tool updatesv0.1.0
    • First observedglobal_memory_list
    • First observedglobal_memory_search
    • First observedglobal_memory_write
    • First observedmemory_delete
    • First observedmemory_list
    • First observedmemory_search
    • First observedmemory_write

TDQS

A4/5.0

Scored across 7 tools

Disambiguation5/5

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.

Naming Consistency5/5

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.

Tool Count5/5

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.

Completeness4/5

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

ActivityStale
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    A 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.
    53
    10
    1
    Apache 2.0
  • A
    license
    A
    quality
    A
    maintenance
    Local-first MCP server that gives any AI coding agent per-project memory, workflow intelligence, and always-on, lossless token & context optimization.
    37
    18
    4
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wolfcao/muninn-local-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server