Back to MCP marketplace
mcp/ast-grep
development-it
In Review

mcp/ast-grep

Added by docker

About

ast-grep is a fast and polyglot tool for code structural search, lint, rewriting at large scale.

Tools

  • dump_syntax_tree
    Dump code's syntax structure or dump a query's pattern structure. This is useful to discover correct syntax kind and syntax tree structure. Call it when debugging a rule. The tool requires three arguments: code, language and format. The fi
  • test_match_code_rule
    Test a code against an ast-grep YAML rule. This is useful to test a rule before using it in a project. Internally calls: ast-grep scan --inline-rules <yaml> --json --stdin
  • find_code
    Find code in a project folder that matches the given ast-grep pattern. Pattern is good for simple and single-AST node result. For more complex usage, please use YAML by `find_code_by_rule`. Internally calls: ast-grep run --pattern <patter
  • find_code_by_rule
    Find code using ast-grep's YAML rule in a project folder. YAML rule is more powerful than simple pattern and can perform complex search like find AST inside/having another AST. It is a more advanced search tool than the simple `find_code`.

Playground

Tested live

Checking your session…

Community reviews

Reports from signed-in users. These reviews describe individual experiences and are not security audits.

No published reviews yet. Share a specific setup result to help the next user evaluate this server.

Used this MCP server?

Sign in before writing so your review is never lost.