Skip to main content
Glama

Mimir: an IDE for AI agents

Human IDEs are built around screens, mice and colours. AI coding agents get none of that. They work through grep, "read whole file" and "replace exact string". Mimir gives an agent the useful parts of an IDE (code structure, safe edits, instant feedback, undo) as tools, and gives the human a live dashboard to watch the agent work and step in.

In Norse myth, Mímir guards the well of wisdom and knows everything that happens in the world. This one knows everything about a codebase and shares it with the AI working on it.

  • Languages: Python and Java (Maven or Gradle)

  • Works with: Claude Code, Gemini CLI, OpenAI Codex CLI, Cursor, VS Code Copilot, and any other AI that supports MCP or can run terminal commands

Agent tools

Tool

What it replaces

What it does

repo_map

ls -R plus opening files

One line per file listing its classes, methods and functions

outline FILE

reading a whole file

Signatures, doc comments and line ranges, with bodies hidden

get_symbol NAME

reading a file, then searching it

Source of one function or class, with line numbers

who_calls NAME

grep

Every call site, with the calling function

replace_symbol NAME

exact-string find and replace

Rewrites a function or class by name, fixes indentation, refuses edits that break syntax, then runs the related tests

check [FILES]

running tools by hand

Syntax, lint and only the tests related to the changed files, summarised to the failures

checkpoint / restore / diff_since / list_checkpoints

git stash juggling

Snapshot the project, see what changed, and roll back. A restore can itself be undone

Names can be func, Class.method or path/File.java:Class.method. Add @LINE to pick one overloaded Java method, for example Cart.add@28.

Python

Java

Parsing

built-in ast

tree-sitter

Lint

pyflakes

compile errors, reported by the build

Tests

pytest

Maven or Gradle, found automatically (see below)

For Java tests, Mimir looks for Maven or Gradle in this order:

  1. MIMIR_MAVEN, if set

  2. the project's own wrapper (mvnw / gradlew)

  3. mvn / gradle on PATH

  4. MAVEN_HOME, M2_HOME or GRADLE_HOME

  5. the newest copy another project's wrapper already downloaded to ~/.m2/wrapper or ~/.gradle/wrapper

So a project without a wrapper still works if any other project on the machine has one.

Related MCP server: mcp-software-engineering-challenge

Safe to use with any AI

Mimir is a tool the AI calls, like a linter or a test runner. It is not a harness, meaning a third-party app that takes your AI login and uses it outside the official app. Some providers restrict accounts for harness use.

  • No AI calls: Mimir never contacts any AI provider and never makes outbound network connections.

  • No credentials: it never reads API keys, login tokens or folders such as ~/.gemini, ~/.codex or ~/.claude.

  • Official route only: your AI tool stays the official client. Mimir connects through that tool's own supported MCP or terminal features.

tests/test_safety.py fails the build if any of this ever changes. Always follow your AI provider's current terms; this describes how Mimir works, not their policies.

Setup

git clone https://github.com/vipul080/Mimir
cd Mimir
uv venv --python 3.10 .venv
uv pip install --python .venv -e .

This gives you the mimir command at .venv\Scripts\mimir.exe. In the examples below, replace C:\path\to\Mimir with where you cloned it and C:\path\to\project with the project the AI should work on.

Connect your AI

Claude Code

claude mcp add mimir -- C:\path\to\Mimir\.venv\Scripts\mimir.exe serve C:\path\to\project

Gemini CLI

Add to ~/.gemini/settings.json (or .gemini/settings.json in the project):

{
  "mcpServers": {
    "mimir": {
      "command": "C:\\path\\to\\Mimir\\.venv\\Scripts\\mimir.exe",
      "args": ["serve", "C:\\path\\to\\project"]
    }
  }
}

OpenAI Codex CLI

Add to ~/.codex/config.toml:

[mcp_servers.mimir]
command = 'C:\path\to\Mimir\.venv\Scripts\mimir.exe'
args = ['serve', 'C:\path\to\project']

Cursor

Add to .cursor/mcp.json in the project, using the same JSON as Gemini CLI.

VS Code (Copilot agent mode)

Add to .vscode/mcp.json in the project:

{
  "servers": {
    "mimir": {
      "type": "stdio",
      "command": "C:\\path\\to\\Mimir\\.venv\\Scripts\\mimir.exe",
      "args": ["serve", "C:\\path\\to\\project"]
    }
  }
}

Any AI with a terminal (no MCP needed)

Every tool is also a command, with the same name:

mimir repo_map
mimir get_symbol Pricing.applyDiscount
mimir check

Run mimir guide and paste its output into the instructions file your AI reads (AGENTS.md, GEMINI.md, CLAUDE.md and so on) so it knows to use them.

ChatGPT (web and desktop app)

The ChatGPT app can only connect to MCP servers that are reachable on the public internet. Putting a tool that edits files and runs code on the internet is risky, so use OpenAI's Codex CLI instead (above). It runs locally and supports MCP directly.

MCP over HTTP

For clients that connect by URL instead of starting a program:

$env:MIMIR_TOKEN = "pick-a-long-random-secret"
mimir serve C:\path\to\project --http --port 8000

