ast-grep是一款快速且多语言的工具,用于大规模代码结构搜索、代码检查和重写。
什么是MCP服务器?
| 属性 | 详情 |
|---|---|
| Docker镜像 | https://hub.docker.com/repository/docker/mcp/ast-grep |
| 作者 | https://github.com/dgageot |
| 仓库 | https://github.com/dgageot/mcp-ast-grep |
| 属性 | 详情 |
|---|---|
| Dockerfile | https://github.com/dgageot/mcp-ast-grep/blob/main/Dockerfile |
| Docker镜像构建者 | Docker Inc. |
| Docker Scout健康评分 | !Docker Scout健康评分 |
| 验证签名 | COSIGN_REPOSITORY=mcp/signatures cosign verify mcp/ast-grep --key https://raw.githubusercontent.com/docker/keyring/refs/heads/main/public/mcp/latest.pub |
| 许可证 | Apache许可证2.0 |
| 本服务器提供的工具 | 简短描述 |
|---|---|
ast-grep | 使用ast-grep模式搜索代码库 |
工具:ast-grep
使用ast-grep模式搜索代码库以实现直接的结构匹配。(返回json格式)
| 参数 | 类型 | 描述 |
|---|---|---|
pattern | string | 要搜索的ast-grep模式。注意,该模式必须具有有效的AST结构。 |
dir | string 可选 | 要搜索的目录。如果未指定,将使用当前工作目录。 |
lang | string 可选 | 代码的语言。如果未指定,将根据文件扩展名自动检测。 |
此工具为只读模式,不会修改其环境。
此工具可能执行破坏性更新。
此工具与外部实体交互。
json{ "mcpServers": { "ast-grep": { "command": "docker", "args": [ "run", "-i", "--rm", "-v", "/local-directory:/local-directory", "mcp/ast-grep" ] } } }
为什么使用Docker运行MCP服务器更安全?
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。




探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
无需登录使用专属域名
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
Harbor Proxy Repository 对接专属域名
Portainer Registries 加速拉取
Nexus3 Docker Proxy 内网缓存
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
docker search 限制
站内搜不到镜像
离线 save/load
插件要用 plugin install
WSL 拉取慢
安全与 digest
新手拉取配置
镜像合规机制
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
域名连通性排查
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务