ast-grep MCP provides a bridge to the ast-grep code search tool, enabling AI assistants to find code patterns in projects using abstract syntax tree matching. The implementation exposes a single tool that accepts a pattern, project folder, and optional language parameter, then executes the ast-grep CLI command and returns the results as structured JSON. This server is particularly valuable for developers who want to leverage AI assistants for code analysis, pattern matching, and refactoring tasks without leaving their development environment.
ast-grep