About Mache
Mache is an MCP server published by agentic-research in the RAG category: 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. Conduid read 20 tools from its source: find_callees, find_callers, find_clones, find_definition, find_smells, get_architecture and 14 more. No package is published for it, so it installs from a source checkout.
The repository has 46 stars and 2 forks, and its last commit was on 1 Dec 2026. Conduid has no tagged release on record for it. Its topics include agentic-research, art-ecosystem, capnproto, cobra, code-intelligence and fuse-filesystem.
Install
git clone https://github.com/agentic-research/macheTools (20)
find_calleesFind what a function/method calls. Use for 'what does X invoke?', 'dependencies of X'. Note: generic names (String, New, Error) may have false positives — prefer qualified calls.| Parameter | Type | Description |
|---|---|---|
| path * | string | Construct directory path (e.g. 'go/graph/methods/GetCallees') |
find_callersFind all constructs that reference a symbol. Use for 'who calls X?', 'where is X used?', 'find usages of X'. More accurate than grep for symbol lookup.| Parameter | Type | Description |
|---|---|---|
| kind | string | Optional construct-kind filter applied to the CALLERS (e.g. kind=method narrows to method-callers only). Accepted values: function, method, type, constant, variable, import. Omit to return all kinds. |
| token * | string | Symbol or token name (e.g. 'GetCallers', 'ParseVuln') |
find_clonesFind duplicated logic: sets of functions that are structural copies of each other (same shape, possibly different names and constants), ranked by how much code one shared helper would remove. Use for 'what is duplicated?', 'what should be a helper?', 'is there already a copy of this function?'. Each set lists every copy with file, line and a snippet, and what DIFFERS between the copies: `identical_modulo_renames` is true when one helper can replace them as they stand; otherwise `differences` lists each constant, operator, or called function / field / type that is not the same in every copy, which a shared helper must take as a parameter. Read the differences before merging copies. Go only. Exact-structure clones of whole functions only: near-miss copies and repeated blocks inside otherwise different functions are not detected (the response says so). Requires a leyline-parsed .db (the _ast table).| Parameter | Type | Description |
|---|---|---|
| include_tests | boolean | Also report sets with fewer than two copies outside test files (default false). |
| limit | number | Max sets (default 50). |
| min_nodes | number | Smallest duplicated structure to report, in syntax nodes (default 24, which skips one-line accessors). 0 reports everything. |
| source_id | string | Only sets with a copy in this source file (e.g. 'internal/ingest/engine_walk.go'). The set still lists its copies elsewhere. |
find_definitionFind where a symbol is declared. Use for 'where is X defined?', 'where does X come from?'. Default match is anchored: case-sensitive exact, then case-insensitive exact. Set fuzzy=true to also fall back to substring suggestions when no anchored match exists (recommended only for short queries in unfamiliar codebases — fuzzy is noisy in monorepos).| Parameter | Type | Description |
|---|---|---|
| fuzzy | boolean | Fall back to substring matching when no anchored match is found (default false). Symbols shorter than 4 characters are never fuzzy-matched. |
| kind | string | Optional construct-kind filter to disambiguate when the same name appears in multiple kinds. Accepted values: function, method, type, constant, variable, import. Omit to return all kinds. |
| symbol * | string | Symbol name to find definition for (e.g. 'GetCallers' or 'auth.Validate') |
find_smellsRun structural code-smell rules against the parsed _ast table. Call with no arguments for the registry listing; call with `rule` to scan. Rules look for patterns like 'magic int literal in a binary expression' (Go) — useful for sweeping a monorepo before adding named constants. Each finding includes line/column and a short snippet so editors can jump to it. Requires a leyline-parsed .db (the _ast table).| Parameter | Type | Description |
|---|---|---|
| limit | number | Max findings (default 200). |
| rule | string | Rule ID to run. Omit to list available rules. |
| source_id | string | Limit the scan to one parsed source file (matches _source.id, e.g. 'main.go'). |
get_architectureStructured architectural analysis of the codebase. Returns entry points (high fan-in), key abstractions (most defs), dependency layers (community-based), test files, API surface (exported symbols), file count, and language breakdown. Use after get_overview for deeper orientation.get_communitiesFind clusters of related code using Louvain modularity detection. Use for 'what code works together?', 'find subsystems'. Requires dense cross-references. Hub tokens (referenced by more than max_fan_in nodes — `err`, `t`, `len`) are pruned before projection and reported: they cost K(K-1)/2 edges each and join everything to everything, which both dominates runtime and collapses real clusters into one blob. Use summary=true plus limit for large codebases.| Parameter | Type | Description |
|---|---|---|
| granularity | string | Cell size: 'construct' (AST nodes, default), 'file', or 'dir'. File/dir cells answer 'which files/packages belong together' — the decomposition question — by aggregating along the fs hierarchy already encoded in every node id. |
| limit | number | Maximum communities returned, largest first (default 50, 0 for all). Detection routinely finds thousands; returning them all overruns the response budget. |
| max_fan_in | number | Prune tokens referenced by more than this many nodes before projecting (default 100, 0 disables). Measured on a 50k-line Go repo: 100 keeps 98.5% of tokens, removes 99.2% of edge work, and raises modularity from 0.543 to 0.985. |
| min_size | number | Minimum community size (default 2) |
| scope | string | Path prefix filter, e.g. 'cmd/'. Only nodes under this prefix participate. |
| summary | boolean | Return summary only (ID, size, top 5 members per community) instead of full member lists. Recommended for large codebases. |
get_dataflowBounded interprocedural reference flow for a symbol through the existing node_refs caller/callee projection. Every edge is labeled node_ref; this is not LSP-confirmed binding, SSA, taint, or data-dependence analysis.| Parameter | Type | Description |
|---|---|---|
| depth | number | Max traversal depth from 1 to 5 (default 2) |
| direction | string | Traversal direction: 'callers', 'callees', or 'both' (default 'both') |
| kind | string | Optional construct-kind filter applied to the starting symbol roots. Accepted values: function, method, type, constant, variable, import. |
| symbol * | string | Function or symbol name to resolve through node_defs |
get_diagnosticsGet diagnostics (errors, warnings) for symbols and files. Returns what leyline's parse recorded (symbol_kind "parse" for a file that parsed with errors, "unprojected" for one it could not project), then the language server's diagnostics. If LSP data is missing and 'file' is provided, auto-enriches via ley-line daemon.| Parameter | Type | Description |
|---|---|---|
| file | string | Source file path — triggers automatic LSP enrichment if _lsp table is missing |
| kind | string | Optional construct-kind filter applied to result NodeIDs. Accepted values: function, method, type, constant, variable, import. Omit to return all kinds. |
| limit | number | Max results (default 50) |
| symbol | string | Symbol name to filter by (optional, returns all if empty) |
get_diagramRender a mermaid diagram of the projected system's structure. Uses community detection to group related code, then renders the quotient graph (classes + cross-class edges) as mermaid syntax. Edge labels show the most significant boundary tokens (above-mean weight).| Parameter | Type | Description |
|---|---|---|
| compact | boolean | Compact mode: render classes as labeled nodes with member count instead of subgraphs with full member listings. Better for large codebases. |
| exclude_tests | boolean | Exclude test files (*_test.go, Test*, Benchmark*) from community detection. Produces cleaner domain-focused labels. |
| layout | string | Layout direction: TD (top-down), LR (left-right), BT (bottom-top), RL (right-left). Default: TD |
| name | string | Diagram name from schema (default: full system view) |
get_impactChange impact analysis: given a symbol, trace through the refs graph to show affected callers and/or callees (multi-hop BFS traversal). Use for 'what would be affected if I change X?', 'blast radius of modifying Y'.| Parameter | Type | Description |
|---|---|---|
| depth | number | Max traversal depth (default 2) |
| direction | string | Traversal direction: 'callers' (who calls this), 'callees' (what this calls), 'both' (default 'both') |
| kind | string | Optional construct-kind filter applied to the STARTING symbol's root (e.g. kind=function picks the function-Encoder as the BFS root when both a type and function are named Encoder). Traversal at depth>0 follows callers/callees regardless of their kind. Accepted values: function, method, type, constant, variable, import. Omit to use all matching roots. |
| symbol * | string | Symbol name to analyze (e.g. 'GetCallers', 'auth.Validate') |
get_overviewSTART HERE when exploring a codebase. Returns top-level structure, node counts, cross-reference stats, and a usage guide for all tools.get_sheaf_statusReturns the ley-line daemon's sheaf cache state (generation counter, valid/total entries, defect score) AND the local subscriber state (whether mache is receiving sheaf.invalidate events, last event seen, last generation observed). Use to decide whether cached find_callers / find_definition / get_architecture results are still fresh after an edit. Returns {available: false, reason: ...} when the daemon is not reachable rather than erroring — safe to call periodically.get_type_infoGet type signature and documentation for a symbol from LSP hover data. Returns the language server's type information (e.g. function signatures, struct definitions). If LSP data is missing and 'file' is provided, auto-enriches via ley-line daemon.| Parameter | Type | Description |
|---|---|---|
| file | string | Source file path — triggers automatic LSP enrichment if _lsp_hover table is missing |
| kind | string | Optional construct-kind filter to disambiguate when the same name appears in multiple kinds. Accepted values: function, method, type, constant, variable, import. Omit to return all kinds. |
| symbol * | string | Symbol name to look up (e.g. 'NewEncoder', 'Model') |
list_directoryBrowse the projected tree. Use instead of ls/find for 'what's in directory X?', 'list packages under Y'. Use empty path for root.| Parameter | Type | Description |
|---|---|---|
| exclude_tests | boolean | Exclude Test* and Benchmark* entries (default false). Recommended for large packages. |
| path | string | Directory path (empty for root) |
read_fileRead the text content of one or more file nodes. Pass a single path or a JSON array of paths for batch reads.| Parameter | Type | Description |
|---|---|---|
| mode | string | Projection: 'full' (default, whole content), 'signatures' (declaration line of every construct under a directory node — ~18x smaller than reading the file and needs no line offsets, best for orienting in unfamiliar code), or 'map' (names only). |
| path | string | Single file node path |
| paths | string | JSON array of file node paths for batch read, e.g. ["path/a", "path/b"] |
resolve_refResolve a typed cross-language ref token (scheme:locator) to its target. Part of the cross-language ref graph (mache-q43l, ADR-0016). Supports `mod:` (local-relative paths, ./X or ../Y, resolved against base_path — e.g. following a Terraform `module { source = ... }` reference) and `gomod:` (a Go import path, resolved via `go list` against the served project's own go.mod — e.g. `gomod:golang.org/x/sync/singleflight`). Other schemes return a `remote_hint` so the caller knows resolution was skipped. A successful resolution returns `graph_path`: pass it to list_directory/find_definition/find_callers/read_file to query the resolved code directly, no separate clone or ingest step needed.| Parameter | Type | Description |
|---|---|---|
| base_path | string | File or directory the locator is interpreted relative to. Required for `mod:` locators; unused for `gomod:`. |
| token * | string | Typed ref token in `scheme:locator` form (e.g. `mod:./modules/vpc` or `gomod:golang.org/x/sync/singleflight`). |
searchSearch for symbols by name pattern. Use instead of grep -r for 'find functions named X', 'find all X*', 'search for *auth*'. SQL LIKE wildcards: % = any chars. role=definition finds declarations.| Parameter | Type | Description |
|---|---|---|
| limit | number | Max results (default 100) |
| pattern * | string | Search pattern, e.g. 'Login%' or '%auth%' |
| role | string | Filter by role: 'definition' (where symbol is declared), 'reference' (where symbol is used). Default: returns references. |
| type | string | Filter by construct type in path, e.g. 'functions', 'methods', 'types', 'structs' |
semantic_searchFind code by meaning using embedding similarity. Use for 'find code that does X', 'functions related to authentication', 'error handling patterns'. More flexible than pattern search — finds conceptually similar code even without exact name matches. Requires ley-line daemon with --embed flag.| Parameter | Type | Description |
|---|---|---|
| k | number | Max results (default 10) |
| query * | string | Natural language description of what you're looking for |
write_fileWrite new content to a source file node. Pipeline: validate (tree-sitter, always) → format (gofumpt/hclwrite, opt-out via format=false) → atomic splice into source file → update graph. The node must have a source origin. Set format=false when the caller (LLM, pre-commit) already owns formatting and wants mache to splice verbatim.| Parameter | Type | Description |
|---|---|---|
| content * | string | New content to write |
| format | boolean | Run the language formatter (gofumpt for Go, hclwrite for HCL) before splicing. Default true. Set false when formatting is owned upstream — validation still runs. |
| path * | string | File node path (e.g. 'go/graph/methods/MemoryStore.GetCallees/source') |
Security checks
6 checks have not been run yet.