Mache logo

Mache

Projects JSON, SQLite, and source code into navigable graphs exposed through MCP tools or a mounted filesystem.

Install Mache

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

Setup steps from the project

mache 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
    git clone https://github.com/agentic-research/mache.git
    
  2. 2. Install
    cd mache && task build && task install
    
  3. 3. Run
    mache init --global   # installs the keepalive HTTP daemon (:7532) + registers detected editors
    
  4. 4. Install
    docker load -i mache.tar
    
  5. 5. Start the server
    docker run --rm -i ghcr.io/agentic-research/mache:v0.22.0 --stdio /source
    

Overview

The mache MCP server projects structured sources into navigable graphs for agents and developers. It supports code intelligence such as definitions, callers, callees, references, architecture views, diagnostics, and controlled file writes, while schemas can also expose JSON or SQLite data as directory-and-file trees. The canonical deployment uses a shared HTTP daemon, with stdio available for CI, sandboxes, and headless agents. Reach for mache when structural navigation or schema-driven data exploration is more useful than searching flat files.

Use cases

  • Trace callers and callees across a source tree
  • Navigate unfamiliar repositories by definitions and references
  • Expose JSON or SQLite records as schema-defined files
  • Inspect architectural relationships and structural smells
  • Apply validated, formatted source edits

Key features

  • Projects code, JSON, and SQLite into navigable graphs
  • Provides definition, reference, caller, and callee navigation
  • Exposes architecture, diagrams, dataflow, and impact analysis
  • Supports schema-driven filesystem and MCP projections
  • Offers optional LSP type information and diagnostics
  • Validates and formats proposed file writes

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.

8/8 checks healthy over the last 32d

Adoption & maintenance

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

GitHub stars46Stargazers on the source repository.
Last commit4d agoMost recent push to the default branch.

How Mache works

What mache does

mache turns structured sources into navigable graph projections. For source code, the projection represents functions, types, references, call relationships, and other syntax-tree structure. Agents can use MCP tools to inspect a repository by path and relationship rather than matching text across files.

The same engine handles non-code data when given a declarative schema. JSON documents and SQLite databases can become virtual directory trees, with records represented as directories and selected fields represented as files. The repository includes example schemas for sources such as NVD and KEV vulnerability feeds, Notion exports, Trivy results, Terraform, Markdown, conversation logs, and audit trails.

A filesystem mount is also available alongside the MCP interface, allowing the projection to be explored as files and directories.

How it works

A source directory is parsed by the required leyline-open component. Its leyline parse command produces the _ast database consumed by mache. Pre-built databases can instead be supplied directly; databases created by mache or leyline may include LSP enrichment.

For non-code sources, a schema describes how records and fields map onto the projected tree. MCP requests then operate on that projection. For example, list_directory can enumerate a projected location and read_file can retrieve a field exposed as a file.

The normal transport is HTTP through one shared daemon on localhost:7532. Project initialization records the project being served and configures the client URL with a project token, while clients that support MCP roots can identify the project through that protocol. Stdio remains available as an alternative for automation and isolated environments.

Setup and configuration

Build and install from a checkout with:

bash
git clone https://github.com/agentic-research/mache.git
cd mache && task build && task install

Running mache init --global installs the per-user supervisor for the HTTP daemon and registers detected editors. On macOS the supervisor uses launchd; on Linux it uses a systemd user service. Run mache init inside a project to record what that project serves.

To serve schema-driven data over stdio, provide a schema and source, for example:

bash
mache serve --stdio --schema examples/mcp-registry-schema.json examples/testdata/mcp-registry.json

The source may be a directory, a pre-built .db, or a JSON or SQLite input when using a schema. mache serve and the root mount form can be used for data projections. Installation provisions the required leyline binary from a checkout, release asset, or package-manager installation.

Tools and capabilities

The code projection exposes 20 MCP tools, including:

  • get_overview, get_architecture, and get_diagram for repository orientation.
  • list_directory, read_file, find_definition, resolve_ref, and search for structural navigation.
  • find_callers, find_callees, get_impact, and get_dataflow for tracing relationships.
  • find_smells for 14 structural quality rules.
  • find_clones for identifying structurally duplicated Go functions.
  • write_file for validation, formatting, and proposed edits through leyline.
  • get_type_info and get_diagnostics when an LSP enrichment pass is available.
  • semantic_search when embeddings are configured.

The parser supports 27 of 28 listed languages; Cue is the exception because it has no grammar in this projection. Community detection is available through get_communities and is marked beta.

Limitations and notes

leyline-open is a required dependency rather than an optional parser add-on. The first query against a source tree can incur parsing time, while later graph queries can be much faster. Code intelligence is the most developed projection; some capabilities, including community detection and clone detection, are beta or depend on additional processing.

write_file validates and formats changes before proposing them. Refused writes return a reason, and drafts use NFS write-back. The HTTP daemon is intended for editor use, while stdio is positioned as an escape hatch for CI, sandboxes, and headless agents.

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 Mache

mache is an MCP server that connects agents to graph projections of source code, JSON documents, and SQLite data. Its main tools support structural navigation, definitions, callers, callees, references, architecture views, diagnostics, dataflow, impact analysis, searches, and validated file writes.

Install mache from a checkout with `task build && task install`, then run `mache init --global`. Global initialization installs the shared HTTP daemon supervisor and registers detected editors; run `mache init` inside a project to configure its served project.

Yes, mache registers with Claude Code when you run `mache init --global`. Editor use normally goes through the shared HTTP daemon on localhost:7532, while stdio is available for CI, sandboxes, and headless agents.

Provide a declarative schema and the JSON source to `mache serve`, such as `mache serve --stdio --schema examples/mcp-registry-schema.json examples/testdata/mcp-registry.json`. The schema maps records and fields to projected directories and files accessible through MCP tools.

Yes, mache can project SQLite sources through a declarative schema. It can also read a pre-built `.db` directly through its pure-Go SQLite backend, including databases produced by mache or leyline.

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 PreviewMache AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/mache?style=directory)](https://allmcps.com/mcp/mache)
HTML Embed
<a href="https://allmcps.com/mcp/mache"><img src="https://allmcps.com/api/badge/mache?style=directory" alt="Mache on AllMCPs" /></a>