Skip to main content
Glama
owayo

MCP Source Tree Server

by owayo

MCP Source Tree Server

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

기능

  • 지정된 디렉토리 아래의 파일 트리를 JSON 형식으로 가져옵니다.

  • .gitignore 의 조건에 따라 파일 / 디렉토리 제외

  • 디렉토리 구조를 계층적 JSON으로 표현

Related MCP server: EliteMCP

설정

요건

  • 파이썬 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

Available Tools

1 tool
get_src_treeC

Generate a file tree for the specified directory, filtering files based on .gitignore. Traverses the filesystem and generates a JSON-formatted tree structure that preserves hierarchy.

ParametersJSON Schema
NameRequiredDescriptionDefault
directoryYes

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It discloses that the tool traverses filesystems, generates JSON output, and applies .gitignore filtering. However, it omits critical behavioral details like error handling, performance characteristics (e.g., recursion depth, large directory handling), authentication needs, or rate limits. For a filesystem tool with zero annotation coverage, this is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately concise with three sentences that directly address functionality. It's front-loaded with the core purpose and avoids unnecessary elaboration. However, the second sentence could be more tightly integrated with the first for better flow, slightly affecting structure.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of filesystem traversal and JSON generation, with no annotations and no output schema, the description is incomplete. It mentions the output format ('JSON-formatted tree structure') but doesn't describe the structure's schema, error cases, or edge behaviors (e.g., symbolic links, permissions). For a tool with rich potential outputs and zero structured documentation, this falls short.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, with one parameter ('directory') undocumented in the schema. The description adds context by specifying it's for 'the specified directory' and mentions .gitignore filtering, which implies the directory should be a valid path. However, it doesn't explain parameter format (e.g., absolute vs. relative paths) or constraints, leaving gaps in parameter understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Generate a file tree for the specified directory, filtering files based on .gitignore.' It specifies the verb ('generate'), resource ('file tree'), and key behavior (gitignore filtering). However, with no sibling tools mentioned, it cannot demonstrate differentiation from alternatives, preventing a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no explicit guidance on when to use this tool versus alternatives. It mentions the core functionality but lacks context about prerequisites, limitations, or comparison to other file operations. With no sibling tools, this gap is less critical but still represents a lack of usage direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 1 tool update
    • First observedget_src_tree

TDQS

B3.1/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of ambiguity or overlap between tools. The tool's purpose is clearly defined and distinct by default.

Naming Consistency5/5

A single tool inherently has perfect naming consistency, as there are no other tools to compare against. The name 'get_src_tree' follows a clear verb_noun pattern.

Tool Count2/5

A single tool is too few for most practical server purposes, as it severely limits functionality and flexibility. This server appears to offer only basic directory tree generation, which feels thin and under-scoped.

Completeness2/5

The server's domain seems to be file system or source tree operations, but with only one tool for generating a tree, there are significant gaps. Missing operations might include filtering by other criteria, updating trees, or handling file contents, making the surface incomplete for typical agent workflows.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers