
nendotools/tree-sitter-mcp
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
このリポジトリは、ツリー・シッターによって生成されたコード構造データを、より詳細な情報コード分析と改善のためにAIシステムによって摂取されることを明らかにします.
概要
一般的なプログラミング言語の検索と解析を高速化。 機能とクラスを検索し、コードの使い方を追跡し、プロジェクト全体でコードの品質を分析します。 ClaudeコードのようなAIツール用のスタンドアローンCLIツールとMCPサーバーとして動作します。 - - 15以上の言語に名前を付けて、関数、クラス、変数を検索 - - 変更を行う前にコードが使用される場所を参照してください - - - 複雑な関数、デッドコード、およびアーキテクチャの問題を検出 - コード構造を解析し、テキストをスキャンしないでサブ-100ms検索 - 任意のプロジェクトですぐに動作します JavaScript、TypeScript、Python、Go、Rust、Java、C/C++、Ruby、C#、PHP、Kotlin、Scala、Eixir MCP サーバーとして使用される場合、AI アシスタントのツールを提供します。 - search code - 関数、クラス、変数を名前で検索 - find usage - プロジェクト全体で識別子のすべての使用 - analytics code - 包括的なコードの品質と構造解析 - check errors - 詳細なコンテキストで実用的な構文エラーを見つける お問い合わせ.
概要(AI 翻訳)
一般的なプログラミング言語の検索と解析を高速化。 機能とクラスを検索し、コードの使い方を追跡し、プロジェクト全体でコードの品質を分析します。
ClaudeコードのようなAIツール用のスタンドアローンCLIツールとMCPサーバーとして動作します。
はじめる
インストール:
コードの検索:
分析コードの品質:
構文エラーの修正:
Claudeデスクトップの設定:
[~/.config/claude-desktop/claude_desktop_config.jsonに追加することで手動で設定するか:
##特徴
-Semantic search - 15以上の言語に名前を付けて関数、クラス、変数を検索する -Usage tracing - 変更を行う前にコードが使用される場所を参照してください
- 品質分析 - 複雑な機能、デッドコード、建築問題の検出
- 高速な結果 - テキストをスキャンしないコード構造を解析してサブ-100ms検索
- 構成無し - 任意のプロジェクトですぐに動作します
対応言語
JavaScript、TypeScript、Python、Go、Rust、Java、C/C++、Ruby、C#、PHP、Kotlin、Scala、Eixir
ファイルの構成: JSON、YAML、TOML、.env
##CLIの使用法
コード要素の検索:
識別子の使用:
分析コードの品質:
構文エラーの修正:
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
Tree-Sitter MCP
Fast semantic code search and analysis for common programming languages. Search for functions and classes, trace code usage, and analyze code quality across your entire project.
Works as both a standalone CLI tool and an MCP server for AI tools like Claude Code.
Getting Started
Install:
npm install -g @nendo/tree-sitter-mcp
Search for code:
tree-sitter-mcp search "handleRequest" --type function
Analyze code quality:
tree-sitter-mcp analyze --analysis-types quality deadcode structure
Find syntax errors:
tree-sitter-mcp errors --output text
Setup with Claude Desktop:
tree-sitter-mcp setup --auto
Or configure manually by adding to ~/.config/claude-desktop/claude_desktop_config.json:
{
"mcpServers": {
"tree-sitter-mcp": {
"command": "npx",
"args": ["@nendo/tree-sitter-mcp", "--mcp"],
"cwd": "/path/to/your/project"
}
}
}
Features
- Semantic search - Find functions, classes, and variables by name across 15+ languages
- Usage tracing - See where code is used before making changes
- Quality analysis - Detect complex functions, dead code, and architectural issues
- Fast results - Sub-100ms searches by parsing code structure, not scanning text
- No configuration - Works immediately on any project
Supported Languages
JavaScript, TypeScript, Python, Go, Rust, Java, C/C++, Ruby, C#, PHP, Kotlin, Scala, Elixir
Config files: JSON, YAML, TOML, .env
CLI Usage
Search for code elements:
tree-sitter-mcp search "DatabaseManager" --exact
tree-sitter-mcp search "handle.*Request" --type function method
Find usage of identifiers:
tree-sitter-mcp find-usage "UserService" --exact
tree-sitter-mcp find-usage "API_KEY" --case-sensitive
Analyze code quality:
tree-sitter-mcp analyze --analysis-types quality structure deadcode
tree-sitter-mcp analyze src/components --analysis-types quality
Find syntax errors:
tree-sitter-mcp errors --output text
tree-sitter-mcp errors src/components --max-results 10
Setup MCP integration:
tree-sitter-mcp setup --auto
tree-sitter-mcp setup # Manual setup instructions
MCP Tools
When used as an MCP server, provides these tools for AI assistants:
search_code- Search for functions, classes, variables by name
インストール
npx @nendo/tree-sitter-mcp --mcp設定
{
"mcpServers": {
"tree-sitter-mcp": {
"command": "npx",
"args": ["@nendo/tree-sitter-mcp", "--mcp"],
"cwd": "/path/to/your/project"
}
}
}