CodeWiki MCP — AI-generated docs for GitHub repos

io.github.izzzzzi由 GitHub 帳號 izzzzzi 發布v1.1.1更新於 Oct 24, 2026

MCP server for codewiki.google: search repos, fetch wiki docs, ask questions

概覽

AI 產生的概覽

將 AI 助理連接到 codewiki.google,可搜尋 GitHub 儲存庫、取得 AI 生成的 wiki 文件,並針對某個儲存庫提問。

可以做什麼
搜尋 codewiki.google 已收錄的儲存庫,可限制回傳數量(最多 50 筆),並附上位元組數與耗時等中繼資料。取得儲存庫生成的文件,支援完整 markdown 或結構化頁面兩種形式,儲存庫可用 owner/repo、GitHub 連結或自然語言描述指定。針對某個儲存庫提出自然語言問題,可選擇帶入最多 20 筆歷史對話。透過關鍵詞擷取加上 GitHub 搜尋 API,把口語化描述解析成 owner/repo。
適用情境
適合讓助理說明不熟悉的開源專案如何運作、把其生成的文件帶進對話,或在不自行閱讀原始碼的情況下回答關於某個儲存庫的具體問題。
執行需求
以 stdio 在本機執行,通常透過 npx 搭配 Node.js,也可從原始碼或 Docker 啟動。需要連線到 codewiki.google,自然語言儲存庫解析還需連線 GitHub 搜尋 API。選用環境變數包括 CODEWIKI_BASE_URL、CODEWIKI_REQUEST_TIMEOUT、CODEWIKI_MAX_RETRIES、CODEWIKI_RETRY_DELAY 和 GITHUB_TOKEN;不需要身分驗證。
安裝前請注意
查詢內容與儲存庫名稱會傳送到 codewiki.google,該服務透過未公開的 Google 內部 RPC 端點存取,可能變更或失效。GITHUB_TOKEN 為選用項目,但會把憑證交給本機程序;未驗證的 GitHub 查詢有速率限制。這些工具只讀取資料,不會修改儲存庫。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 CodeWiki MCP — AI-generated docs for GitHub repos,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

📚 codewiki-mcp

MCP server for codewiki.google — search, fetch docs, and ask questions about any open-source repo

[CI] [Release] [npm version] [npm downloads] [License: MIT] [TypeScript] [Node.js]

🇷🇺 Русский | 🇬🇧 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

FeatureDescription
🔍 Search ReposFind repositories indexed by codewiki.google
📄 Fetch Wiki DocsGet full markdown or structured pages for any repo
💬 Ask QuestionsNatural-language Q&A with conversation history
🧠 NLP Repo ResolutionType naturally — wink-nlp extracts keywords and resolves to owner/repo
📡 Multiple Transportsstdio (default), Streamable HTTP, SSE
🔄 Retry with BackoffAutomatic retries with exponential backoff on 5xx errors
🐳 Docker SupportMulti-stage Alpine build
📊 Response MetadataByte count and elapsed time on every response

🚀 Quick Start

Using npx (no install)

bash
npx -y codewiki-mcp@latest

From source

bash
git clone https://github.com/izzzzzi/codewiki-mcp.gitcd codewiki-mcpnpm installnpm run build

Transports

bash
# stdio (default)node dist/cli.js
# Streamable HTTPnode dist/cli.js --http --port 3000
# SSEnode dist/cli.js --sse --port 3001

🐳 Docker

bash
docker build -t codewiki-mcp .
# stdiodocker run -it --rm codewiki-mcp
# HTTPdocker run -p 3000:3000 codewiki-mcp --http
# with environment variablesdocker run -p 3000:3000 \  -e CODEWIKI_REQUEST_TIMEOUT=60000 \  -e CODEWIKI_MAX_RETRIES=5 \  -e GITHUB_TOKEN=ghp_your_token \  codewiki-mcp --http

🔧 MCP Client Configuration

