tilth MCP

A Rust binary for agents and the terminal that uses tree-sitter to find a symbol's definition, its calls and file dependencies

  • 357 ★ on the repository
  • Last commit
  • MIT
MCP server

Minimal access

Why this level

  • In normal mode it reads project files and uses no network
  • The --edit mode enables writing files by line hashes, so turn it on deliberately
All reasons and checks

jahala/tilth

Install

Manual install

cargo install tilth

npx tilth works too, and prebuilt binaries are on the releases page.

Access and checks

How we review

Minimal accessThe tool runs nothing and makes no network calls.

  • In normal mode it reads project files and uses no network
  • The --edit mode enables writing files by line hashes, so turn it on deliberately

This is third-party code. Review the repository files before installing.

What it does

tilth is a single Rust binary that works as a CLI and as an MCP server. It parses code with tree-sitter and answers questions that text search cannot: where a function is defined, who calls it and which files depend on it. It builds no index and needs no setup. A small file comes back whole, and a large one comes back as an outline with line ranges. The --section flag fetches the part you need, by lines or by a Markdown heading. A name search lists definitions first and usages after, and an expanded definition ends with a list of the functions it calls, with files and signatures. --callers finds call sites on the syntax tree, so comments and strings with the same name do not interfere. grok gathers everything about one symbol, from its signature to its tests, and tilth diff shows changes per function. In MCP mode a definition already shown comes back as a shown-earlier marker, so the agent does not receive the same text twice. The --edit mode adds a tilth_write tool that edits by line hashes: if the file changed after it was read, the edit is rejected. Seventeen languages are parsed, from Rust and TypeScript to Elixir and Bash.

Who it is for. For developers whose agents burn dozens of calls to find one function, and for anyone who wants a quick overview of an unfamiliar codebase in the terminal.

Good fit when

  • Before renaming an export you need to see which files use it: tilth recovery.go --deps
  • An agent in a large repository looks for who calls a function and goes wrong on matches in comments and strings
  • You need an overview of a huge file without reading it whole: an outline with lines and a targeted --section
  • After a commit you need a changelist per function: tilth diff HEAD~1
  • You run agents on smaller models that keep reaching for Bash and Grep: tilth can be made the only route

Not a fit when

  • You must tell apart two same-named functions in different modules: tilth matches calls and dependencies by name
  • You need type inference or compiler-grade go-to-definition: tilth parses syntax only
  • Your language is outside the seventeen supported: you get text search and plain file reading only
  • You need search by meaning: tilth searches by names and syntax

Example request

Use tilth to find who calls isTrustedProxy and show which files recovery.go depends on

MCP

Transport
stdio
Authentication
not required

Limitations

  • tilth parses syntax and does not infer types. Calls and dependencies are matched by name, and dynamic dispatch is not followed.
  • --map is available in the CLI only and is not offered as an MCP tool: in testing agents called it more often than it helped.
  • Search time grows with repository size: on FastAPI with 2,700 files a symbol search takes about 77 ms.
  • There are no network calls, so code stays on your machine. The author removed the earlier cost benchmark and has not published a new one.

How to disable. Remove the tilth entry from the client's config file: ~/.claude.json for Claude Code, ~/.cursor/mcp.json for Cursor. The binary is removed with cargo uninstall tilth, or npm uninstall -g tilth if you installed through npm. If you launched claude with --disallowedTools, drop that flag too.

FAQ

How do I connect tilth to Claude Code?

Install the binary with cargo install tilth or npx tilth, then run tilth install claude-code. It writes the server into ~/.claude.json. For Cursor, Codex, Windsurf, Cline, Zed and about fifteen more clients, put their name in place of claude-code.

How do I enable file editing through tilth?

Add the --edit flag: tilth install claude-code --edit. This adds the tilth_write tool, and tilth_read starts returning lines with hashes such as 42:a3f. An edit is accepted only when the hashes match the last read.

Which languages does tilth understand?

Rust, TypeScript, TSX, JavaScript, Python, Go, Java, Scala, C, C++, Ruby, PHP, C#, Swift, Kotlin, Elixir and Bash. Dockerfile and Make files are recognised but not parsed.

How is tilth different from grep and ripgrep?

Text search finds lines that contain a name. Through the parse tree tilth tells a definition from a mention, shows callers and callees and lists definitions first. It still searches file contents with the same crates ripgrep uses.

Does it need an index or a background process?

No. Each query walks the directory tree afresh, and the outline cache resets when a file's modified time changes. Search skips node_modules, target and .venv but does not skip gitignored files.

Discussion

No questions or reviews yet.

A Rust MCP server on standard threads: the agent gets hover info, go to definition, references, formatting and compiler diagnostics from rust-analyzer

MCP serverExtended access486Repository stars
Official

An MCP server and CLI for code research: search and understand your project and all of GitHub with fewer tokens

MCP serverExtended access956Repository stars
Official

A local code graph with version history: an MCP server that tells the agent who calls a function and what an edit breaks

MCP serverExtended access508Repository stars

A structural code search MCP server for agents: finds the right file by query intent and runs locally

MCP serverExtended access553Repository stars

An MCP server that turns a large codebase into a semantic feature graph for precise navigation and meaning-based search

MCP serverExtended access2KRepository stars

CodeGraph (Rust)

codegraph-rust

A Rust code graph for agents: four MCP tools show what an edit will touch, how the architecture fits together and where the fragile spots are

MCP serverExtended access908Repository stars

Comparison with similar tools

Entries that share the main search query, and how they differ.

EntryOfficialAuthenticationRepository starsMain difference
tilth (this entry)nonot required357
Serenanonot required30,849gives the agent IDE features through language servers and is heavier to set up
jCodeMunch MCPnonot required2,817indexes code with tree-sitter and serves single symbols, while tilth builds no index

README in short

The project shows the tool's real output on the FastAPI and Gin repositories and lists its own limitations. The author gives installation for more than twenty clients and closes by explaining how the tool is built.

README badge

Report a problem

Foxx AItilth
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.