Local DeepWiki MCP Server
로컬 DeepWiki MCP 서버
RAG 기반 Q&A 기능을 갖춘 개인 저장소용 DeepWiki 스타일 문서를 생성하는 로컬, 개인정보 보호 중심의 MCP 서버입니다.
퀵스타트
즉시 체험하기 — 이 프로젝트의 미리 빌드된 위키가 포함되어 있습니다:
git clone https://github.com/UrbanDiver/local-deepwiki-mcp.git
cd local-deepwiki-mcp
uv sync # Install dependencies
deepwiki serve .deepwiki # Browse the wiki at http://localhost:8080자신의 저장소 인덱싱하기 — LLM 제공업체(OpenAI, Anthropic 또는 Ollama)가 필요합니다:
export OPENAI_API_KEY="..." # Or ANTHROPIC_API_KEY for Anthropic
deepwiki init # Configure LLM + embedding providers
deepwiki config health-check # Verify providers are working
deepwiki update /path/to/repo # Index a repository and generate wiki
deepwiki serve /path/to/repo/.deepwiki요구 사항: Python 3.11+, uv (uv 설치 참조), 그리고 LLM 제공업체:
OpenAI (기본값) —
OPENAI_API_KEY환경 변수 설정Anthropic —
ANTHROPIC_API_KEY환경 변수 설정Ollama (완전 로컬, GPU 필요) — Ollama 설치 후
ollama pull qwen3-coder:30b실행
Related MCP server: Codebase Contextifier 9000
기능
다국어 코드 파싱 (tree-sitter 사용: Python, TypeScript/JavaScript, Go, Rust, Java, C/C++, Objective-C, Swift, Ruby, PHP, Kotlin, C#)
AST 기반 청킹 (코드 구조 준수: 함수, 클래스, 메서드)
의미론적 검색 (LanceDB 벡터 데이터베이스 사용)
LLM 기반 위키 생성 (Ollama(로컬), Anthropic, OpenAI 지원)
구성 가능한 임베딩 - 로컬(sentence-transformers) 또는 OpenAI
증분 인덱싱 - 변경된 파일만 재처리
RAG 기반 Q&A - 코드베이스에 대한 질문 가능
아키텍처 상태 - 9개 차원 점수 산정 (복잡도, 결합도, 코드 스멜, 계층, 변경률, 응집도, 중복, 테스트 용이성, 유지보수성)
Deep Research 모드 - 복잡한 아키텍처 질문을 위한 다단계 추론
웹 UI - 브라우저에서 생성된 위키 탐색
HTML 내보내기 - 공유를 위한 정적 HTML 사이트 생성
PDF 내보내기 - Mermaid 다이어그램이 포함된 인쇄 가능한 PDF 문서 생성
대화형 코드맵 - Mermaid 다이어그램을 통한 파일 간 실행 흐름 시각화
지연 페이지 생성 - 방문 시 필요한 위키 페이지를 요청에 따라 생성
설치
uv 사용 (권장)
cd local-deepwiki-mcp
uv sync모든 LLM 제공업체와 웹 UI가 기본적으로 포함되어 있습니다. PDF 내보내기를 위한 선택적 추가 기능:
uv sync --extra pdf # Add WeasyPrint for PDF export
uv sync --extra all # Same as --extra pdf (all optional extras)pip 사용
cd local-deepwiki-mcp
pip install -e ".[all]" # Recommended: install with all extras
# or: pip install -e . # Minimal: core only구성
초기화 마법사를 실행하여 구성 파일을 자동으로 생성합니다:
deepwiki init # Interactive wizard
deepwiki init --non-interactive # Auto-detect defaults (CI/CD)또는 ~/.config/local-deepwiki/config.yaml에 수동으로 생성합니다:
embedding:
provider: "local" # or "openai"
local:
model: "all-MiniLM-L6-v2"
openai:
model: "text-embedding-3-small"
llm:
provider: "openai" # or "anthropic" or "ollama"
openai:
model: "gpt-4o"
# base_url: "https://your-proxy.example.com/v1" # For OpenAI-compatible proxies
anthropic:
model: "claude-sonnet-4-20250514"
ollama:
model: "qwen3-coder:30b"
base_url: "http://localhost:11434"
parsing:
languages:
- python
- typescript
- javascript
- go
- rust
- java
- c
- cpp
max_file_size: 1048576
exclude_patterns:
- "node_modules/**"
- "venv/**"
- ".git/**"
chunking:
max_chunk_tokens: 512
overlap_tokens: 50
output:
wiki_dir: ".deepwiki"
vector_db_name: "vectors.lance"uv 설치
uv는 빠른 Python 패키지 관리자입니다. 설치되어 있지 않다면:
# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
# Or with pip
pip install uv
# Or with Homebrew
brew install uv설치 후 터미널을 다시 시작하거나 source ~/.bashrc (또는 ~/.zshrc)를 실행하세요.
MCP 서버 통합
MCP 서버는 stdio를 통해 실행되며 모든 MCP 호환 AI 도구와 작동합니다. 수동으로 시작하려면:
deepwiki mcp또는 AI 도구가 자동으로 시작하도록 구성하세요:
Claude Code
~/.claude/claude_code_config.json에 추가:
{
"mcpServers": {
"local-deepwiki": {
"command": "uv",
"args": ["run", "--directory", "/path/to/local-deepwiki-mcp", "local-deepwiki"],
"env": {
"OPENAI_API_KEY": "${OPENAI_API_KEY}"
}
}
}
}Cursor
Cursor의 MCP 설정에 추가 (Settings > MCP Servers > Add):
{
"mcpServers": {
"local-deepwiki": {
"command": "uv",
"args": ["run", "--directory", "/path/to/local-deepwiki-mcp", "local-deepwiki"],
"env": {
"OPENAI_API_KEY": "${OPENAI_API_KEY}"
}
}
}
}Windsurf
~/.codeium/windsurf/mcp_config.json에 추가:
{
"mcpServers": {
"local-deepwiki": {
"command": "uv",
"args": ["run", "--directory", "/path/to/local-deepwiki-mcp", "local-deepwiki"],
"env": {
"OPENAI_API_KEY": "${OPENAI_API_KEY}"
}
}
}
}VS Code (Copilot)
워크스페이스의 .vscode/mcp.json에 추가:
{
"servers": {
"local-deepwiki": {
"command": "uv",
"args": ["run", "--directory", "/path/to/local-deepwiki-mcp", "local-deepwiki"],
"env": {
"OPENAI_API_KEY": "${OPENAI_API_KEY}"
}
}
}
}Generic (모든 MCP 클라이언트)
서버는 MCP 프로토콜을 사용하여 stdio를 통해 통신합니다. 다음으로 실행:
uv run --directory /path/to/local-deepwiki-mcp local-deepwiki또는 uv 없이 실행 (pip install -e . 이후):
local-deepwiki참고: /path/to/local-deepwiki-mcp를 저장소를 복제한 실제 경로로 바꾸세요. OpenAI 대신 Anthropic을 사용하는 경우 env 블록에 ANTHROPIC_API_KEY를 추가하세요.
MCP 도구 (64개)
서버는 8개 카테고리에 걸쳐 64개의 MCP 도구를 제공합니다. 아래는 가장 자주 사용되는 도구와 예시이며, 그 뒤에 전체 도구 참조가 있습니다.
핵심 도구
index_repository
저장소를 인덱싱하고 위키 문서를 생성합니다.
{
"repo_path": "/path/to/repo",
"full_rebuild": false,
"llm_provider": "ollama",
"embedding_provider": "local"
}ask_question
RAG를 사용하여 코드베이스에 대해 질문합니다.
{
"repo_path": "/path/to/repo",
"question": "How does the authentication system work?",
"max_context": 5
}deep_research
복잡한 아키텍처 질문을 위한 다단계 추론입니다. 쿼리 분해, 병렬 검색, 격차 분석 및 포괄적인 합성을 수행합니다.
{
"repo_path": "/path/to/repo",
"question": "How does the authentication system interact with the database layer?",
"max_chunks": 30
}도구 | 설명 |
| 저장소 인덱싱 및 위키 문서 생성 |
| 코드베이스에 대한 RAG 기반 Q&A |
| 쿼리 분해 및 합성을 통한 다단계 추론 |
| 위키 목차 가져오기 |
| 특정 위키 페이지 읽기 |
| 코드베이스 전체 의미론적 검색 |
| 위키를 정적 HTML 사이트로 내보내기 |
| Mermaid 다이어그램 렌더링과 함께 위키를 PDF로 내보내기 |
생성기 도구 (12개)
도구 | 설명 |
| Mermaid 다이어그램 생성 (클래스, 의존성, 모듈, 시퀀스) |
| 함수 호출 그래프 분석 |
| 검색 가능한 코드 엔티티 용어집 |
| 클래스 계층 트리 |
| 문서 커버리지 분석 |
| Git 기반 변경 로그 생성 |
| 매개변수 및 반환 유형 추출 |
| 엔티티에 대한 테스트 예제 추출 |
| 오래된 위키 페이지 감지 |
| 하드코딩된 자격 증명 스캔 |
| 저장소 인덱스 상태 및 상태 점검 |
| 인덱싱된 모든 저장소 나열 |
분석 및 검색 도구 (10개)
도구 | 설명 |
| 위키 페이지 및 코드 엔티티 전체 텍스트 검색 |
| Levenshtein 기반 이름 일치 ("의도하신 것이 이것인가요?") |
| 소스 파일에 대한 임포트, 호출자 및 관련 파일 |
| 복합: 용어집 + 호출 그래프 + 상속 + 테스트 + API 문서 |
| 역방향 호출 그래프 및 위험 수준을 포함한 영향 범위 분석 |
| tree-sitter AST를 통한 순환 복잡도 및 중첩 깊이 |
| git diff를 영향받는 위키 페이지 및 엔티티에 매핑 |
| 코드 변경 사항에 대한 RAG 기반 Q&A |
| pyproject.toml, package.json 등에서 파싱된 메타데이터 |
| 위키 상태 대시보드: 인덱스, 페이지, 커버리지, 상태 |
아키텍처 상태 도구 (17개)
도구 | 설명 |
| 9개 차원에 걸친 복합 상태 등급 (A-F) |
| 복잡도, 인지 복잡도, 매개변수, 길이 또는 중첩별 함수 순위 |
| Robert C. Martin 결합도 지표 (Ca, Ce, I, A, D) |
| God 클래스, 기능 욕심, 긴 메서드 등 감지 |
| 계층 위반 감지 (핸들러→서비스→코어) |
| 변경률×복잡도 복합 지표를 포함한 파일 변경 빈도 |
| Jaccard 유사도를 통한 동시 변경 결합도 |
| LCOM4 클래스 응집도 및 모듈 임포트 응집도 |
| 유형 1(정확함) 및 유형 2(구조적) 복제 감지 |
| 테스트 대 코드 비율, 커버리지 매핑, 단언 밀도 |
| 함수별 유지보수성 지수 (Halstead + CC + LOC) |
| 노력/영향도별 우선순위가 지정된 리팩토링 제안 |
| 두 git 참조 간 상태 비교 |
| 과거 상태 점수 스냅샷 |
| 모듈 범위의 복잡도, 스멜, 결합도, 위험도 |
| 신규 개발자 온보딩 가이드 |
| 코드베이스 대화형 가이드 투어 |
코드맵 도구 (2개)
도구 | 설명 |
| Mermaid 다이어그램 및 LLM 서술을 포함한 파일 간 실행 흐름 맵 |
| 호출 그래프 허브에서 흥미로운 진입점 발견 |
연구 및 진행 도구 (4개)
도구 | 설명 |
| 저장된 Deep Research 체크포인트 나열 |
| 이전에 체크포인트된 연구 세션 재개 |
| 진행 중인 연구 작업 취소 |
| 장기 실행 작업의 진행 상황 확인 |
에이전트 도구 (5개)
도구 | 설명 |
| 최근 작업에 기반하여 다음에 사용할 도구에 대한 상황 인식 제안 |
| 사전 정의된 다단계 워크플로우 실행 (예: 전체 분석, 빠른 검토) |
| 여러 엔티티에 대한 |
| 에이전트 RAG: 청크 관련성 등급 지정, 더 나은 결과를 위해 쿼리 재작성 |
| 자연어 쿼리에 기반하여 관련 도구 발견 |
웹 서버 도구 (2개)
도구 | 설명 |
| 문서 탐색을 위한 위키 웹 서버 시작 |
| 실행 중인 위키 웹 서버 중지 |
CLI 명령어
모든 명령어는 통합 deepwiki CLI의 하위 명령어입니다. 레거시 진입점 (deepwiki-serve, deepwiki-export 등)은 하위 호환성을 위해 여전히 작동합니다.
명령어 | 설명 |
| 구성을 위한 대화형 설정 마법사 |
| 인덱스 상태, 신선도 및 위키 커버리지 표시 |
| 저장소 인덱싱 및 위키 재생성 (증분) |
| MCP 서버 시작 (IDE 통합용) |
| 웹 UI로 위키 서비스 |
| 감시 모드 - 파일 변경 시 자동 재인덱싱 |
| 위키를 정적 HTML로 내보내기 |
| 위키를 PDF로 내보내기 |
| 구성 관리 (유효성 검사, 표시, 상태 점검, 프로필) |
| 대화형 퍼지 코드 검색 |
| 캐시 관리 (통계, 지우기, 정리) |
# Setup
deepwiki init # Interactive wizard
deepwiki init --non-interactive # Auto-detect defaults (CI/CD)
deepwiki init --non-interactive --force # Overwrite existing config
# Indexing & status
deepwiki update # Index repo and regenerate wiki
deepwiki update --full-rebuild # Force full rebuild
deepwiki update --dry-run # Preview what would change
deepwiki status # Show index health dashboard
deepwiki status --json # Machine-readable output
deepwiki status --verbose # Detailed file-level info
# MCP server
deepwiki mcp # Start MCP server (stdio)
# Web UI & export
deepwiki serve .deepwiki --port 8080 # Browse wiki in browser
deepwiki export .deepwiki --output ./html-export # Export to static HTML
deepwiki export-pdf .deepwiki -o docs.pdf # Export to single PDF
deepwiki export-pdf .deepwiki --separate -o dir/ # Export each page as PDF
# Configuration
deepwiki config show # Show effective configuration
deepwiki config show --raw # Show raw YAML
deepwiki config validate # Check config for errors
deepwiki config health-check # Verify provider connectivity
deepwiki config profile list # List saved config profiles
deepwiki config profile save dev # Save current config as profile
deepwiki config profile use prod # Switch to a profile
# Utilities
deepwiki search # Interactive fuzzy code search
deepwiki watch /path/to/repo # Auto-reindex on file changes
deepwiki cache stats # Show cache hit rates and sizes
deepwiki cache clear --llm --embedding # Clear caches
deepwiki cache cleanup # Remove expired entriesAPI 키
OpenAI (기본값)
로그인 (또는 계정 생성)
Create new secret key 클릭
키를 복사하여 환경에 설정:
export OPENAI_API_KEY="sk-..."지속하려면 ~/.zshrc 또는 ~/.bashrc에 export를 추가하세요.
Anthropic
Create Key 클릭
환경에 설정:
export ANTHROPIC_API_KEY="sk-ant-..."OpenAI 호환 프록시 사용
조직에서 OpenAI 호환 API 엔드포인트를 제공하는 경우 (예: GitHub Copilot Enterprise 또는 기업용 프록시), 구성에서 base_url을 설정하세요:
llm:
provider: "openai"
openai:
model: "gpt-4o"
base_url: "https://your-proxy.example.com/v1"OPENAI_API_KEY 환경 변수는 인증을 위해 여전히 필요합니다.
사전 요구 사항
로컬 LLM 지원:
Ollama 설치 및 실행 중
모델 풀링 완료 (예:
ollama pull llama3.2)
PDF 내보내기:
시스템 라이브러리:
pango,cairo,gdk-pixbuf(WeasyPrint 의존성)macOS:
brew install pangoUbuntu/Debian:
apt install libpango-1.0-0 libpangocairo-1.0-0
Mermaid 다이어그램 선택 사항:
npm install -g @mermaid-js/mermaid-cli
문제 해결
Ollama 연결 오류
"Failed to connect to Ollama"가 표시되는 경우:
Ollama가 실행 중인지 확인:
ollama serve모델이 풀링되었는지 확인:
ollama list기본 URL이 작동하는지 확인:
curl http://localhost:11434/api/tags사용자 지정 포트를 사용하는 경우, 올바른
base_url로config.yaml을 업데이트하세요.
PDF 내보내기 실패
"pango not found" 또는 유사한 Cairo/Pango 오류:
macOS:
brew install pango cairo gdk-pixbufUbuntu/Debian: `apt install libpango-1.0-0 libpangoc
Available Tools
65 toolsanalyze_architectureARead-onlyIdempotent
Comprehensive architecture analysis in a single call. Runs health check, dependency analysis, design smell detection, and hotspot ranking, then returns a pre-synthesized markdown narrative report. No prior indexing required.
Inputs: repo_path (required), detail_level, focus.
analyze_diffARead-onlyIdempotent
Analyze git diff between two refs. Supports two modes:
mode='structured' (default): Map changed files to affected wiki pages and code entities. Returns structured analysis.
mode='question': Ask questions about the diff using RAG. Combines git diff with vector search context and LLM synthesis. Requires 'question' parameter.
No prior indexing required.
Inputs: repo_path (required), mode, question, base_ref, +3 more.
ask_about_diffARead-onlyIdempotent
Ask questions about recent code changes using RAG. Combines git diff with vector search context and LLM synthesis to answer questions like 'What changed?', 'Are there any bugs?', or 'What's the impact?'.
Note: This is an alias for analyze_diff with mode='question'.
No prior indexing required.
Inputs: repo_path (required), question (required), base_ref, head_ref, +1 more.
ask_questionARead-onlyIdempotent
Ask a question about an indexed repository using RAG. Returns an answer based on relevant code context.
Requires: index_repository must be called first.
Example: {"repo_path": "/path/to/repo", "question": "How does authentication work?"}
Inputs: repo_path (required), question (required), max_context, agentic_rag.
batch_explain_entitiesARead-onlyIdempotent
Explain multiple code entities in a single call. Loads the search index once and looks up each entity name. More efficient than calling explain_entity repeatedly.
Requires: index_repository must be called first.
Inputs: repo_path (required), entity_names (required), depth.
cancel_researchA
Cancel an active deep research session and save its checkpoint. The research can be resumed later using the deep_research tool with resume_research_id.
Requires: index_repository must be called first.
Inputs: repo_path (required), research_id (required).
compare_architectureARead-onlyIdempotent
Compare architecture health between two git refs. Shows which metrics improved or degraded, grade changes, and new/resolved smells. Uses git worktree for safe non-destructive analysis.
No prior indexing required.
Inputs: repo_path (required), base_ref, head_ref, detail_level.
deep_researchA
Perform deep research on a codebase question using multi-step reasoning. Unlike ask_question (single retrieval), this performs query decomposition, parallel retrieval, gap analysis, and comprehensive synthesis. Best for complex architectural questions. Supports checkpointing for long-running research that can be resumed if interrupted.
Requires: index_repository must be called first.
Example: {"repo_path": "/path/to/repo", "question": "How is the event system architected?"}
Inputs: repo_path (required), question (required), max_chunks, preset, +1 more.
detect_bugsARead-onlyIdempotent
Scan a repository for potential bugs using AST pattern matching. Detects bug patterns across Python, JavaScript, TypeScript, Go, Rust, Java, C, C++, C#, and Kotlin including mutable default arguments, bare excepts, unreachable code, empty catch blocks, missing breaks, and more. Set enrich=true for LLM verification.
No prior indexing required.
Inputs: repo_path (required), min_confidence, languages, enrich, +4 more.
detect_secretsARead-onlyIdempotent
Scan a repository for hardcoded credentials and secrets (API keys, tokens, passwords, private keys). Returns findings with type, location, confidence, and remediation advice.
No prior indexing required.
Inputs: repo_path (required), exclude_tests.
detect_stale_docsARead-onlyIdempotent
Find wiki pages that may be outdated because their source files have been modified since the documentation was generated.
Requires: index_repository must be called first.
Inputs: repo_path (required), threshold_days.
explain_entityARead-onlyIdempotent
Get a comprehensive explanation of a function, class, or method by combining glossary info, call graph, inheritance tree, test examples, and API docs into a single response.
Requires: index_repository must be called first.
Example: {"repo_path": "/path/to/repo", "entity_name": "MyClass"}
Inputs: repo_path (required), entity_name (required), include_call_graph, include_inheritance, +3 more.
export_wiki_htmlAIdempotent
Export wiki documentation to static HTML files. Creates a self-contained website that can be viewed without a server.
Requires: index_repository must be called first.
Inputs: wiki_path (required), output_path.
export_wiki_pdfAIdempotent
Export wiki documentation to PDF format. Creates a printable PDF document with proper formatting, page numbers, and table of contents.
Requires: index_repository must be called first.
Inputs: wiki_path (required), output_path, single_file.
find_toolsARead-onlyIdempotent
Search for tools by capability description. Returns ranked matches with tool name, description, and whether indexing is required. Useful when an agent needs to discover which tool to use.
No prior indexing required.
Inputs: query (required).
fuzzy_searchARead-onlyIdempotent
Fuzzy name matching for functions, classes, and methods using Levenshtein distance. Returns 'Did you mean?' suggestions, file locations, and similarity scores. Great for finding entities when you don't know the exact name.
Requires: index_repository must be called first.
Inputs: repo_path (required), query (required), threshold, limit, +1 more.
generate_codemapARead-onlyIdempotent
Generate a Windsurf-style codemap: a focused execution-flow map with Mermaid diagram and narrative trace for a question or topic. Shows how code flows across files with file paths and line numbers. Best for understanding 'How does X work?' questions.
Requires: index_repository must be called first.
Example: {"repo_path": "/path/to/repo", "query": "How does request handling work?"}
Inputs: repo_path (required), query (required), entry_point, focus, +2 more.
get_api_docsARead-onlyIdempotent
Get API documentation with function signatures, parameters, return types, and docstrings for a specific file. Uses tree-sitter AST parsing for accuracy.
No prior indexing required.
Inputs: repo_path (required), file_path (required).
get_architecture_healthARead-onlyIdempotent
Comprehensive architecture health check. Runs complexity hotspot analysis, coupling metrics, design smell detection, and layer dependency analysis in a single call. Returns an overall health grade (A-F), per-dimension scores, and top findings.
No prior indexing required.
Inputs: repo_path (required), top_findings, detail_level.
get_architecture_summaryARead-onlyIdempotent
Deprecated: use get_architecture_health with detail_level='full' instead. Returns a composite architecture overview combining health grade, layer dependency analysis, and file metrics.
No prior indexing required.
Inputs: repo_path (required).
get_architecture_trendsARead-onlyIdempotent
View architecture health score trends over time. Returns historical snapshots with overall and per-dimension scores. Snapshots are saved automatically by 'deepwiki check' and 'deepwiki update'. No prior indexing required (reads saved history).
Inputs: repo_path (required), since.
get_call_graphARead-onlyIdempotent
Get function call graphs showing which functions call which. Can analyze a specific file or the entire repository. Returns a Mermaid flowchart.
Requires: index_repository must be called first.
Inputs: repo_path (required), file_path.
get_changelogARead-onlyIdempotent
Extract recent git commit history as a formatted changelog. Groups commits by date and includes file change information.
No prior indexing required.
Inputs: repo_path (required), max_commits.
get_churn_metricsARead-onlyIdempotent
Analyze file change frequency from git history. Shows which files change most often, optionally overlaid with cyclomatic complexity to find high-risk hotspots (frequently changed + complex). Also reports churn concentration (Gini coefficient).
No prior indexing required.
Inputs: repo_path (required), window_days, top_n, include_complexity.
get_co_changeARead-onlyIdempotent
Find files that frequently change together in the same commits. Uses Jaccard similarity to measure co-change strength. High co-change coupling may indicate hidden dependencies or candidates for merging/splitting.
No prior indexing required.
Inputs: repo_path (required), window_days, min_shared, top_n.
get_cohesion_metricsARead-onlyIdempotent
Analyze class and module cohesion. Reports LCOM4 (Lack of Cohesion of Methods) for each class and internal-import ratio for each package. Classes with LCOM4 > 1 may be candidates for splitting. Modules with low cohesion ratio rely heavily on external imports.
No prior indexing required.
Inputs: repo_path (required), top_n, exclude_tests.
get_complexity_metricsARead-onlyIdempotent
Analyze code complexity for a source file using tree-sitter AST parsing. Returns function/class counts, line metrics, cyclomatic complexity, nesting depth, and parameter counts.
No prior indexing required.
Inputs: repo_path (required), file_path (required).
get_coupling_metricsARead-onlyIdempotent
Compute Robert C. Martin package-level coupling metrics per module: afferent coupling (Ca), efferent coupling (Ce), instability (I = Ce/(Ca+Ce)), abstractness (A = abstract_classes/total_classes), and distance from the main sequence (D = |A+I-1|). Modules with high distance are either too concrete-and-stable or too abstract-and-unstable.
No prior indexing required.
Inputs: repo_path (required), module_filter, top_n, include_leaves, +2 more.
get_coverageARead-onlyIdempotent
Get documentation coverage report for an indexed repository. Shows which classes, functions, and methods have docstrings and which don't.
Requires: index_repository must be called first.
Inputs: repo_path (required).
get_cross_module_dependenciesARead-onlyIdempotent
Build an inter-module import graph for a Python repository. Returns module nodes (with file counts and line counts), weighted directed edges, most-depended-on and most-dependent modules, and a Mermaid graph LR diagram.
No prior indexing required.
Inputs: repo_path (required), module_filter, include_external, min_edge_weight, +2 more.
get_design_smellsARead-onlyIdempotent
Detect common design smells using heuristic AST-based thresholds: God Class (>15 methods AND >500 lines), Long Method (>80 lines AND cyclomatic complexity >7, or CC >15), Long Parameter List (>6 params), Feature Envy (>3 calls to another class's methods), Large File (>800 lines), Deep Nesting (>4 levels), Data Clump (3+ functions share 3+ identical parameter names). Returns smells with severity, file location, entity name, description, and refactoring suggestion.
No prior indexing required.
Inputs: repo_path (required), severity_threshold, exclude_tests, top_n, +1 more.
get_diagramsARead-onlyIdempotent
Generate Mermaid diagrams for an indexed repository. Supports class diagrams, dependency graphs, module overviews, language distribution pie charts, and sequence diagrams.
Requires: index_repository must be called first.
Example: {"repo_path": "/path/to/repo", "diagram_type": "class"}
Inputs: repo_path (required), diagram_type, entry_point.
get_duplication_metricsARead-onlyIdempotent
Detect code duplication using two methods: exact clones (Type 1, line-based fingerprinting) and structural clones (Type 2, AST node-type sequences). Reports duplication ratio, clone groups, and largest clone blocks.
No prior indexing required.
Inputs: repo_path (required), min_lines, top_n, exclude_tests.
get_file_contextARead-onlyIdempotent
Get rich context for a source file: imports, callers (who uses this file), related files, and type definitions used. Helps understand a file's role in the codebase.
Requires: index_repository must be called first.
Inputs: repo_path (required), file_path (required), detail_level.
get_glossaryARead-onlyIdempotent
Get a searchable glossary of all code entities (classes, functions, methods) in an indexed repository. Useful for discovering what's in the codebase.
Requires: index_repository must be called first.
Inputs: repo_path (required), search, file_path, limit, +1 more.
get_guided_tourARead-onlyIdempotent
Generate a guided tour of a codebase organized by topic. Returns an ordered list of file stops with explanations. Topics: architecture, data_flow, request_handling, testing, or custom:. No prior indexing required.
Inputs: repo_path (required), topic, max_stops, enrich.
get_hotspotsARead-onlyIdempotent
Rank functions across an entire repository by a chosen complexity metric (cyclomatic complexity, parameter count, line length, or nesting depth). Returns top-N hotspots with full detail breakdown. Useful for prioritising refactoring efforts.
No prior indexing required.
Inputs: repo_path (required), metric, top_n, min_threshold, +2 more.
get_index_statusARead-onlyIdempotent
Get index statistics for a repository without re-indexing. Shows file count, chunk count, languages, and when it was last indexed.
Note: This is an alias for get_status with scope='index'.
Requires: index_repository must be called first.
Inputs: repo_path (required).
get_inheritanceARead-onlyIdempotent
Get class inheritance hierarchy trees for an indexed repository. Shows parent-child relationships, abstract classes, and generates a Mermaid inheritance diagram.
Requires: index_repository must be called first.
Inputs: repo_path (required), search, limit, offset.
get_layer_dependenciesARead-onlyIdempotent
Analyze architectural layer dependencies in a Python codebase. Categorizes files into layers (web, handlers, services, generators, core, providers, models) and detects upward dependency violations where lower layers import from higher layers. Returns layer file counts, dependency edges, and violations.
No prior indexing required.
Inputs: repo_path (required), summary_only.
get_maintainability_metricsARead-onlyIdempotent
Compute Maintainability Index (MI) per function across a Python repository. MI combines Halstead Volume, cyclomatic complexity, and lines of code into a 0-100 score. Returns the worst-scoring functions first. Functions with MI < 20 are hard to maintain.
No prior indexing required.
Inputs: repo_path (required), top_n, exclude_tests.
get_module_healthARead-onlyIdempotent
Deep health analysis of a single module. Shows complexity distribution, design smells, coupling metrics, dependents (who uses this module), dependencies (what it uses), and refactoring risk level.
No prior indexing required.
Inputs: repo_path (required), module_name (required).
get_onboarding_guideARead-onlyIdempotent
Generate a developer onboarding guide for a codebase. Returns a markdown narrative with project overview, getting started instructions, repository layout, entry points, key modules, and testing info. No prior indexing required.
Inputs: repo_path (required), detail_level.
get_operation_progressARead-onlyIdempotent
Get progress for active long-running operations. Supports polling-based progress tracking for clients that cannot receive push notifications. Returns current progress, ETA, and phase information.
No prior indexing required.
Inputs: operation_id.
get_project_manifestARead-onlyIdempotent
Get parsed project metadata from package manifest files (pyproject.toml, package.json, Cargo.toml, go.mod, etc.). Returns name, version, dependencies, scripts, tech stack summary.
No prior indexing required.
Inputs: repo_path (required), use_cache.
get_recommendationsARead-onlyIdempotent
Generate prioritized refactoring recommendations from architecture health analysis. Returns actionable suggestions with effort/impact scoring. Set enrich=true for LLM-generated detailed descriptions. No prior indexing required.
Inputs: repo_path (required), max_items, category_filter, enrich.
get_statusARead-onlyIdempotent
Get repository index status and/or wiki health dashboard.
scope='all' (default): Returns both index status and wiki stats.
scope='index': Index stats only (file count, chunks, languages).
scope='wiki': Wiki health dashboard (pages, coverage, staleness).
Requires: index_repository must be called first.
Inputs: repo_path (required), scope.
get_testability_metricsARead-onlyIdempotent
Analyze testability metrics for a Python repository. Reports test-to-code ratio, matches test files to source modules, counts assertions per test, and identifies untested source files.
No prior indexing required.
Inputs: repo_path (required).
get_test_examplesBRead-onlyIdempotent
Find usage examples for a function or class by searching test files in the indexed repository. Returns code snippets showing how the entity is used in tests.
Requires: index_repository must be called first.
Inputs: repo_path (required), entity_name (required), max_examples.
get_wiki_statsARead-onlyIdempotent
Get a wiki health dashboard with index stats, page counts, search index size, coverage data, and wiki status - all in a single call.
Note: This is an alias for get_status with scope='wiki'.
Requires: index_repository must be called first.
Inputs: repo_path (required).
impact_analysisARead-onlyIdempotent
Analyze the blast radius of changes to a file or entity. Combines reverse call graph, inheritance dependents, file-level imports, and affected wiki pages to help understand impact before making changes.
Requires: index_repository must be called first.
Example: {"repo_path": "/path/to/repo", "file_path": "src/auth.py"}
Inputs: repo_path (required), file_path (required), entity_name, include_reverse_calls, +3 more.
index_repositoryAIdempotent
Index a repository and generate wiki documentation. This parses all source files, extracts semantic code chunks, generates embeddings, and creates wiki markdown files.
No prior indexing required.
Example: {"repo_path": "/path/to/repo"}
Inputs: repo_path (required), output_dir, languages, full_rebuild, +6 more.
list_indexed_reposARead-onlyIdempotent
Discover all indexed repositories under a given directory. Searches for .deepwiki directories and returns index metadata for each.
No prior indexing required.
Inputs: base_path.
list_research_checkpointsARead-onlyIdempotent
List all research checkpoints for a repository. Shows incomplete and cancelled research sessions that can be resumed using the deep_research tool with resume_research_id.
Requires: index_repository must be called first.
Inputs: repo_path (required).
query_codebaseARead-onlyIdempotent
Smart query that combines ask_question with automatic escalation to deep_research when the initial answer is insufficient. Single entry point for codebase Q&A.
Requires: index_repository must be called first.
Inputs: repo_path (required), query (required), auto_escalate.
read_wiki_pageARead-onlyIdempotent
Read a specific wiki page content.
Requires: index_repository must be called first.
Inputs: wiki_path (required), page (required).
read_wiki_structureARead-onlyIdempotent
Get the table of contents and structure of a generated wiki.
Requires: index_repository must be called first.
Inputs: wiki_path (required).
resume_researchA
Resume a previously interrupted deep research session from its checkpoint. This is a convenience wrapper - you can also use deep_research with resume_research_id directly.
Requires: index_repository must be called first.
Inputs: repo_path (required), research_id (required).
run_workflowARead-onlyIdempotent
Run a pre-built multi-step workflow. Available presets: 'onboarding' (project overview), 'security_audit' (secrets + complexity), 'full_analysis' (stats + coverage + stale + secrets), 'quick_refresh' (stale docs + changelog).
Requires: index_repository must be called first.
Example: {"repo_path": "/path/to/repo", "workflow": "onboarding"}
Inputs: repo_path (required), workflow (required).
search_codeARead-onlyIdempotent
Semantic search across the indexed codebase with optional fuzzy matching and filters. Returns relevant code chunks with similarity scores.
Requires: index_repository must be called first.
Example: {"repo_path": "/path/to/repo", "query": "error handling"}
Inputs: repo_path (required), query (required), limit, language, +4 more.
search_wikiARead-onlyIdempotent
Full-text search across wiki pages and code entities. Searches titles, headings, code terms, descriptions, and keywords. Returns ranked matches.
Requires: index_repository must be called first.
Inputs: repo_path (required), query (required), limit, entity_types.
serve_wikiA
Start the interactive wiki web server for a .deepwiki directory. Launches a Flask app with chat, search, codemap explorer, and research UI. The server runs as a subprocess and can be stopped with stop_wiki_server.
Requires: index_repository must be called first.
Example: {"wiki_path": "/path/to/repo/.deepwiki"}
Inputs: wiki_path (required), host, port, open_browser.
stop_wiki_serverA
Stop a previously started wiki web server. Gracefully terminates the server process. If no server is found on the specified port, returns a list of currently running servers.
No prior indexing required.
Inputs: port, wiki_path.
suggest_codemap_topicsARead-onlyIdempotent
Suggest interesting codemap topics for a repository based on call graph hubs, core modules, and common entry patterns. Use before generate_codemap to discover what flows are worth exploring.
Requires: index_repository must be called first.
Inputs: repo_path (required), max_suggestions.
suggest_next_actionsARead-onlyIdempotent
Suggest which tools to use next based on tools already used. Returns ranked suggestions with reasons. No LLM calls - uses a static decision tree for instant responses.
No prior indexing required.
Inputs: tools_used, context, repo_path.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 65 tools
Most tools have clear, distinct purposes, though some aliases (e.g., ask_about_diff for analyze_diff, get_wiki_stats for get_status) and a deprecated tool introduce minor ambiguity. Descriptions are sufficiently detailed to differentiate the many metrics and analysis tools.
Naming follows a mostly consistent verb_noun pattern (e.g., analyze_architecture, search_code, get_complexity_metrics). Some mixing of verb styles (ask, batch_explain, cancel, serve) occurs, but it's not chaotic. Aliases and deprecated items are well-documented.
With 65 tools, the surface is very large. While the domain (code analysis and documentation) could justify a broad set, many metric tools (e.g., get_churn_metrics, get_co_change) could be consolidated. This many tools may overwhelm agents and increase selection errors.
The tool set comprehensively covers indexing, searching, architecture analysis, metrics, diff analysis, research, documentation export, and more. No obvious missing operations for the stated purpose; it handles the full lifecycle of code analysis and wiki generation.
Maintenance
Related MCP Connectors
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
A cited wiki of your GitHub repo: search, read pages, find symbols and ask, with line citations.
Codebase intelligence for AI coding agents: graph, git history, docs, decisions, code health.
Related MCP Servers
- AlicenseAqualityBmaintenanceGenerates professional documentation for multi-language codebases with deep AST-based code analysis, supporting Docusaurus, MkDocs, and Sphinx frameworks. Includes API documentation generation, PDF export, OpenAPI spec generation, and sales-ready documentation for code marketplaces.9MIT
- AlicenseNot gradedqualityDmaintenanceEnables semantic code search across multiple repositories using AST-aware chunking and relationship tracking. Supports local LLM embeddings, real-time indexing, and cross-codebase dependency analysis through vector and graph databases.3MIT
- AlicenseNot gradedqualityDmaintenanceAutomatically generates comprehensive wiki documentation from any codebase, including Mermaid diagrams, source code citations, and automated quality checks.3MIT
- AlicenseNot gradedqualityDmaintenanceGenerates comprehensive documentation (architecture overview, dependency graph, API surface, and README) for any codebase locally without external APIs.1MIT