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.
Painless E2E Automation for Mobile and Web
YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

Handl speaks the Model Context Protocol. Your whole billing operation — projects, invoices, clients, reports, approvals — as tools any AI assistant can call, inside your autonomy rules.

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

Yuppsy MCP: build and publish real estate websites from your AI assistant. Yuppsy lets your AI assistant create live websites for real estate agents and individual property listings. You don't need a designer or any code
コメント