MU logo

MU

Community
0ximu

MCP server that gives AI assistants deep codebase understanding. Semantic graph, BM25 search, impact analysis, code review.

Publisher0ximu
Repositorymu
LanguageRust
Forks
5
Stars
70
Available tools
0
Transport typestdio
Categories
LicenseApache-2.0
Links
  • Connect tools to AI workflows

    MU exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    70 stars and 5 forks from the linked repository.

MU parses your codebase into a semantic graph stored in DuckDB, then exposes it through 13 MCP tools. Your AI assistant can search, navigate, review, and understand your code without stuffing the entire repo into a context window.

Rust 1.70+ License: Apache 2.0

Why

LLMs choke on large codebases. Context windows are precious. 90% of code is boilerplate. You're feeding syntax when you need semantics.

MU solves this by building a semantic graph - nodes (files, classes, functions), edges (imports, calls, inheritance, DI injection, message-bus publish/consume), importance scores, summaries - and letting your AI pull exactly what it needs.

Does it actually beat grep?

We measured. 12 real questions about a 920k-line C# microservices codebase, identical agents: one arm with only grep/read, one with only MU tools. Blind grading against source-verified ground truth.

grep-only agentMU-only agent
Correct answers12/12 (one incomplete)12/12
"Top 5 riskiest methods in service X"10,421 tokens, 143s of hand-counting branches659 tokens, 38s (precomputed complexity)
"What breaks if I change X?"manual grep across 7 servicesone call: 55 direct dependents + message-bus consumers
"Map the services"trusted a stale README (missed 5 services)21/21 services from importance-ranked compress
Full-flow questions (invoice validation)found 1 of 4 country rule setsall 4 (graph fan-out)

Where grep wins - README lookups, trivially greppable strings - your agent still has grep. MU is the layer for what grep structurally can't do: blast radius through DI and message buses, measured complexity, and importance-ranked orientation. When the graph can't prove something, MU says so instead of asserting absence.

Quick Start

Grab a prebuilt binary from Releases, or build from source:

bash
git clone https://github.com/0ximu/mu.git
cd mu && cargo build --release

# Put mu on your PATH (required for the MCP config below)
cp target/release/mu ~/.local/bin/   # or /usr/local/bin

Then index your project and hook it up to Claude Code:

bash
cd /path/to/your/project
mu bootstrap

# Register the MCP server with Claude Code
claude mcp add mu -- mu mcp

Or, to share the server config with your team, create .mcp.json in the project root:

json
{
  "mcpServers": {
    "mu": {
      "command": "mu",
      "args": ["mcp"]
    }
  }
}

That's it. Your AI assistant now has full codebase understanding. (Other MCP clients work too - MU speaks MCP over stdio.)

MCP Tools

These are the tools your AI assistant can call:

ToolWhat it does
mu_grokSearch + code snippets. BM25 full-text search ranked by importance
mu_findExact symbol lookup by name
mu_expandGraph traversal - explore dependencies outward from seed nodes
mu_readBulk source code retrieval for specific nodes
mu_impactDownstream impact - what breaks if this symbol changes, transitively
mu_diffSemantic diff between git refs (branches, commits)
mu_reviewFull PR review: diff + impact + audit + risk score
mu_auditCode quality rules - complexity, hardcoded secrets, code smells
mu_susFind suspicious code - high complexity, security-sensitive, untested
mu_enrichEnrichment flywheel - LLM writes better summaries, improving future search
mu_compressImportance-ranked codebase overview within a token budget
mu_bootstrapBuild or rebuild the index without leaving the session
mu_configureAuto-detect project patterns, refine config, drive enrichment

The Enrichment Flywheel

mu_enrich is unique: it returns nodes that need better summaries, the LLM writes them, and stores them back. Each enrichment cycle improves future search results. The graph gets smarter the more you use it.

CLI Commands

The CLI is lean - bootstrap, compress, and analyze:

