MCP Source Tree Server
The MCP Source Tree Server generates a hierarchical JSON representation of a directory's file tree while applying intelligent filtering:
Generate File Tree: Creates a JSON-formatted structure of a specified directory
Filter with
.gitignore: Excludes files and directories based on.gitignorerulesExclude Hidden Items: Automatically ignores directories and files starting with
.(e.g.,.git/)Preserve Hierarchy: Maintains the original directory structure in the output
Respects .gitignore patterns to exclude files and directories according to Git's ignore rules when generating the file tree.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Source Tree Servershow me the source tree for my project at /Users/alice/projects/web-app"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Source Tree Server
It is an MCP server that generates a file tree under a specified directory. It excludes certain files and directories, such as directories starting with . or conditions in .gitignore . By incorporating it into Claude, it helps Claude to quickly see the structure of the project and identify the files that Claude should edit.
function
Gets the file tree under the specified directory in JSON format.
Exclude files/directories according to
.gitignoreconditionsRepresents the directory structure as hierarchical JSON
Related MCP server: EliteMCP
set up
Prerequisites
Python 3.10 or later
uv
install
# uvのインストール
$ curl -LsSf https://astral.sh/uv/install.sh | sh
$ cd /path/to/mcp-src-tree
# ライブラリのインストール
$ uv syncClaude for Desktop Settings
Add the following to claude_desktop_config.json :
{
"mcpServers": {
"src-tree": {
"command": "uv",
"args": [
"--directory",
"/path/to/mcp-src-tree", # このプロジェクトディレクトリの絶対パスに書き換えてください
"run",
"tree.py"
]
}
}
}Claude usage example
Please specify the root directory one level above src. When considering .gitignore , it is assumed that .gitignore exists directly under the root directory. It will work if you specify something like /Users/xxx/GitHub/xxx/ のソースツリーを確認してください
It responds as follows:
はい、ソースツリーを確認させていただきます。
プロジェクトの構造を確認しました。以下のような構成になっています:
src/
└── xxxx/
├── __init__.py
├── converter.py
├── html_converter.py
├── image_processor.py
├── toc_analyzer.py
└── utils.pyThis allows Claude to quickly see the project structure.
File Exclusions
Directories beginning with . are automatically excluded. Files and directories that match a pattern in .gitignore are automatically excluded from the tree. For example, the following .gitignore configuration is valid:
__pycache__/
node_modules/
*.logAvailable Tools
1 toolget_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.
| Name | Required | Description | Default |
|---|---|---|---|
| directory | Yes |
TDQS
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.
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.
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.
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.
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.
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. Dates show when Glama detected each change.
1 tool update
- First observed
get_src_tree
TDQS
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.
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.
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.
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
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Source-checked CLI guides and model-aware planning for Claude Code, Codex, and Grok Build.
Generate SBOMs, scan vulnerabilities, and analyze dependencies from local projects or Git repos.
Path-scoped team memories, rules and skills for Claude Code, Cursor, Codex and other MCP clients.
Convert JSON samples into TypeScript interfaces and Zod schemas, with inference caveats.
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceA secure MCP server enabling read-only access and file search capabilities within a specified directory, while respecting .gitignore patterns.-
- FlicenseNot gradedqualityNot gradedmaintenanceAnalyzes directory structures with .gitignore awareness and executes Python code in secure sandboxed environments. Combines intelligent codebase analysis with safe code execution for development workflows.1-
- AlicenseAqualityDmaintenanceEnables Claude to explore and analyze remote Git repositories, providing structured file contents and token estimates.4MIT
- AlicenseNot gradedqualityBmaintenanceEnables Claude Code to query a TypeScript dependency graph and retrieve the minimal set of files needed for code review, implementation, or debugging.MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/owayo/mcp-src-tree'
If you have feedback or need assistance with the MCP directory API, please join our Discord server