Explore
Contribute
Sign In

Explore

  1. Explore
  2. /
  3. ast-grep

ast-grep

ast-grep

mcp

ast-grep is a fast and polyglot tool for code structural search, lint, rewriting at large scale.

6.0K

1 Tool

Packaged by
Requires Configuration
Add to Docker Desktop

Version 4.43 or later needs to be installed to add the server automatically

OverviewTools (1)ConfigManual installation
Docker Hub⁠Github repository⁠

You can install this MCP server using:

​

Note: You should still configure the server and specify required secrets after installing it.

See client instructions below for how to connect the MCP Toolkit gateway to each client.

https://claude.ai/download⁠

Connect the MCP Toolkit gateway to Claude Desktop using:

​

Once connected, you can install this MCP server using:

​

Note: You should still configure the server and specify required secrets after installing it.

Restart Claude Desktop for the changes to take effect.

  1. Open Claude Settings.
  2. Select the Developer tab.
  3. Select the Edit Config button.
  4. Add ast-grep to the mcpServers section:
{
  "mcpServers": {
    "ast-grep": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-v",
        "/local-directory:/local-directory",
      - mcp/ast-grep@sha256:5fc3f2e9dcf2c019e92662f608b8d89e12134ed6d91e6f5461de6efd506a1e72
      ]
    }
  }
}

https://www.continue.dev/⁠

Connect the MCP Toolkit gateway to Continue.dev using:

​

Once connected, you can install this MCP server using:

​

Note: You should still configure the server and specify required secrets after installing it.

  1. In your global .continue folder (~/.continue on Mac/Linux, %USERPROFILE%.continue on Windows), create a a folder called mcpServers.
  2. Create a new file named ast-grep.yaml in the mcpServers folder.
  3. Write the following contents to ast-grep.yaml and save.
name: Docker MCP ast-grep
version: 1.0.1
schema: v1

mcpServers:
  - name: ast-grep
    command: docker
    args:
      - run
      - --rm
      - -i
      - -v
      - /local-directory:/local-directory
      - mcp/ast-grep@sha256:5fc3f2e9dcf2c019e92662f608b8d89e12134ed6d91e6f5461de6efd506a1e72

https://www.cursor.com/downloads⁠

Connect the MCP Toolkit gateway to Cursor using:

​

Once connected, you can install this MCP server using:

​

Note: You should still configure the server and specify required secrets after installing it.

  1. Open Cursor Settings.
  2. Select the MCP Tools tab.
  3. Select the New Custom MCP button.
  4. Add ast-grep to the mcpServers section:
{
  "mcpServers": {
    "ast-grep": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-v",
        "/local-directory:/local-directory",
      - mcp/ast-grep@sha256:5fc3f2e9dcf2c019e92662f608b8d89e12134ed6d91e6f5461de6efd506a1e72
      ]
    }
  }
}

https://code.visualstudio.com/⁠

Define the MCP Toolkit gateway as a server in the MCP Visual Studio Code user settings. Learn more⁠

"mcp": {
  "servers": {
    "MCP_DOCKER": {
      "command": "docker",
      "args": [
        "mcp",
        "gateway",
        "run"
      ],
      "type": "stdio"
    }
  }
}

Once connected, you can install this MCP server using:

​

Note: You should still configure the server and specify required secrets after installing it.

https://docs.docker.com/ai/gordon/⁠

Connect the MCP Toolkit gateway to Gordon using:

​

Once connected, you can install this MCP server using:

​

Note: You should still configure the server and specify required secrets after installing it.

Manual installation

You can install the MCP server using:

​

Installation for

© 2025 Docker, Inc. All rights reserved. | Terms of Service | Subscription Service Agreement | Privacy | Legal