Cursor

Add to .cursor/mcp.json:

json
{  "mcpServers": {    "codewiki-mcp": {      "command": "npx",      "args": ["-y", "codewiki-mcp@latest"]    }  }}
Claude Desktop

Add to claude_desktop_config.json:

json
{  "mcpServers": {    "codewiki-mcp": {      "command": "npx",      "args": ["-y", "codewiki-mcp@latest"]    }  }}
Claude Code
bash
claude mcp add codewiki-mcp -- npx -y codewiki-mcp@latest
Windsurf

Add to your Windsurf MCP config:

json
{  "mcpServers": {    "codewiki-mcp": {      "command": "npx",      "args": ["-y", "codewiki-mcp@latest"]    }  }}
VS Code (Copilot)

Add to .vscode/mcp.json:

json
{  "servers": {    "codewiki-mcp": {      "command": "npx",      "args": ["-y", "codewiki-mcp@latest"]    }  }}
Local development
json
{  "mcpServers": {    "codewiki-mcp": {      "command": "node",      "args": ["/path/to/codewiki-mcp/dist/cli.js"]    }  }}

💡 Usage

Prompts you can use in any MCP-compatible client:

codewiki fetch how routing works in Next.js
codewiki search state management libraries
codewiki ask how does React fiber reconciler work?

Fetch complete documentation:

codewiki fetch vercel/next.jscodewiki fetch https://github.com/fastify/fastify

Get structured pages:

codewiki fetch pages tailwindlabs/tailwindcss

Ask with natural language:

codewiki ask fastify how to add authentication?

🛠️ MCP Tools

🔍 codewiki_search_repos

Search repositories indexed by codewiki.google.

ParameterTypeRequiredDefaultDescription
querystring✅—Search query
limitnumber—10Max results (1–50)

📄 codewiki_fetch_repo

Fetch generated wiki content for a repository.

ParameterTypeRequiredDefaultDescription
repostring✅—owner/repo, GitHub URL, or natural-language query
modestring—"aggregate""aggregate" — full markdown; "pages" — structured JSON

💬 codewiki_ask_repo

Ask a natural-language question about a repository.

ParameterTypeRequiredDefaultDescription
repostring✅—Repository identifier (same formats as fetch)
questionstring✅—Question about the repo
historyarray—[]Conversation history [{role, content}] (max 20)

📊 Response Format

✅ Success — Search
json
{  "query": "fastify",  "count": 1,  "items": [    {      "fullName": "fastify/fastify",      "url": "https://github.com/fastify/fastify",      "description": "Fast and low overhead web framework",      "avatarUrl": "https://avatars.githubusercontent.com/u/24939....",      "extraScore": 555    }  ],  "meta": {    "totalBytes": 12500,    "totalElapsedMs": 450  }}
✅ Success — Fetch (pages mode)
json
{  "repo": "fastify/fastify",  "commit": "abc123",  "canonicalUrl": "https://github.com/fastify/fastify",  "pages": [    {      "title": "Overview",      "level": 1,      "anchor": "#overview",      "markdown": "# Overview\n\nFastify is a web framework...",      "diagramCount": 1    }  ],  "meta": {    "totalBytes": 25000,    "totalElapsedMs": 1200  }}
✅ Success — Ask
json
{  "answer": "Fastify uses a plugin-based architecture where...",  "meta": {    "totalBytes": 8500,    "totalElapsedMs": 2300  }}
❌ Error Response
json
{  "error": {    "code": "RPC_FAIL",    "message": "CodeWiki RPC VSX6ub failed with status 404",    "rpcId": "VSX6ub",    "statusCode": 404  }}

Error codes: VALIDATION, RPC_FAIL, TIMEOUT, NLP_RESOLVE_FAIL


⚙️ How It Works

Data Flow

AI Assistant → MCP protocol → codewiki-mcp → HTTPS → codewiki.google                                                            ↓AI Assistant ← MCP protocol ← codewiki-mcp ← JSON  ← Google RPC API

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
  2. Sends it to /_/BoqAngularSdlcAgentsUi/data/batchexecute
  3. Receives a response with XSSI prefix )]}'\n
  4. Parses wrb.fr frames and extracts the typed payload

Each tool maps to an RPC ID:

ToolRPC ID
🔍 SearchvyWDAf
📄 FetchVSX6ub
💬 AskEgIxfe

🧠 NLP Repo Resolution

Users can type natural language instead of owner/repo:

"the fastify web framework"  → wink-nlp extracts keyword "fastify" (POS tag: NOUN/PROPN)  → GitHub Search API: GET /search/repositories?q=fastify&sort=stars  → top result: "fastify/fastify"  → normalizeRepoInput("fastify/fastify") → URL for codewiki

🔄 Retry with Exponential Backoff

AttemptDelay
0immediate
1250ms
2500ms
31000ms

4xx errors (client errors) are never retried.


🖥️ CLI

codewiki-mcp [options]
Options:  --http           Streamable HTTP transport  --sse            SSE transport  --port <number>  Port for HTTP/SSE (default: 3000)  --endpoint <str> URL endpoint (default: /mcp)  --help, -h       Show help

⚡ Configuration

Environment variables:

VariableDefaultDescription
CODEWIKI_BASE_URLhttps://codewiki.googleBase URL
CODEWIKI_REQUEST_TIMEOUT30000Request timeout (ms)
CODEWIKI_MAX_RETRIES3Max retries
CODEWIKI_RETRY_DELAY250Base retry delay (ms)
GITHUB_TOKEN—GitHub token for NLP repo resolution

You can also create a .env file in the project root:

CODEWIKI_REQUEST_TIMEOUT=60000CODEWIKI_MAX_RETRIES=5GITHUB_TOKEN=ghp_your_token

📁 Project Structure

src/├── cli.ts                  # CLI entry point├── server.ts               # Transport setup (stdio/HTTP/SSE)├── index.ts                # Library re-exports├── schemas.ts              # Zod input schemas├── lib/│   ├── codewikiClient.ts   # API client with retry + metadata│   ├── batchexecute.ts     # Google RPC response parser│   ├── repo.ts             # Repo normalization + NLP resolution│   ├── extractKeyword.ts   # NLP keyword extraction (wink-nlp)│   ├── resolveRepo.ts      # GitHub Search API resolver│   ├── errors.ts           # CodeWikiError + formatMcpError│   └── config.ts           # Env-based configuration└── tools/    ├── searchRepos.ts      # codewiki_search_repos    ├── fetchRepo.ts        # codewiki_fetch_repo    └── askRepo.ts          # codewiki_ask_repo

❓ Troubleshooting

Permission Denied
bash
chmod +x ./node_modules/.bin/codewiki-mcp
Connection Refused (HTTP/SSE)
bash
# Check if port is in uselsof -i :3000
Timeout Errors

For large repositories, increase the timeout:

bash
CODEWIKI_REQUEST_TIMEOUT=60000 node dist/cli.js
NLP Resolution Fails

If natural-language input doesn't resolve, use explicit format:

# Instead of "the fastify framework"fastify/fastify# orhttps://github.com/fastify/fastify

Set GITHUB_TOKEN to avoid GitHub API rate limits for unauthenticated requests.


🧑‍💻 Development

bash
npm run dev          # stdio with tsxnpm run dev:http     # HTTP with tsxnpm run dev:sse      # SSE with tsxnpm run typecheck    # type checknpm run test         # run testsnpm run test:watch   # tests in watch modenpm run build        # compile to dist/

🤝 Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feat/my-feature)
  3. Use Conventional Commits for commit messages
  4. Run npm run typecheck && npm run test before submitting
  5. Open a Pull Request

📄 License

MIT © codewiki-mcp contributors

來源:README.md,提交 46536bb

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.1.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分