</>MCP Agents Market
Plugin

diffsitter

by afnanenayet2.4kRustUpdated 2026-09-02

A tree-sitter based AST difftool to get meaningful semantic diffs

Claude Code

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

MCP server with 8 AST navigation tools (parse_file, list_symbols, get_definition, get_children_of, get_node_at_position, get_scope, navigate, query)
Supports 14+ languages including Rust, Python, Go, TypeScript, C++, Java, Ruby, and Bash via tree-sitter grammars
Tree-sitter S-expression query support for structural code search (find unsafe blocks, impl blocks, test functions, closures)
Symbol discovery without reading full files—list functions, classes, structs, traits, enums, and constants
Scope navigation with full parent chain resolution to understand code context at any position
AST traversal operations: parent, first_child, next_sibling, prev_sibling navigation
Semantic diff engine that ignores formatting differences by comparing AST structure
Configurable node filtering with include/exclude rules for fine-tuned AST inspection

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 more

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.

Related searches