What are the prerequisites to use Ast Grep?
You need ast‑grep installed (via brew, nix, or cargo), uv (Python package manager), and an MCP‑compatible client like Cursor or Claude Desktop.
@ast-grep
基本信息
暂无概览
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"ast-grep": {
"command": "uv",
"args": [
"--directory",
"/path/to/repo",
"run",
"main.py"
],
"env": {}
}
}
}工具列表暂未提供
当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。
工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。
Ast Grep is an experimental Model Context Protocol (MCP) server that gives AI assistants structural code search capabilities using ast-grep, an Abstract Syntax Tree (AST) pattern matching tool. It is designed for developers using MCP‑compatible clients like Cursor or Claude Desktop to analyze codebases by syntax structure rather than plain text.
Install ast‑grep and uv, clone the repository, run uv sync, then configure your MCP client (Cursor or Claude Desktop) to run main.py with uv. Alternatively, run directly via uvx without cloning: uvx --from git+https://github.com/ast-grep/ast-grep-mcp ast-grep-server. Optionally set a custom ast‑grep config file using --config flag or AST_GREP_CONFIG environment variable.
dump_syntax_treetest_match_code_rulefind_codefind_code_by_rulesgconfig.yaml for rule behavior and custom languagesinside, has, precedes, followsYou need ast‑grep installed (via brew, nix, or cargo), uv (Python package manager), and an MCP‑compatible client like Cursor or Claude Desktop.
Use `uvx` directly: `uvx --from git+https://github.com/ast-grep/ast-grep-mcp ast-grep-server`.
Ast Grep supports many programming languages including JavaScript/TypeScript, Python, Rust, Go, Java, C/C++, C#, and more. Custom languages can be added via `sgconfig.yaml`.
Provide a `sgconfig.yaml` file either via the `--config` command‑line argument or the `AST_GREP_CONFIG` environment variable.
Make sure ast‑grep is installed and in your PATH. For relational rules, try adding `stopBy: end`. Use `dump_syntax_tree` to understand the AST structure of your target code.

Request dedicated senior developers to work on your project, write job descriptions, and prep technical interviews — all without leaving your Claude chat. Just describe what you need, and Lemon.io MCP does the rest. 1–3

Soar Flight Booking MCP is a remote MCP server available at https://mcp.soar.flights.
Hindsight: Agent Memory That Learns

Model Context Protocol Servers
A search tool helps dev to solve the naming things problem.
评论