ast-grep MCP
JSON →An experimental MCP server that uses the ast-grep CLI for code structural search, linting, and rewriting.
Install
uvx --from Tools · 4
- dump_syntax_tree Visualize the Abstract Syntax Tree structure of code snippets. Essential for understanding how to write effective search patterns.
- test_match_code_rule Test ast-grep YAML rules against code snippets before applying them to larger codebases.
- find_code Search codebases using simple ast-grep patterns for straightforward structural matches.
- find_code_by_rule Advanced codebase search using complex YAML rules that can express sophisticated matching criteria.
Links
★ 413 GitHub stars