# mache [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/agentic-research/mache  
**GitHub Stars:** 46  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/mache

## Description
IDE-style navigation for structured data — code, JSON, YAML. Jump to definitions, find callers, follow references. Available as an MCP server or a mounted folder.

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/agentic-research/mache), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
git clone https://github.com/agentic-research/mache.git
```

2. Install:

```sh
cd mache && task build && task install
```

3. Run:

```sh
mache init --global   # installs the keepalive HTTP daemon (:7532) + registers detected editors
```

4. Install:

```sh
docker load -i mache.tar
```

5. Start the server:

```sh
docker run --rm -i ghcr.io/agentic-research/mache:v0.22.0 --stdio /source
```

## Documentation

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

_Full upstream README: https://allmcps.com/mcp/mache/readme_

