ast-grep MCP logo

ast-grep MCP

by ast-grep

This is an experimental MCP implementation using ast-grep CLI. It allows you to search your codebase using Cursor AI.

View on GitHub

Last updated: N/A

ast-grep MCP

This is an experimental MCP implementation using ast-grep CLI.

Prerequisite

  1. Installing ast-grep and uv
  2. Installing MCP client, preferably Cursor
  3. Clone this repo, install via uv
  4. Configure MCP json
{
    "mcpServers": {
      "server-name": {
        "command": "uv",
        "args": ["--directory", "/path/to/repo", "run", "main.py"],
        "env": {}
      }
    }
  }
  1. Ask cursor ai to search your codebase!