local-only server
The server can only run on the client’s local machine because it depends on local resources.
Integrations
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.
🌟 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.
🎯 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
⚙️ TypeScript settings
⚙️ Installation
Install from npm
Build from source
🔧 How to use
Setting up as an MCP server
- Add the following to your MCP config file:
🎮 Available Tools
generate_structure
It generates a directory structure for your project and provides detailed documentation including file contents.
Usage Example
Output sample
Example output of actual project structure:
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:
🔄 Example output
👨💻 Developer Information
Key implementation details
- Server Class :
SourceSageServer
class provides the core functionality of the MCP server. - Tree Building :
buildTree
method recursively analyzes the directory structure.- Properly sort and display directories and files
- File Filtering :
- Use the
ignore
package for flexible file exclusion - Supports a wide range of default exclusion patterns and custom configurations
- Use the
- Content Generation :
- Proper syntax highlighting for your file type
- Providing additional information based on file type
- Async Processing :
- Efficient file scanning using
glob
package - Supporting large projects with asynchronous processing
- Efficient file scanning using
Setting up your development environment
Available 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
You must be authenticated.
Tools
A TypeScript-based server that visualizes project directory structures in Markdown format, automatically documenting file contents with syntax highlighting and supporting customizable exclusion patterns.
- 📖 概要
- 🎯 主な特徴
- 🛠️ 技術スタック
- 📂 プロジェクト構造
- ⚙️ TypeScript設定
- ⚙️ インストール
- 🔧 使用方法
- 📝 .SourceSageignoreの設定
- 🔄 出力例
- 👨💻 開発者向け情報
- 🤝 コントリビューション
- 📄 ライセンス
- 🔗 関連リンク
- 👥 メンテナー