diffsitter
A tree-sitter based AST difftool to get meaningful semantic diffs
diffsitter is a Claude Code plugin that provides tree-sitter-based abstract syntax tree (AST) navigation and structural code analysis through an MCP server. While primarily a semantic diff tool that compares code at the AST level rather than text level, it includes an MCP server that exposes eight tools for AI assistants to understand code structure across 14+ languages. The plugin enables AI agents to jump to definitions, list symbols, inspect scopes, and run tree-sitter queries without reading entire files, giving them syntactic awareness rather than just text-based pattern matching.
Key Features
Use Cases
- 01Enable Claude Code to list all functions in a file without reading the entire contents
- 02Navigate code structure to find all methods defined in a specific class or trait
- 03Retrieve function signatures and definitions by name for context-aware code generation
- 04Find all unsafe blocks, test functions, or specific patterns using tree-sitter queries
- 05Determine the enclosing scope and parent chain at a specific line for accurate context
- 06Provide AI assistants with syntactic understanding to differentiate between function names and string literals
Related Plugins
View moreandrej-karpathy-skills
A single CLAUDE.md file to improve Claude Code behavior, derived from Andrej Karpathy's observations on LLM coding pitfalls.
claude-mem
Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Understand-Anything
Graphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
rtk
CLI proxy that reduces LLM token consumption by 60-90% on common dev commands. Single Rust binary, zero dependencies
diffsitter — FAQ
What is the diffsitter Claude Code plugin?+
diffsitter is an MCP server that exposes tree-sitter AST navigation tools to AI coding assistants like Claude Code, enabling structural code understanding across 14+ languages. It allows AI agents to navigate code syntax trees, list symbols, retrieve definitions, and run queries without reading entire files.
How do I install the diffsitter MCP server for Claude Code?+
Build the binary with `cargo build --release --features mcp-server --bin tree-sitter-mcp` or install via `cargo install diffsitter --features mcp-server --bin tree-sitter-mcp`. Then register it with Claude Code using `claude mcp add tree-sitter-mcp -- /path/to/tree-sitter-mcp`.
Which AI clients work with diffsitter?+
diffsitter works with Claude Code directly and any MCP-compatible client that can launch the server as a subprocess communicating over stdio using JSON-RPC.
What are the prerequisites for using diffsitter?+
You need Rust 1.85.1+ to build the binary, a C99+ compiler and C++14+ compiler to compile tree-sitter grammars, and Git with initialized submodules. No API keys are required.
Is diffsitter free to use?+
Yes, diffsitter is open-source software released under a permissive license and available for free on GitHub and crates.io.
What languages does diffsitter support?+
diffsitter supports 14+ languages including Bash, C#, C++, CSS, Go, Java, OCaml, PHP, Python, Ruby, Rust, TypeScript/TSX, and HCL via tree-sitter grammars compiled into the binary.
How do I install diffsitter?+
Open the source repository on GitHub and follow its README. diffsitter is a plugin — MCP Agents Market links you directly to the official repo.
Is diffsitter free?+
diffsitter is an open-source project hosted on GitHub. Check the repository for its license and any usage requirements.