MCP Source Tree Server

by owayo

Not rated
GitHub

About

Generates a JSON representation of a directory's source file tree, respecting .gitignore patterns.

Details

Author
owayo
Categories
File Management, Other, Developer Tools

Setup

Install MCP Source Tree Server in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/owayo/mcp-src-tree

Follow the installation instructions in the repository README, then restart your MCP client.

指定されたディレクトリ配下のファイルツリーを生成するMCPサーバーです。.で始まるディレクトリや.gitignoreに記載された条件に従って、特定のファイルやディレクトリを除外します。 Claudeに組み込むことで、Claudeがプロジェクトの構造を素早く確認でき、Claudeが編集すべきファイルを特定するのに役立ちます。

- 指定されたディレクトリ配下のファイルツリーをJSON形式で取得
- .gitignoreの条件に従ってファイル/ディレクトリを除外
- ディレクトリ構造を階層的なJSONで表現

# uvのインストール $ curl -LsSf https://astral.sh/uv/install.sh | sh $ cd /path/to/mcp-src-tree # ライブラリのインストール $ uv sync

claude_desktop_config.jsonに以下の設定を追加してください:

{ "mcpServers": { "src-tree": { "command": "uv", "args": [ "--directory", "/path/to/mcp-src-tree", # このプロジェクトディレクトリの絶対パスに書き換えてください "run", "tree.py" ] } } }

指示するのはsrcの一つ上のルートディレクトリを指定してください。.gitignoreを考慮する場合、ルートディレクトリ直下に.gitignoreが存在することが前提です。/Users/xxx/GitHub/xxx/ のソースツリーを確認してくださいのように指示すると動作します

はい、ソースツリーを確認させていただきます。 プロジェクトの構造を確認しました。以下のような構成になっています: src/ └── xxxx/ ├── __init__.py ├── converter.py ├── html_converter.py ├── image_processor.py ├── toc_analyzer.py └── utils.py

.で始まるディレクトリは自動的に除外されます。.gitignoreに記載されているパターンに合致するファイルやディレクトリは、ツリーから自動的に除外されます。 例えば、以下のような.gitignoreの設定が有効です:

Converts LaTeX source code into professionally formatted PDF documents.

Create PDFs from Markdown, fill forms, merge, split, rotate, watermark, encrypt, extract text, and add QR codes. 16 tools, TypeScript-native.

Validate, convert & visualize YAML, and edit saved diagrams, from your AI editor.

Free file conversion between 999 routes (images, video, audio, documents, data, fonts, ebooks, archives) — no API key required.

An MCP server for viewing, editing, and creating text files, based on the Claude built-in text editor tool.

Analyze and extract information from DLIS (Digital Log Interchange Standard) files, including channel data and metadata.

62 format-aware tools for AI to read and edit Word, Excel, and PDF files with precision — plus academic document linting for Indonesian standards.

Read, analyze, and manipulate data in Excel (XLSX, XLS) and CSV files with advanced filtering and analytics.

Convert various file formats for documents and images, such as DOCX, PDF, CSV, and more.

Convert files between various formats, including images, documents, audio, video, and more.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.