ast-grep is a fast and polyglot tool for code structural search, lint, rewriting at large scale.
6.0K
1 Tool
Version 4.43 or later needs to be installed to add the server automatically
About
ast-grep is a fast and polyglot tool for code structural search, lint, rewriting at large scale.
| Attribute | Details |
|---|---|
| Docker Image | mcp/ast-grep |
| Author | dgageot |
| Repository | https://github.com/dgageot/mcp-ast-grep |
| Dockerfile | https://github.com/dgageot/mcp-ast-grep/blob/main/Dockerfile |
| Docker Image built by | Docker Inc. |
| 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 |
| Tools provided by this Server | Short Description |
|---|---|
ast-grep | Search codebases using ast-grep patterns |
ast-grepSearch 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 | stringoptional | The directory to search in. If not specified, will use the current working directory. |
lang | stringoptional | 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.
{
"mcpServers": {
"ast-grep": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-v",
"/local-directory:/local-directory",
"mcp/ast-grep"
]
}
}
}
Manual installation
You can install the MCP server using:
Installation for