📚 codewiki-mcp
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
**MCP server for codewiki.google — search, fetch docs, and ask questions about any open-source repo**
🇷🇺 Русский | **🇬🇧 English**
*MCP server that connects any AI assistant to codewiki.google — AI-generated wiki documentation for open-source repositories.*
---
📖 Overview
**codewiki-mcp** is a Model Context Protocol server that gives AI assistants access to **codewiki.google** — a service that generates comprehensive wiki documentation for any GitHub repository. Search repos, fetch full docs, or ask natural-language questions — all through MCP.
---
✨ Features
| Feature | Description |
|---------|-------------|
| 🔍 **Search Repos** | Find repositories indexed by codewiki.google |
| 📄 **Fetch Wiki Docs** | Get full markdown or structured pages for any repo |
| 💬 **Ask Questions** | Natural-language Q&A with conversation history |
| 🧠 **NLP Repo Resolution** | Type naturally — wink-nlp extracts keywords and resolves to owner/repo |
| 📡 **Multiple Transports** | stdio (default), Streamable HTTP, SSE |
| 🔄 **Retry with Backoff** | Automatic retries with exponential backoff on 5xx errors |
| 🐳 **Docker Support** | Multi-stage Alpine build |
| 📊 **Response Metadata** | Byte count and elapsed time on every response |
---
🚀 Quick Start
Using npx (no install)
From source
Transports
🐳 Docker
---
🔧 MCP Client Configuration
Cursor
Add to .cursor/mcp.json:
Claude Desktop
Add to claude_desktop_config.json:
Claude Code
Windsurf
Add to your Windsurf MCP config:
VS Code (Copilot)
Add to .vscode/mcp.json:
Local development
---
💡 Usage
Prompts you can use in any MCP-compatible client:
Fetch complete documentation:
Get structured pages:
Ask with natural language:
---
🛠️ MCP Tools
🔍 codewiki_search_repos
Search repositories indexed by codewiki.google.
| Parameter | Type | Required | Default | Description |
|-----------|------|:--------:|---------|-------------|
| query | string | ✅ | — | Search query |
| limit | number | — | 10 | Max results (1–50) |
📄 codewiki_fetch_repo
Fetch generated wiki content for a repository.
| Parameter | Type | Required | Default | Description |
|-----------|------|:--------:|---------|-------------|
| repo | string | ✅ | — | owner/repo, GitHub URL, or natural-language query |
| mode | string | — | "aggregate" | "aggregate" — full markdown; "pages" — structured JSON |
💬 codewiki_ask_repo
Ask a natural-language question about a repository.
| Parameter | Type | Required | Default | Description |
|-----------|------|:--------:|---------|-------------|
| repo | string | ✅ | — | Repository identifier (same formats as fetch) |
| question | string | ✅ | — | Question about the repo |
| history | array | — | [] | Conversation history [{role, content}] (max 20) |
---
📊 Response Format
✅ Success — Search
✅ Success — Fetch (pages mode)
✅ Success — Ask
❌ Error Response
Error codes: VALIDATION, RPC_FAIL, TIMEOUT, NLP_RESOLVE_FAIL
---
⚙️ How It Works
Data Flow
Google Batchexecute RPC
codewiki.google uses Google's internal **batchexecute** RPC format (not REST, not GraphQL). The client:
1. Builds a POST request with f.req=... body