SourceSage MCP
With the SourceSage MCP server, you can generate detailed documentation of a project's directory structure and file contents in Markdown format. Features include:
📁 Directory Structure Visualization: Output an ASCII tree view of the directory structure
📝 File Content Documentation: Automatically document file contents with syntax highlighting based on file type
🔍 Flexible File Exclusion: Exclude specific files and directories using patterns defined in
.SourceSageignore🚀 Implementation: Built with TypeScript using strict type checking for high reliability
💫 Usage Options: Specify target directory and optional ignore file path using absolute paths
Provides project directory structure visualization, excluding Git-related files and directories through built-in .SourceSageignore patterns to prevent unnecessary Git metadata from appearing in the structure output.
Enables visualization of GitHub repositories with automatic handling of GitHub-specific files through customizable ignore patterns, while providing badges that link back to the GitHub repository's license, issues, and pull requests.
Offers Node.js project visualization with special handling for Node.js module structures and automatic documentation of Node.js-specific configuration files.
Provides visualization for npm packages with integrated badges showing npm version and download statistics, while automatically handling npm-specific files like package-lock.json through built-in ignore patterns.
Specializes in TypeScript project visualization with proper syntax highlighting for TypeScript files and intelligent documentation of TypeScript configuration settings.
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., "@SourceSage MCPvisualize the directory structure of my current project"
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.
🌟 SourceSage MCP
📖 Overview
SourceSage is an MCP server that visualizes your project's directory structure in a beautiful Markdown format. It is implemented in TypeScript, offers high customizability and flexible exclude patterns, and automatically documents the contents of each file, making it easy to get an overview of your project.
Related MCP server: MCP-Typescribe
🎯 Main features
📁 Directory structure output in Markdown format
🎨 Beautiful tree structure display (ASCII art)
📝 Automatic documentation of file contents (with language-specific syntax highlighting)
🔍 Flexible exclude patterns (.SourceSageignore)
🚀 A modern implementation using ES2022 and the Node.js module system.
💫 High reliability due to strict type checking
🛠️ Technology stack
🔷 TypeScript (ES2022 target)
📦 Model Context Protocol SDK (v0.6.0)
🌐 Node.js (Node 16 module system)
📚 glob (v11.0.0) - File pattern matching
🎭 ignore (v6.0.2) - Flexible file exclusion functionality
📂 Project Structure
source-sage/
├── assets/
│ └── header.svg # プロジェクトヘッダー画像
├── src/
│ └── index.ts # メインサーバー実装
├── build/ # コンパイル済みJavaScriptファイル
├── .gitignore # Gitの除外設定
├── .SourceSageignore # SourceSage固有の除外設定
├── package.json # プロジェクト設定・依存関係
├── README.md # プロジェクトドキュメント
└── tsconfig.json # TypeScript設定⚙️ TypeScript settings
{
"compilerOptions": {
"target": "ES2022", // 最新のECMAScript機能を活用
"module": "Node16", // Node.js 16の最新モジュールシステムを使用
"moduleResolution": "Node16",
"outDir": "./build", // コンパイル済みファイルの出力先
"rootDir": "./src", // ソースファイルのルートディレクトリ
"strict": true, // 厳格な型チェックを有効化
"esModuleInterop": true, // CommonJSモジュールとの相互運用性を確保
"skipLibCheck": true, // 型定義ファイルのチェックをスキップ
"forceConsistentCasingInFileNames": true // ファイル名の大文字小文字を厳格に管理
}
}⚙️ Installation
Install from npm
npm install -g @sunwood-ai-labs/source-sage-mcp-serverBuild from source
git clone https://github.com/sunwood-ai-labs/source-sage-mcp-server.git
cd source-sage-mcp-server
npm install
npm run build🔧 How to use
Setting up as an MCP server
Add the following to your MCP config file:
{
"mcpServers": {
"source-sage": {
"command": "node",
"args": ["C:/path/to/source-sage/build/index.js"]
}
}
}🎮 Available Tools
generate_structure
It generates a directory structure for your project and provides detailed documentation including file contents.
interface GenerateStructureArgs {
// 構造を生成するディレクトリのパス(必須)
// 必ず絶対パスで指定してください
path: string;
// .SourceSageignoreファイルのパス(オプション)
// 指定する場合は絶対パスで指定してください
ignorePath?: string;
}Usage Example
// 絶対パスでの使用(推奨)
const result = await mcpClient.callTool('source-sage', 'generate_structure', {
path: 'C:/Users/your-name/path/to/your-project',
ignorePath: 'C:/Users/your-name/path/to/your-project/.SourceSageignore'
});Output sample
Example output of actual project structure:
# 📁 Project: source-sage
## 🌳 ディレクトリ構造
OS: win32
Directory: C:\Users\your-name\source-sage
└─ source-sage/
├─ src/
│ └─ index.ts # MCPサーバーの主要な実装
├─ package.json # プロジェクトの依存関係と設定
├─ README.md # プロジェクトの詳細な説明
└─ tsconfig.json # TypeScriptのコンパイル設定The output includes the following information:
📁 Project name and OS information
🌳 Directory tree structure
📝 Role and description of each file
🔍 Exclude unnecessary files with .SourceSageignore
📝 .SourceSageignore settings
Create a .SourceSageignore file in the root of your project and put the patterns you want to exclude into it. By default, it contains the following exclude patterns:
# バージョン管理システム関連
.git
.gitignore
# キャッシュファイル
__pycache__
.pytest_cache
**/__pycache__/**
*.pyc
# ビルド・配布関連
build
dist
*.egg-info
# 一時ファイル・出力
output
output.md
test_output
.SourceSageAssets
.SourceSageAssetsDemo
# アセット
*.png
*.svg
assets
# その他
LICENSE
example
folder
package-lock.json🔄 Example output
# 📁 Project: my-project
## 🌳 ディレクトリ構造
OS: win32
Directory: C:\path\to\my-project
└─ my-project/
├─ src/
│ ├─ index.ts
│ └─ utils/
│ └─ helper.ts
└─ package.json
## 📄 ファイル内容
### 📝 `src/index.ts`
**Type**: TypeScript Source File
👨💻 Developer Information
Key implementation details
Server Class :
SourceSageServerclass provides the core functionality of the MCP server.Tree Building :
buildTreemethod recursively analyzes the directory structure.Properly sort and display directories and files
File Filtering :
Use the
ignorepackage for flexible file exclusionSupports a wide range of default exclusion patterns and custom configurations
Content Generation :
Proper syntax highlighting for your file type
Providing additional information based on file type
Async Processing :
Efficient file scanning using
globpackageSupporting large projects with asynchronous processing
Setting up your development environment
# リポジトリのクローン
git clone https://github.com/sunwood-ai-labs/source-sage-mcp-server.git
# 依存関係のインストール
npm install
# 開発用ビルド
npm run build
# 開発サーバーの起動
npm run inspectorAvailable npm scripts
npm run build: Compile TypeScript and set execution permissionsnpm run prepare: Automatic build during installationnpm run watch: Automatic compilation during developmentnpm run inspector: Start the MCP inspector
🤝 Contributions
Fork this repository
Create a new branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m '✨ feat: 素晴らしい機能を追加')Push to the branch (
git push origin feature/amazing-feature)Create a pull request
📄 License
MIT License - see the LICENSE file for details.
🔗 Related Links
👥 Maintainers
Sunwood AI Labs Team
Available Tools
1 toolgenerate_structureA
プロジェクトのディレクトリ構造を生成し、ファイル内容も含めた詳細なドキュメントを作成します。プロジェクトやリポジトリ、フォルダの内容を理解するときに使用します。
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | 構造を生成するディレクトリの絶対パス | |
| ignorePath | No | .SourceSageignoreファイルの絶対パス(オプション) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so the description must cover behavioral aspects. It mentions reading file contents and generating a document, but does not disclose side effects, permissions, or performance considerations. Basic transparency but lacks depth.
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 a single sentence, concise and front-loaded with the core action. It wastes no words but could be slightly more structured.
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?
No output schema exists, so the description should clarify the output format. It only says 'detailed document' without specifying the type or delivery method. Missing details for a complete understanding.
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 coverage is 100% with parameter descriptions already present. The description adds context about use cases but no additional semantic information beyond what the schema provides.
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 that the tool generates a directory structure and a detailed document including file contents, with a specific use case. The verb 'generate' and resource 'directory structure' are distinct and unambiguous.
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 implies usage for understanding project contents but does not provide when-not-to-use or alternatives. Since there are no sibling tools, it is minimally adequate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
With only one tool, there is no possibility of confusion between tools. The tool's purpose is clearly defined and distinct.
Since there is only one tool, naming consistency is not applicable, but the single name 'generate_structure' follows a clear verb_noun pattern.
A single tool for a server named 'SourceSage MCP' is too few for the apparent scope. While the tool is substantive, the server lacks complementary tools that would support a typical workflow for project understanding.
The tool covers the core purpose of generating structure and documentation, but there are notable gaps: no ability to list files individually, retrieve specific file contents, or search within the project, limiting granular interactions.
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
Serves your design system and coding standards to coding agents, so they stop guessing.
A TypeScript MCP server for Home Assistant, enabling programmatic management of entities, automati…
Publish markdown documents as public share links with mermaid diagram support. Built by AutEng.ai
Document-to-Markdown MCP server — convert PDF, Office and HTML into LLM-ready Markdown.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA TypeScript-based server project that can be integrated with Cursor IDE as an MCP (Model Control Protocol) server, enabling enhanced development capabilities.134
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables LLMs to understand and work with TypeScript APIs they haven't been trained on by providing structured access to TypeScript type definitions and documentation.3046MIT
- AlicenseNot gradedqualityDmaintenanceA TypeScript-based document processing server that supports various document formats (.docx, .pdf, .xlsx) and integrates with Model Context Protocol SDK for efficient document context management.2,0131MIT
- FlicenseNot gradedqualityDmaintenanceA TypeScript server that exposes various code automation tools powered by Gemini, including code refactoring, test generation, documentation creation, debugging assistance, and code navigation capabilities.1
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/Sunwood-ai-labs/source-sage-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server