Lachesis logo

Lachesis

Compiler-based code property graph for C, Python, and TypeScript/JavaScript, exposed through MCP for code navigation and data-flow analysis.

Install Lachesis

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "lachesis": {
      "command": "uvx",
      "args": [
        "lachesis-cpg"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

uvx lachesis-cpg

Process exited before answering initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

The Lachesis MCP server builds a compiler-based code property graph for C, Python, and TypeScript/JavaScript, then exposes it for agent queries. Its tools cover symbol search, callers and callees, source reading, data flow, reachability, aliases, taint analysis, and security leads. Use it when an agent needs structural code analysis across a repository rather than text-based search.

Use cases

  • Trace user-controlled input to database or other sensitive operations
  • Navigate callers, callees, symbols, and source bodies across a repository
  • Inspect data-flow paths in mixed C, Python, and TypeScript projects
  • Investigate C double-free and use-after-free paths
  • Ask an AI agent for evidence behind a suspicious code location

Key features

  • Compiler-based code property graph
  • Support for C, Python, TypeScript, and JavaScript
  • Call, alias, pointer, and data-flow queries
  • Taint analysis and security leads
  • C lifetime analysis
  • MCP, CLI, and Python library interfaces

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.

16/16 checks healthy over the last 80d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 5d ago via OSV.dev · lachesis-cpg (PyPI)

Adoption & maintenance

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

GitHub stars6Stargazers on the source repository.
Last commit1mo agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Directory activity2 viewsConfig copies, upvotes, and views on AllMCPs.

How Lachesis works

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.

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 Lachesis

Lachesis is an MCP server that connects AI agents to a compiler-based code property graph for C, Python, TypeScript, and JavaScript. Its main tools support code search, callers and callees, source reading, data-flow tracing, reachability, aliases, taint analysis, security scans, and evidence explanations.

Install it with `python -m pip install lachesis-cpg`, then configure your MCP client to run `lachesis mcp`. You can also use `uvx` to fetch the package at startup or run the documented Docker image with your project mounted.

Yes, Lachesis works with Cursor through the documented MCP installation link or a manual stdio configuration. The package can be installed locally, or Cursor can invoke `uvx` to retrieve `lachesis-cpg` when the server starts.

Lachesis analyzes C, Python, TypeScript, and JavaScript. It uses Clang for C, Python's AST and symbol-table facilities for Python, and the TypeScript compiler for TypeScript and JavaScript. Supported extensions are listed in the project documentation.

Yes, Lachesis can use `reaches`, `flow`, `sources_of`, `taint`, and `scan` to investigate input paths and sensitive effects. Its leads include evidence and confidence information, but they are intended for review rather than treated as final security conclusions.

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