Documentation MCP
 
코드베이스를 분석하여 README, API 문서, 아키텍처 다이어그램, CHANGELOG를 자동으로 생성하는 MCP 서버입니다.
주요 기능
- 코드 자동 분석: TypeScript/JavaScript AST 파싱으로 함수, 클래스, 인터페이스 추출
- JSDoc 파싱: JSDoc/TSDoc 주석에서 설명, 파라미터, 반환값 정보 추출
- 문서화 커버리지: 코드의 문서화 비율을 계산하여 품질 측정
- 다양한 문서 생성: README, API 문서, Mermaid 다이어그램, CHANGELOG 지원
- 다국어 지원: 한국어/영어 문서 생성 지원
설치
npm을 통한 글로벌 설치 (권장)
npm install -g @frontpoint/documentation-mcp
프로젝트 로컬 설치
npm install @frontpoint/documentation-mcp
소스에서 설치
# 저장소 클론
git clone https://github.com/anthropics/documentation-mcp.git
cd documentation-mcp
# 의존성 설치 및 빌드
npm install
npm run build
MCP 클라이언트 설정
방법 1: npx 사용 (가장 간편)
npx를 사용하면 별도 설치 없이 바로 사용할 수 있습니다.
Claude Desktop 설정 (claude_desktop_config.json):
{
"mcpServers": {
"documentation": {
"command": "npx",
"args": ["@frontpoint/documentation-mcp", "."]
}
}
}
방법 2: 글로벌 설치 후 사용
npm install -g @frontpoint/documentation-mcp
Claude Desktop 설정:
{
"mcpServers": {
"documentation": {
"command": "documentation-mcp",
"args": ["."]
}
}
}
방법 3: 프로젝트별 로컬 설정
프로젝트 루트에 .mcp.json 파일 생성:
{
"mcpServers": {
"documentation": {
"command": "npx",
"args": ["@frontpoint/documentation-mcp", "."]
}
}
}
Claude Code (CLI) 설정
# npx 사용
claude mcp add documentation npx @frontpoint/documentation-mcp .
# 또는 글로벌 설치 후
claude mcp add documentation documentation-mcp .
설정 파일 위치:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
사용 워크플로우
1단계: 프로젝트 초기화
doc-init
프로젝트를 분석하고 .doc-generator/ 디렉토리에 설정 파일을 생성합니다.
옵션:
--language <lang>: 문서 언어 (ko | en). 기본값: en--outputPath <path>: 문서 출력 경로--includePrivate: private 멤버도 문서화에 포함--diagramFormat <format>: 다이어그램 형식 (mermaid | plantuml)--force: 기존 설정 덮어쓰기
예시: `` doc-init --language ko doc-init --outputPath docs --includePrivate ``
2단계: 코드베이스 분석
doc-analyze
TypeScript/JavaScript 파일을 파싱하여 문서화 정보를 추출합니다.
옵션:
--scope <path>: 분석할 경로 (기본값: 전체 프로젝트)--includePrivate: private 멤버도 포함--force: 캐시 무시하고 새로 분석
예시: `` doc-analyze doc-analyze --scope src/api ``
3단계: 문서 생성
doc-generate <type>
분석된 코드를 기반으로 문서를 생성합니다.
지원 문서 유형:
readme: README.md 생성api: API 문서 생성diagram: Mermaid 아키텍처 다이어그램 생성changelog: CHANGELOG.md 생성all: 모든 문서 생성
옵션:
--force: 기존 파일 덮어쓰기--dryRun: 실제 생성 없이 미리보기
예시: `` doc-generate readme doc-generate all --force doc-generate api --dryRun ``
4단계: 상태 확인
doc-status
현재 문서화 상태와 커버리지를 확인합니다.
옵션:
--detailed: 상세 정보 포함--coverage: 커버리지 정보만 표시
생성되는 문서 구조
your-project/
├── .doc-generator/ # 설정 디렉토리
│ ├── config.json # 문서화 설정
│ ├── state.json # 생성 상태
│ └── analysis-cache.json # 분석 결과 캐시
├── README.md # 프로젝트 README
├── CHANGELOG.md # 변경 로그
└── docs/
├── api/
│ └── README.md # API 문서
└── diagrams/
└── architecture.md # 아키텍처 다이어그램
도구 목록
| 도구 | 설명 | |------|------| | doc-init | 프로젝트 초기화, .doc-generator/ 생성 | | doc-analyze | 코드베이스 분석 (함수, 클래스, 인터페이스, API 엔드포인트) | | doc-generate | 문서 생성 (README, API, 다이어그램, CHANGELOG) | | doc-status | 현재 문서화 상태 및 커버리지 확인 |
프로그래매틱 사용
import { DocumentationMCPServer } from '@frontpoint/documentation-mcp/server';
const server = new DocumentationMCPServer();
await server.initialize('/path/to/project');
await server.start();
import { analyzeProject } from '@frontpoint/documentation-mcp/core/code-analyzer';
import type { ProjectAnalysis } from '@frontpoint/documentation-mcp/types';
const analysis: ProjectAnalysis = await analyzeProject('/path/to/project', config);
console.log(`Analyzed ${analysis.totalFiles} files`);
개발
# 저장소 클론
git clone https://github.com/anthropics/documentation-mcp.git
cd documentation-mcp
# 의존성 설치
npm install
# 개발 모드 (watch)
npm run dev
# 테스트
npm test
# 린트
npm run lint
# 빌드
npm run build
기여하기
- 이 저장소를 포크합니다
- 피처 브랜치를 생성합니다 (
git checkout -b feature/amazing-feature) - 변경사항을 커밋합니다 (
git commit -m 'Add amazing feature') - 브랜치에 푸시합니다 (
git push origin feature/amazing-feature) - Pull Request를 생성합니다
라이선스
MIT License - 자세한 내용은 LICENSE 파일을 참조하세요.











