github-wiki-mcp

github-wiki-mcp

MCP server for managing GitHub wiki pages programmatically, enabling create, read, update, delete, and list operations via git cloning and pushing.

Category
访问服务器

README

GitHub Wiki MCP Server

MCP (Model Context Protocol) server for managing GitHub wiki pages programmatically.

Features

This MCP server exposes the following tools:

  • write_wiki_page - Create or update a wiki page
  • read_wiki_page - Read the content of a wiki page
  • append_to_wiki_page - Append content to an existing page
  • list_wiki_pages - List all wiki pages in the repository
  • delete_wiki_page - Delete a wiki page

Installation

# Install dependencies
pnpm install

# Build the TypeScript project
pnpm build

Configuration

1. Create a GitHub Personal Access Token

  1. Go to GitHub → Settings → Developer settings → Personal access tokens → Tokens (classic)
  2. Click "Generate new token (classic)"
  3. Select the repo scope (to access repository wikis)
  4. Copy the generated token

2. Add the MCP server to Claude Desktop configuration

Edit the configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Add this configuration:

{
  "mcpServers": {
    "github-wiki": {
      "command": "node",
      "args": [
        "/absolute/path/to/github_wiki_mcp/dist/index.js"
      ]
    }
  }
}

Replace /absolute/path/to/github_wiki_mcp with the actual path to the project directory.

3. Restart Claude Desktop

Close and reopen Claude Desktop to load the new MCP server.

Usage

Example: Write a wiki page about architecture

You can tell Claude:

Analyze the codebase using code-analysis-context-mcp to extract
all information about the repository architecture and write
a dedicated wiki page on GitHub called Architecture.

Claude will:

  1. Use the code_analysis tool to get architecture information
  2. Generate structured markdown content
  3. Use write_wiki_page to create the page on GitHub

Direct Example: Create a wiki page

Create a wiki page called "API Documentation" on the repository
myusername/myrepo with this content:

# API Documentation

## Main Endpoints

- GET /api/users
- POST /api/users
- DELETE /api/users/:id

Example: Read an existing page

Read the content of the wiki page "Architecture" from the repository
myusername/myrepo

Example: Update an existing page

Add a "Deployment" section to the wiki page "Architecture"
with deployment instructions

Tool Reference

write_wiki_page

Creates or completely overwrites a wiki page.

Parameters:

  • owner (string, required): GitHub username or organization
  • repo (string, required): Repository name
  • token (string, required): GitHub personal access token
  • pageName (string, required): Page name (e.g., "Architecture")
  • content (string, required): Markdown content of the page
  • commitMessage (string, optional): Custom commit message

Output:

{
  "success": true,
  "page": "Architecture.md",
  "url": "https://github.com/owner/repo/wiki/Architecture"
}

read_wiki_page

Reads the content of an existing wiki page.

Parameters:

  • owner, repo, token: Same as above
  • pageName (string, required): Name of the page to read

Output:

{
  "success": true,
  "page": "Architecture.md",
  "content": "# Architecture\n\n..."
}

append_to_wiki_page

Appends content to the end of an existing page (or creates it if it doesn't exist).

Parameters:

  • owner, repo, token: Same as above
  • pageName (string, required): Page name
  • content (string, required): Content to append
  • commitMessage (string, optional): Commit message

list_wiki_pages

Lists all wiki pages in the repository.

Parameters:

  • owner, repo, token: Same as above

Output:

[
  {
    "name": "Architecture",
    "path": "Architecture.md",
    "size": 2048
  },
  {
    "name": "API-Documentation",
    "path": "API-Documentation.md",
    "size": 1024
  }
]

delete_wiki_page

Deletes a wiki page.

Parameters:

  • owner, repo, token: Same as above
  • pageName (string, required): Name of the page to delete
  • commitMessage (string, optional): Commit message

How It Works

The server uses the wiki Git repository (.wiki.git) instead of GitHub's REST API:

  1. Clones the wiki repository to a temporary directory
  2. Performs the requested operations (create/modify/delete .md files)
  3. Commits and pushes the changes
  4. Cleans up the temporary directory

This approach:

  • Is more reliable than REST APIs for wikis
  • Supports all standard Git operations
  • Has no content size limitations
  • Works with private repositories (if the token has permissions)

Integration with Other MCPs

With code-analysis-context-mcp

You can combine this server with your code-analysis-context-mcp to:

  1. Automatically analyze the codebase
  2. Extract documentation, architecture, APIs
  3. Automatically write updated wiki pages

Example workflow:

Analyze the repository using code-analysis-context-mcp,
extract the complete architecture and create three wiki pages:
1. Architecture - overall project structure
2. API - endpoint documentation
3. Database - schema and relationships

Claude will use:

  • code_analysis.get_repository_architecture → analysis
  • github_wiki.write_wiki_page → Architecture page
  • github_wiki.write_wiki_page → API page
  • github_wiki.write_wiki_page → Database page

Security

  • Never share your GitHub token: The token has full access to repositories
  • Use tokens with minimum scope: Only repo is necessary
  • Consider using expiring tokens: For production environments
  • Don't commit the token: Ensure it's only provided at runtime

Development

# Watch mode during development
pnpm dev

# Production build
pnpm build

# Local installation for testing
pnpm link

Troubleshooting

Server doesn't connect

  • Verify that the path in claude_desktop_config.json is absolute and correct
  • Check that pnpm build has been executed
  • Verify Claude Desktop logs

Authentication error

  • Verify that the GitHub token is valid
  • Check that the token has the repo scope
  • Ensure the repository has wiki enabled (Settings → Wiki)

Wiki doesn't exist

GitHub automatically creates the wiki repository only when the first page is created manually. If the repository has never had a wiki:

  1. Go to https://github.com/owner/repo/wiki
  2. Click "Create the first page"
  3. Create a test page
  4. Now the MCP server will be able to access the wiki

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选