# Lachesis [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/UnboundCompute/lachesis  
**GitHub Stars:** 6  
**Views:** 2  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/lachesis

## Description
Compiler-precise code property graph for C, Python, and TypeScript, navigable over MCP.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "lachesis": {
    "command": "uvx",
    "args": ["lachesis-cpg"]
  }
}
```

## Documentation

## What Lachesis MCP server does

The Lachesis MCP server turns a codebase into a navigable property graph containing symbols, calls, and relationships. It supports TypeScript and JavaScript through the TypeScript compiler, Python through its AST and symbol-table facilities, and C through Clang. Mixed-language repositories are represented in one map, allowing the same analysis tools to inspect code across supported languages.

The graph supports both code navigation and security-oriented analysis. Agents can locate symbols, inspect callers and callees, read source bodies, trace values, check whether an input can reach a destination, and inspect pointer relationships. Security queries include taint analysis and scans for entrypoints that reach sensitive effects without a recognized check. C projects also have a lifetime analysis for double-free and use-after-free paths.

Results include confidence information. Some relationships are exact, while others are inferred conservatively or by a language-specific approximation, so findings should be treated as evidence to investigate rather than definitive verdicts.

## How it works

The Lachesis MCP server uses a three-stage analysis model. The build stage reads source code and creates the graph. Enrichment computes data-flow relationships when needed and caches the resulting work. Analysis scans the graph for leads, scores them, and matches them to known bug patterns within a time limit.

The map is stored in a `graph.kuzu` directory containing an embedded database and an index file. MCP tools read this map directly. The server can receive an existing graph path, or it can start without one and build a map when an agent points it at a repository.

A first scan can take longer because the project must be compiled or parsed. Subsequent runs use the cache under `~/.lachesis/cache`. A Git repository URL can also be scanned; Lachesis downloads it to a temporary directory and removes the temporary files afterward.

## Setup and configuration

Install the package with `python -m pip install lachesis-cpg`, then start the Lachesis MCP server with `lachesis mcp`. For a standard MCP client, the command can be configured with `lachesis` as the executable and `mcp` as its argument. `uvx` can fetch the package at startup instead of requiring a local installation.

Docker is another option. The documented image includes the language tooling and mounts the target project into `/src`. Cursor and VS Code have installation links in the project documentation, and the README also provides setup guidance for Claude. Python 3.10 through 3.12 is supported. TypeScript and JavaScript analysis requires `node` on the PATH; Python analysis has no additional dependency listed.

## Tools and capabilities

Available operations include:

- `hubs`, `search`, `open_file`, and `open_folder` for code orientation and source lookup.
- `callers` and `callees` for navigating call relationships.
- `flow` and `sources_of` for following values and identifying their inputs.
- `reaches` for checking whether one location can reach another.
- `points_to` and `aliases` for pointer and alias relationships.
- `taint` and `scan` for input-flow and security-lead analysis.
- `explain` for collecting the evidence behind a location in one response.

## Limitations and notes

Python does not have a type checker in this analysis, so attribute calls are matched by name. C is read one file at a time and may not follow a call through a function-pointer table that is outside the visible file. The analysis can also report uncertainty, which should be considered when reviewing paths and leads. Large projects may require attention to memory, speed, and the analysis time limit.

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

