pickfit

BrowseMCP servers

ast-grep MCP Server

MCP server that lets AI assistants search and analyze codebases with ast-grep structural AST pattern matching.

Tested on Linux

Use it

Linux x86_64

You need first

  • Runtimes: uv
  • System packages: ast-grep
  1. uv tool install the MCP server from git, plus ast-grep-cli for the ast-grep binary

    uv tool install git+https://github.com/ast-grep/ast-grep-mcp && uv tool install ast-grep-cli

Check that it works

ast-grep --version

The output should contain “ast-grep 0.51.2”.

Add it to your agent

claude mcp add ast-grep-mcp -- ast-grep-server
JSON for Claude Desktop, Cursor and other clients
{
  "mcpServers": {
    "ast-grep-mcp": {
      "command": "ast-grep-server",
      "args": []
    }
  }
}

Add ast-grep-server as a server command in your MCP client, then ask your assistant to use its tools such as find_code.

What it does

  • Search code by its syntax structure
    How to use it
    1. Ask your assistant to call the find_code tool with your project folder, a pattern such as console.log($$$), and the language.
    2. Read the list of matching code locations it returns.
    Tested
  • Write and test YAML search rules
    How to use it
    1. Write a YAML rule with an id, language, and rule: pattern: <your pattern>.
    2. Ask your assistant to call the test_match_code_rule tool with the rule and a sample of <your code>.
    3. Check the returned matches to confirm the rule works.
    Tested
  • View the syntax tree of a code snippet
    How to use it
    1. Ask your assistant to call the dump_syntax_tree tool with <your code> and its language.
    2. Read the printed tree to see how the code is structured, for example to fix a pattern that does not match.
    Tested

How far pickfit got

Linux x86_64

  1. Installs
  2. Connects
  3. 3 of 3 features work
  4. Works offline

Good for

  • find all console.log statements in a JavaScript codebase
  • find async functions that use await
  • debug why an ast-grep pattern isn't matching

How pickfit tested it

Each run starts from a clean machine and follows the steps above. How pickfit verifies

Linux x86_64

An MCP client called one of its tools

  • Replayed from scratch
  • Works offline
  • Checked on 15 Nov 2026

An MCP client handshake over stdio listed 4 tools, and a call to find_code returned a result.

Differences the test machine hit

  • README: Install ast-grep via brew, nix-shell or cargo
    In the test: `uv tool install ast-grep-cli` (published PyPI package) put ast-grep on PATH without root or a Rust toolchain
  • README: uv sync in a clone / uvx --from git+... ast-grep-server
    In the test: `uv tool install git+https://github.com/ast-grep/ast-grep-mcp` installs the ast-grep-server command on PATH so the server can start with the network off
  • README: Complex rule example (async-with-await) for test_match_code_rule
    In the test: Run against `async function load() { const x = await fetch(1); }`, the README's async-with-await rule made test_match_code_rule return an error (the probe showed no message), possibly because the rule matched nothing. The README's simpler console.log rule worked.

How to read a tool card

Stitching
pickfit installed this tool itself. Everything under the stitches comes from that run. A tool pickfit has not run never gets stitches.
Verified on your OS
The install steps ran on the system you chose. “Ran on Linux only” means it has not been run on yours yet.
macOS, Linux and WindowsWhere it ran
Green OS marks: pickfit ran the install steps there. Grey ones: the README says it runs there, and pickfit has not tried.
How far the run got
Installs and starts, its main function works, its service answers, it produces model output. A window means a desktop app opened; a plug, an MCP client used it. The mark sits beside the run’s result, under “Why it fits and how we know” and in “How pickfit tested it”.
Visual check
pickfit looked at screenshots of the app. Green: it looks right. Amber with a number: things that look wrong; open it to see them. Grey and dashed: not checked yet.
Known vulnerabilities
Known high or critical vulnerabilities (OSV.dev) in what it installs. Green: none known. Red with a number: how many; open it for the list, and read it before you install. Grey and dashed: not checked, which does not mean safe.
About the run
The day it ran, and the version that ran.
Source of a reason
Every reason a pick fits rests on one profile field. Open the reason to see the field and the value it relies on.
Hidden gem
High quality, little known.
Quality and popularity
Two scores out of 100. Quality: how well it installed and worked when pickfit tried it, and how good its install docs and upkeep are. Popularity: from stars, downloads and Hacker News.
Features checked
Of the main features the README advertises, how many the run actually exercised (green), and how many failed (red). Grey ones were not checked, and the card says why.
Not verified
A well-known tool Fitz mentions from general knowledge. No run record, no steps, no score.