bash
mu bootstrap              # Build the semantic graph (run this first)
mu compress               # Compress codebase for LLM consumption
mu compress --budget 8000 # Fit an importance-ranked overview into ~8k tokens
mu compress -o context.mu # Write to file
mu status                 # Project status and stats
mu deps <node>            # Show dependencies
mu impact <node>          # Downstream impact analysis
mu diff main HEAD         # Semantic diff between git refs
mu review                 # Review uncommitted changes
mu review main..feature   # Review branch diff
mu audit                  # Code quality audit
mu doctor                 # Health checks

Compress (The Killer Feature)

Feed your entire codebase to an LLM in seconds. MU compresses your code into a hierarchical, star-ranked format that preserves semantic structure.

# 42 modules, 15 classes, 128 functions, 245 edges

## Domain Overview
### Core Entities
$ AuthService  [★★★]
  @attrs [user_repo, token_manager]
  → Database (uses), UserRepo (calls)
  ← LoginHandler, ApiMiddleware

## Hot Paths (complexity > 20 or calls > 5)
  # process_request  c=35  calls=12 ★★
    | src/handlers/api.rs

Sigil notation: ! modules, $ classes, # functions. Complexity scores, call counts, importance stars - all in minimal tokens.

What Bootstrap Builds

mu bootstrap parses your codebase and produces:

  1. Semantic graph - nodes (files, classes, functions) and edges (imports, calls, inheritance, uses)
  2. PageRank importance scores - which symbols are most connected/important
  3. Heuristic summaries - auto-generated descriptions for each node (generated after the graph is complete - summaries include caller/callee information from edges)
  4. BM25 full-text index - fast search over summaries, names, and code
  5. DuckDB database - everything stored in .mu/mubase

Bootstrap is fast: a 400k-line TypeScript project takes about 60 seconds.

Supported Languages

LanguageExtensions
Python.py
TypeScript.ts, .tsx
JavaScript.js, .jsx
Go.go
Rust.rs
Java.java
C#.cs

How It Works

Source Code → Scanner → Parser → Graph Builder → DuckDB
                │          │          │              │
            manifest    AST       nodes &      PageRank,
                       data       edges       summaries,
                                              FTS index
                                                  │
                                            MCP Server
                                                  │
                                          AI Assistant
  1. Scanner walks the filesystem, detects languages, filters noise
  2. Parser uses tree-sitter to extract AST (classes, functions, imports)
  3. Graph Builder creates nodes and edges for code relationships
  4. Post-processing computes PageRank, generates summaries, builds BM25 index
  5. MCP Server exposes 13 tools for AI assistants to query the graph

Configuration

Create .murc.toml in your project:

toml
[mu]
exclude = ["vendor/", "node_modules/", ".git/", "__pycache__/"]

Node Identifiers

PrefixTypeExample
mod:Module/Filemod:src/lib/utils.ts
cls:Classcls:src/models/User.ts:User
fn:Functionfn:src/api/auth.ts:login
ext:External dependencyext:react

Known Limitations

  • Single-writer DuckDB: Can't bootstrap while the MCP server is running. Stop the server, bootstrap, restart.
  • Test coverage detection: mu_sus finds tests by looking for test files in the scanned tree. If tests live in a sibling directory, they won't be found.
  • .NET projects: For solutions with code in src/, run mu bootstrap from the src/ directory.

Development

bash
cargo build --release
cargo test
cargo fmt && cargo clippy    # Zero warnings policy

Contributing

Contributions welcome.

bash
cargo fmt && cargo clippy && cargo test

See CONTRIBUTING.md for details.

License

Apache License 2.0 - see LICENSE.


Installation

TypingMind
{
  "mcpServers": {
    "mu": {
      "command": "mu",
      "args": [
        "mcp"
      ]
    }
  }
}

Use MU MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once MU is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add MU as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the MU MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "mu": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the MU MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the MU MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use MU to help me with this task?
MU
Sure. I read it.
Here is what I found using MU.

Frequently asked questions

What is the MU MCP server used for?

MU is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use MU MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use MU with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use MU MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With MU connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect MU MCP to TypingMind?

MU runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does MU MCP provide in TypingMind?

MU exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use MU MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If MU requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