ast-grep-mcp

ast-grep-mcp

17

This project is an experimental implementation of the Model Context Protocol (MCP) using ast-grep to enhance codebase search capabilities. It integrates with Cursor AI for efficient searching.

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!