Mimir logo

Mimir

by kamysh

Stores scored beliefs, typed relationships, provenance, and searchable Markdown for persistent AI coding-agent memory.

Install Mimir

Run the project’s own setup commands, in order.

Setup steps from the project

kamysh/mimir installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    nix build github:kamysh/mimir#mimir
    
  2. 2. Check the setup
    ./result/bin/mimir --version
    
  3. 3. Check the setup
    ./result/bin/mimir-mcp --version
    
  4. 4. Run
    docker run -d \
      --name postgres-ai \
      --restart always \
      -p 127.0.0.1:5432:5432 \
      -v mimir_data:/var/lib/postgresql/data \
      kamysh/postgres-ai:latest
    
  5. 5. Configure
    curl -fsSL https://raw.githubusercontent.com/kamysh/mimir/v3.3.3/mimir-setup/create-db-user.sh \
      | bash -s -- --container postgres-ai --host localhost --port 5432 --user mimir --db mimir
    
  6. 6. Install
    mkdir -p "$HOME/.local/bin"
    

Overview

kamysh/mimir gives AI coding agents a persistent reasoning store backed by PostgreSQL and Apache AGE. It records beliefs, patterns, evidence, and typed graph relationships, including support, defeat, causation, and contradiction. Agents can retrieve relevant beliefs through hybrid text-and-graph queries, inspect provenance, propagate defeats, and search indexed Markdown documents semantically. Reach for it when decisions, rejected approaches, and supporting evidence need to persist across coding sessions.

Use cases

  • Preserve coding decisions and rejected approaches across sessions
  • Trace beliefs back to indexed Markdown evidence
  • Compare supporting, defeating, and contradicting conclusions
  • Search project documentation alongside a reasoning graph
  • Run counterfactual queries over recorded causal hypotheses

Key features

  • Persistent beliefs with probability, confidence, and provenance
  • Typed support, defeat, cause, and contradiction relationships
  • Defeat propagation and contradiction detection
  • Hybrid text-and-graph belief retrieval
  • Semantic Markdown indexing and evidence grounding
  • PostgreSQL and Apache AGE storage

Tools23

What Mimir lets your agent do. Expand a tool for its parameters.

Self-reported~439 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

Last commit10d agoMost recent push to the default branch.
Tools exposed23Callable tools this server registers over MCP.

How Mimir works

What kamysh/mimir does

kamysh/mimir provides persistent reasoning memory for AI coding agents through MCP. It separates observations and document passages from the beliefs derived from them, allowing an agent to preserve decisions, rejected approaches, confidence values, and the evidence behind a conclusion.

Beliefs can carry probability, confidence, provenance, and a link to an indexed document passage. Patterns record a situation, an approach, and its observed success rate. The system also models relationships between beliefs, so an agent can distinguish support, defeat, contradiction, and causal hypotheses rather than storing all context as untyped notes.

How it works

PostgreSQL stores the application data, while Apache AGE provides the graph used for typed belief relationships. Mimir applies its database migrations when it first connects, including creation of the AGE graph. Document ingestion splits Markdown files into chunks, creates embeddings, and indexes those chunks for semantic retrieval.

Retrieval can combine text matching with graph expansion and order results by belief probability. Defeat relationships can trigger propagation cascades. Causal edges are available to intervention queries, but recording a causal relationship does not automatically propagate values through the graph. Evidence edges connect document chunks to beliefs as local support and remain distinct from causal edges.

Setup and configuration

A complete installation requires a PostgreSQL database, the mimir CLI and mimir-mcp binaries, and registration of the MCP server with an agent client. The repository documents Nix builds for both binaries and a Docker-based PostgreSQL setup using kamysh/postgres-ai:latest, which includes pgvector and Apache AGE.

The database can be run in a container or supplied independently. Database credentials are configured through PostgreSQL connection settings, including a .pgpass entry in the documented setup path. Mimir does not install a database, start a daemon, create a judge, or schedule maintenance automatically. The MCP process is launched by the registered client when needed.

Codex and Claude Code are documented client integrations. An optional judge can review recorded experiences when separately launched; embedding and judge operations can use configured external providers.

Tools and capabilities

The MCP surface includes tools for:

  • Creating, reading, listing, updating, and deleting beliefs and patterns.
  • Recording support, defeat, cause, and contradiction relationships.
  • Finding active contradictions and running defeat propagation.
  • Performing counterfactual intervention queries over causal relationships.
  • Applying time decay to beliefs and deleting project-scoped data.
  • Loading, searching, and clearing indexed Markdown documents.
  • Adding evidence from document passages and listing evidence for a belief.
  • Retrieving relevant beliefs through combined text and graph expansion.

Belief fields support probability and confidence values between zero and one. Evidence records retain the referenced passage and a weight, making it possible to inspect which indexed observations ground a conclusion.

Limitations and notes

The reasoning graph and local search can run locally, but document embedding may send chunks to a configured cloud embedding provider. A configured API judge can likewise send selected experiences and retrieved tool results to its provider. The judge is optional and is not started as part of normal installation.

Causal relationships support intervention queries but do not perform automatic causal propagation. Evidence added through a grounding edge is treated as local positive evidence and is not converted into a causal edge. Database preparation, binary installation, and MCP client registration are separate setup requirements.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Mimir

kamysh/mimir is an MCP server that connects AI coding agents to a PostgreSQL and Apache AGE-backed reasoning store. Its main tools record and retrieve beliefs and patterns, link beliefs with support, defeat, cause, and contradiction edges, propagate defeats, track evidence provenance, and index or search Markdown documents semantically.

Install the `mimir` and `mimir-mcp` binaries, prepare PostgreSQL with the required extensions, and register the MCP executable with your agent client. The documented paths use Nix for the binaries and Docker with `kamysh/postgres-ai:latest` for PostgreSQL.

kamysh/mimir uses PostgreSQL with Apache AGE for its belief graph. The documented PostgreSQL image also includes pgvector, uuid-ossp, and pgcrypto, and Mimir applies its embedded migrations when it first connects.

Yes, kamysh/mimir can parse Markdown files into chunks, embed and index them, then search those chunks semantically. Beliefs can also be grounded in specific indexed passages through evidence relationships.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMimir AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/kamysh-mimir?style=directory)](https://allmcps.com/mcp/kamysh-mimir)
HTML Embed
<a href="https://allmcps.com/mcp/kamysh-mimir"><img src="https://allmcps.com/api/badge/kamysh-mimir?style=directory" alt="Mimir on AllMCPs" /></a>