sciver

MCPOfficialast-grep

ast-grep MCP

Searches code by its syntax structure (AST) and helps write ast-grep rules.

The ast-grep team’s server lets the agent search code for patterns based on the syntax tree instead of plain text, dump the AST of a snippet and test YAML rules on sample code before applying them to the whole project. It helps with refactoring and hunting for anti-patterns; it requires ast-grep and uv to be installed.

Installation

Manual install

$uvx --from git+https://github.com/ast-grep/ast-grep-mcp ast-grep-server

Details

Works in
Cursor, Claude
Transport
local
License
MIT
Tasks
Code
Rating
Source
github.com/ast-grep/ast-grep-mcp (opens in a new tab)

Tags

  • ast-grep
  • ast
  • code search
  • refactoring
  • rules

Log in to rate

A pack is your own set of skills and MCP servers. sciver loads it in your AI with one command.

View in the library