MCP Source Tree Server

by owayo
Verified

local-only server

The server can only run on the client’s local machine because it depends on local resources.

Integrations

  • Respects .gitignore patterns to exclude files and directories according to Git's ignore rules when generating the file tree.

MCP Source Tree Server

지정된 디렉토리 아래의 파일 트리를 생성하는 MCP 서버입니다. . 로 시작하는 디렉토리나 .gitignore 에 나열된 조건에 따라 특정 파일이나 디렉토리를 제외합니다. Claude에 통합하면 Claude가 프로젝트의 구조를 신속하게 확인할 수 있으며 Claude가 편집해야 할 파일을 식별하는 데 도움이됩니다.

기능

  • 지정된 디렉토리 아래의 파일 트리를 JSON 형식으로 가져옵니다.
  • .gitignore 의 조건에 따라 파일 / 디렉토리 제외
  • 디렉토리 구조를 계층적 JSON으로 표현

설정

요건

  • 파이썬 3.10 이상
  • uv

설치

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

Claude for Desktop에서 설정

claude_desktop_config.json 에 다음 설정을 추가하십시오.

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

Claude에서의 사용 예

지시하려면 src 중 하나의 루트 디렉토리를 지정하십시오. .gitignore 를 고려할 때 루트 디렉토리 바로 아래에 .gitignore 가 있다고 가정합니다. /Users/xxx/GitHub/xxx/ のソースツリーを確認してください합니다.

다음과 같이 응답합니다.

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

이렇게 하면 Claude가 프로젝트 구조를 신속하게 확인할 수 있습니다.

파일 제외

. 로 시작하는 디렉토리는 자동으로 제외됩니다. .gitignore 에 나열된 패턴과 일치하는 파일과 디렉토리는 트리에서 자동으로 제외됩니다. 예를 들어 다음과 같은 .gitignore 설정이 유효합니다.

__pycache__/ node_modules/ *.log

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

Generates a JSON file tree from a specified directory's 'src' folder, adhering to '.gitignore' rules, allowing for quick project structure review in Claude.

  1. 機能
    1. セットアップ
      1. 必要条件
      2. インストール
    2. Claude for Desktopでの設定
      1. Claudeでの使用例
        1. ファイル除外
          ID: 1igr60piqh