The server listens at http://127.0.0.1:8000/mcp and accepts only requests that send Authorization: Bearer <MIMIR_TOKEN>. It refuses to listen beyond this computer unless a token is set.

Human dashboard

mimir dashboard C:\path\to\project

A local web page that shows, live:

  • every tool call the agent makes, tagged checks pass, checks fail, refused or rolled back

  • whether the project's checks are currently passing

  • which files changed since the last checkpoint

  • all checkpoints, with Diff and Restore buttons

You can run checks or save a checkpoint yourself. Your actions appear in the feed tagged YOU. The dashboard listens on 127.0.0.1 only and rejects requests from other websites. Every action is logged to <project>/.mimir/activity.jsonl.

Environment variables

Variable

Purpose

MIMIR_ROOT

Default project folder for CLI commands

MIMIR_PYTHON

Python interpreter for running the project's pytest tests

MIMIR_MAVEN

Path to a specific mvn to use, overriding automatic discovery

MIMIR_TOKEN

Bearer token required by the HTTP server

Demos

  • demo_shop/ (Python) and demo_shop_java/ (Maven) contain the same deliberate discount bug.

  • python demo.py drives the Python one over real MCP, the way an agent would. It maps the project, finds the failure, reads only the suspect function, saves a checkpoint, makes a broken edit (refused) and a wrong fix (caught by tests), rolls back, then fixes the bug.

Tests

.venv\Scripts\python -m pytest

Covers both languages, all three connection modes (CLI, MCP over stdio, MCP over HTTP with a token) and the safety rules. The Maven test is skipped when Maven isn't available.

Adding a language

Write a backend in mimir/lang/ with the same methods as PythonBackend (parse, syntax_error, is_test, check) and add it to BACKENDS in mimir/lang/__init__.py.

Roadmap

  • More languages: TypeScript, Kotlin, Go

  • Runtime x-ray: run code and report variable values at chosen lines

  • Project memory: notes the agent keeps across sessions

  • Benchmark: tokens and attempts to fix bugs with and without Mimir

  • Rust or Go rewrite, in a separate fork, for a smaller memory footprint

License

GPL-3.0-or-later. You may use, study and change Mimir, but anything you distribute that is built on it must also be released under the GPL with its source code. See LICENSE.

Available Tools

10 tools
checkA

Syntax, lint and tests. With files: only those files and the tests related to them. Without: the whole project and full test suite.

Inputs: files. Returns: result

checkpointB

Save a snapshot of the whole project. Returns its id for restore().

Inputs: label. Returns: result

diff_sinceB

Unified diff of everything that changed since a checkpoint.

Inputs: checkpoint_id (required). Returns: result

get_symbolA

Source of one function, method or class, with line numbers. name: 'func', 'Class', 'Class.method', 'path/File.java:Class.method'; add '@LINE' to pick one overload, e.g. 'Cart.add@27'.

Inputs: name (required). Returns: result

list_checkpointsB

All saved checkpoints, oldest first.

Inputs: no named parameters. Returns: result

outlineA

Signatures, doc lines and line ranges for every class/function in one file, with bodies hidden. Much cheaper than reading the file.

Inputs: file (required). Returns: result

replace_symbolA

Replace a whole function/method/class definition with new_source (include the signature line and any decorators/annotations; indentation is fixed for you). Refused if it would break syntax. Returns check results for the file and its related tests.

Inputs: name (required), new_source (required). Returns: result

repo_mapA

Compact map of the whole project: every source file with its classes (and their methods) and top-level functions. Start here.

Inputs: no named parameters. Returns: result

restoreA

Roll the project back to a checkpoint. Files added since are removed. A safety checkpoint is taken first, so a restore can itself be undone.

Inputs: checkpoint_id (required). Returns: result

who_callsA

Every call site of a function/method across the project, with the calling function and the line. Matched by name, so same-named methods on different classes are listed together.

Inputs: name (required). Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 10 tools

    Disambiguation4/5

    Each tool maps to a fairly distinct operation: repo_map indexes the project, outline shows one file's signatures, get_symbol fetches a single symbol's body, who_calls finds references, replace_symbol and check handle editing and validation, and the checkpoint/restore/diff trio manages snapshots. The only mild overlap is repo_map vs outline (both list classes/functions at different granularity) and the fact that the four snapshot tools all target the same underlying concept, but the descriptions make the boundaries clear.

    Naming Consistency4/5

    All names are snake_case, so there is a uniform lexical style. The verb patterns vary somewhat—verb_noun (get_symbol, replace_symbol, list_checkpoints, diff_since) alongside bare nouns/verbs (repo_map, outline, check, checkpoint, restore)—but every name is short, domain-idiomatic, and readable.

    Tool Count5/5

    Ten tools is a well-scoped surface for a code-intelligence/refactoring server: three for reading at different granularities, one for reference search, one for editing, one for validation, and four for snapshot lifecycle management. Nothing looks redundant or padding.

    Completeness4/5

    The read/edit/check/checkpoint lifecycle is essentially covered end-to-end, including safety checkpoints and undoable restores, which is unusually thorough. The main gaps are that replace_symbol only swaps existing definitions (no way to add a new symbol or create a file) and there is no plain text/grep-style search for non-symbol content.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers