Featured

Deploy OpenClaw in 60 seconds β€” 20% off logoDeploy OpenClaw in 60 seconds β€” 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger β†’
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger β†’
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free β†’
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now β†’
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data β€” no proxies, no parsers, no maintenance.

Start building free β†’
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it β€” secured from day one.

Get it set up for you β†’
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free β†’
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here β†’

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

codewiki-mcp MCP server](https://glama.ai/mcp/servers/izzzzzi/codewiki-mcp/badges/score.svg)](https://glama.ai/mcp/servers/izzzzzi/codewiki-mcp) πŸ“‡ ☁️ - MCP server for codewiki.google.

README.md

<div align="center">

πŸ“š codewiki-mcp

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

![CI](https://github.com/izzzzzi/codewiki-mcp/actions/workflows/ci.yml) ![Release](https://github.com/izzzzzi/codewiki-mcp/actions/workflows/release.yml) ![npm version](https://www.npmjs.com/package/codewiki-mcp) ![npm downloads](https://www.npmjs.com/package/codewiki-mcp) ![License: MIT](LICENSE) ![TypeScript](https://www.typescriptlang.org/) ![Node.js](https://nodejs.org/)

πŸ‡·πŸ‡Ί Русский | πŸ‡¬πŸ‡§ English

<br />

MCP server that connects any AI assistant to codewiki.google β€” AI-generated wiki documentation for open-source repositories.

</div>

---

πŸ“– 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)

npx -y codewiki-mcp@latest

From source

git clone https://github.com/izzzzzi/codewiki-mcp.git
cd codewiki-mcp
npm install
npm run build

Transports

# stdio (default)
node dist/cli.js

# Streamable HTTP
node dist/cli.js --http --port 3000

# SSE
node dist/cli.js --sse --port 3001

🐳 Docker

docker build -t codewiki-mcp .

# stdio
docker run -it --rm codewiki-mcp

# HTTP
docker run -p 3000:3000 codewiki-mcp --http

# with environment variables
docker 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

<details> <summary><b>Cursor</b></summary>

Add to .cursor/mcp.json:

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

</details>

<details> <summary><b>Claude Desktop</b></summary>

Add to claude_desktop_config.json:

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

</details>

<details> <summary><b>Claude Code</b></summary>

claude mcp add codewiki-mcp -- npx -y codewiki-mcp@latest

</details>

<details> <summary><b>Windsurf</b></summary>

Add to your Windsurf MCP config:

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

</details>

<details> <summary><b>VS Code (Copilot)</b></summary>

Add to .vscode/mcp.json:

{
  "servers": {
    "codewiki-mcp": {
      "command": "npx",
      "args": ["-y", "codewiki-mcp@latest"]
    }
  }
}

</details>

<details> <summary><b>Local development</b></summary>

{
  "mcpServers": {
    "codewiki-mcp": {
      "command": "node",
      "args": ["/path/to/codewiki-mcp/dist/cli.js"]
    }
  }
}

</details>

---

πŸ’‘ 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.js
codewiki 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.

| 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

<details> <summary><b>βœ… Success β€” Search</b></summary>

{
  "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
  }
}

</details>

<details> <summary><b>βœ… Success β€” Fetch (pages mode)</b></summary>

{
  "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
  }
}

</details>

<details> <summary><b>βœ… Success β€” Ask</b></summary>

{
  "answer": "Fastify uses a plugin-based architecture where...",
  "meta": {
    "totalBytes": 8500,
    "totalElapsedMs": 2300
  }
}

</details>

<details> <summary><b>❌ Error Response</b></summary>

{
  "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

</details>

---

βš™οΈ 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:

| Tool | RPC ID | |------|:------:| | πŸ” Search | vyWDAf | | πŸ“„ Fetch | VSX6ub | | πŸ’¬ Ask | EgIxfe |

🧠 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

| Attempt | Delay | |:-------:|------:| | 0 | immediate | | 1 | 250ms | | 2 | 500ms | | 3 | 1000ms |

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:

| Variable | Default | Description | |----------|---------|-------------| | CODEWIKI_BASE_URL | https://codewiki.google | Base URL | | CODEWIKI_REQUEST_TIMEOUT | 30000 | Request timeout (ms) | | CODEWIKI_MAX_RETRIES | 3 | Max retries | | CODEWIKI_RETRY_DELAY | 250 | Base 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=60000
CODEWIKI_MAX_RETRIES=5
GITHUB_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

<details> <summary><b>Permission Denied</b></summary>

chmod +x ./node_modules/.bin/codewiki-mcp

</details>

<details> <summary><b>Connection Refused (HTTP/SSE)</b></summary>

# Check if port is in use
lsof -i :3000

</details>

<details> <summary><b>Timeout Errors</b></summary>

For large repositories, increase the timeout:

CODEWIKI_REQUEST_TIMEOUT=60000 node dist/cli.js

</details>

<details> <summary><b>NLP Resolution Fails</b></summary>

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

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

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

</details>

---

πŸ§‘β€πŸ’» Development

npm run dev          # stdio with tsx
npm run dev:http     # HTTP with tsx
npm run dev:sse      # SSE with tsx
npm run typecheck    # type check
npm run test         # run tests
npm run test:watch   # tests in watch mode
npm 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

See related servers & alternatives β†’

Related MCP servers

Browse all β†’

Related guides

Hand-picked reading to help you choose and use Search servers.