LabStore
← All labs

ast-grep

by docker ✓ verified ✓ Packaged by Docker

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

MCP server installable network: off runtime: sysbox

Development MCP Servers

ast-grep MCP Server

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

What is an MCP Server?

MCP Info

Attribute Details
Docker Image mcp/ast-grep
Author dgageot
Repository https://github.com/dgageot/mcp-ast-grep

Image Building Info

Attribute Details
Dockerfile https://github.com/dgageot/mcp-ast-grep/blob/c0a1edaf9cd6b168f2b59bc5a0161ad49a793099/Dockerfile
Commit c0a1edaf9cd6b168f2b59bc5a0161ad49a793099
Docker Image built by Docker Inc.
Docker Scout Health Score Docker Scout Health Score
Verify Signature COSIGN_REPOSITORY=mcp/signatures cosign verify mcp/ast-grep --key https://raw.githubusercontent.com/docker/keyring/refs/heads/main/public/mcp/latest.pub
Licence Apache License 2.0

Available Tools (1)

Tools provided by this Server Short Description
ast-grep Search codebases using ast-grep patterns

Tools Details

Tool: ast-grep

Search codebases using ast-grep patterns for straightforward structural matches. (returns json)

Parameters Type Description
pattern string The ast-grep pattern to search for. Note, the pattern must have valid AST structure.
dir string optional The directory to search in. If not specified, will use the current working directory.
lang string optional The language of the code. If not specified, will be auto-detected based on file extensions.

This tool is read-only. It does not modify its environment.

This tool may perform destructive updates.

This tool interacts with external entities.


Use this MCP Server

{
  "mcpServers": {
    "ast-grep": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-v",
        "/local-directory:/local-directory",
        "mcp/ast-grep"
      ]
    }
  }
}

Why is it safer to run MCP Servers with Docker?