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
📖 개요
SourceSage는 프로젝트의 디렉토리 구조를 아름다운 마크다운 형식으로 시각화하는 MCP 서버입니다. TypeScript로 구현되어 고급 사용자 정의 및 유연한 제외 패턴 기능을 제공합니다. 또한 각 파일의 내용을 자동으로 문서화하여 프로젝트의 전체적인 모습을 파악하기 쉽게 합니다.
🎯 주요 특징
- 📁 디렉토리 구조의 마크 다운 형식으로 출력
- 🎨 아름다운 나무 구조 표시 (ASCII art)
- 📝 파일 내용 자동 문서화(언어별 구문 강조표시 포함)
- 🔍 유연한 제외 패턴(.SourceSageignore)
- 🚀 ES2022 및 Node16 모듈 시스템으로 최신 구현
- 💫 엄격한 유형 검사로 높은 신뢰성
🛠️ 기술 스택
- 🔷 TypeScript (ES2022 타겟)
- 📦 Model Context Protocol SDK (v0.6.0)
- 🌐 Node.js (Node16 모듈 시스템)
- 📚 glob (v11.0.0) - 파일 패턴 매칭
- 🎭 ignore (v6.0.2) - 유연한 파일 제외 기능
📂 프로젝트 구조
⚙️ TypeScript 설정
⚙️ 설치
npm에서 설치
소스에서 빌드
🔧 사용법
MCP 서버로 설정
- MCP 구성 파일에 다음을 추가합니다.
🎮 사용 가능한 도구
generate_structure
프로젝트의 디렉토리 구조를 생성하고 파일 내용을 포함한 자세한 문서를 만듭니다.
사용 예
출력 샘플
실제 프로젝트 구조의 출력 예:
이 출력에는 다음 정보가 포함됩니다.
- 📁 프로젝트 이름 및 OS 정보
- 🌳 디렉토리 트리 구조
- 📝 각 파일의 역할과 설명
- 🔍 .SourceSageignore로 불필요한 파일 제외
📝 .SourceSageignore 설정
프로젝트의 루트에 .SourceSageignore
파일을 만들고 제외하려는 패턴을 설명합니다. 기본적으로 다음과 같은 제외 패턴이 포함됩니다.
🔄 출력 예
👨💻 개발자 정보
주요 구현 세부사항
- Server Class :
SourceSageServer
클래스가 MCP 서버의 핵심 기능을 제공 - Tree Building :
buildTree
메서드가 재귀적으로 디렉토리 구조를 구문 분석- 디렉토리와 파일을 적절하게 정렬하고 표시
- 파일 필터링 :
ignore
패키지를 사용하여 유연한 파일 제외 실현- 풍부한 기본 제외 패턴 및 맞춤 설정 지원
- Content Generation :
- 파일 형식에 따라 적절한 구문 강조표시
- 파일 형식에 따라 추가 정보 제공
- Async Processing :
glob
패키지를 사용한 효율적인 파일 스캔- 비동기 처리를 통한 대규모 프로젝트 지원
개발 환경 설정
사용 가능한 npm 스크립트
npm run build
: TypeScript 컴파일 및 실행 권한 설정npm run prepare
: 설치시 자동 빌드npm run watch
: 개발 시 자동 컴파일npm run inspector
: MCP Inspector 시작
🤝 기여
- 이 저장소를 포크
- 새로운 브랜치 만들기 (
git checkout -b feature/amazing-feature
) - 변경 커밋 (
git commit -m '✨ feat: 素晴らしい機能を追加'
) - 브랜치에 푸시 (
git push origin feature/amazing-feature
) - 끌어오기 요청 만들기
📄 라이센스
MIT License - 자세한 내용은 LICENSE 파일을 참조하십시오.
🔗 관련 링크
👥 유지보수
- 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の設定
- 🔄 出力例
- 👨💻 開発者向け情報
- 🤝 コントリビューション
- 📄 ライセンス
- 🔗 関連リンク
- 👥 メンテナー