Token导航 LogoToken导航TokenDH.com
GitHub wiki MCP logo
开发工具未说明官方级别未说明来源级核验

GitHub wiki MCP

MCP Server

一个用于编程方式管理GitHub Wiki页面的MCP服务器,提供创建、读取、更新、删除和列出Wiki页面的功能。

工具数

5

提示词数

0

GitHub Stars

0

资源数

0
版本控制JavaScriptClaudeClaude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

andreahaku

提供方

andreahaku

最后核验

2026/5/17 20:21

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

GitHub Wiki MCP服务器

MCP(模型上下文协议)服务器,用于以编程方式管理GitHub wiki页面。

特性

此MCP服务器公开了以下工具:

  • write_wiki_page -创建或更新wiki页面
  • read_wiki_page -阅读维基页面的内容
  • append_to_wiki_page -将内容附加到现有页面
  • list_wiki_pages -列出存储库中的所有wiki页面
  • delete_wiki_page -删除wiki页面

安装

# Install dependencies
pnpm install

# Build the TypeScript project
pnpm build

配置

1.创建GitHub个人访问令牌

  1. 转到GitHub→ 设置→ 开发者设置→ 个人访问令牌→ 代币(经典)
  2. 点击“生成新令牌(经典)”
  3. 选择 repo 范围(访问存储库wiki)
  4. 复制生成的令牌

2.将MCP服务器添加到Claude Desktop配置中

编辑配置文件:

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

添加此配置:

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

替换 /absolute/path/to/github_wiki_mcp 带有项目目录的实际路径。

3.重新启动克劳德桌面

关闭并重新打开Claude Desktop以加载新的MCP服务器。

用法

示例:编写一个关于架构的wiki页面

你可以告诉克劳德:

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.

克劳德将:

  1. 使用 code_analysis 获取架构信息的工具
  2. 生成结构化的降价内容
  3. 使用 write_wiki_page 在GitHub上创建页面

直接示例:创建wiki页面

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

示例:读取现有页面

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

示例:更新现有页面

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

工具参考

write_wiki_page

创建或完全覆盖wiki页面。

参数:

  • owner (string,必填):GitHub用户名或组织
  • repo (字符串,必填):存储库名称
  • token (string,必填):GitHub个人访问令牌
  • pageName (字符串,必填):页面名称(例如“架构”)
  • content (string,必填):页面的Markdown内容
  • commitMessage (字符串,可选):自定义提交消息

输出:

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

read_wiki_page

读取现有wiki页面的内容。

参数:

  • owner, repo, token:与上述相同
  • pageName (string,必填):要读取的页面的名称

输出:

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

append_to_wiki_page

将内容附加到现有页面的末尾(如果不存在,则创建内容)。

参数:

  • owner, repo, token:与上述相同
  • pageName (字符串,必填):页面名称
  • content (string,必填):要附加的内容
  • commitMessage (字符串,可选):提交消息

list_wiki_pages

列出存储库中的所有wiki页面。

参数:

  • owner, repo, token:与上述相同

输出:

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

delete_wiki_page

删除wiki页面。

参数:

  • owner, repo, token:与上述相同
  • pageName (string,必填):要删除的页面的名称
  • commitMessage (字符串,可选):提交消息

运作原理

服务器使用wiki Git存储库(.wiki.git)而不是GitHub的REST API:

  1. 将wiki存储库克隆到临时目录
  2. 执行请求的操作(创建/修改/删除 .md 文件)
  3. 承诺并推动变革
  4. 清理临时目录

这种方法:

  • 比用于wiki的REST API更可靠
  • 支持所有标准Git操作
  • 没有内容大小限制
  • 适用于私有存储库(如果令牌具有权限)

与其他MCP集成

随着 code-analysis-context-mcp

您可以将此服务器与您的 code-analysis-context-mcp 致:

  1. 自动分析代码库
  2. 提取文档、架构、API
  3. 自动编写更新的wiki页面

工作流程示例:

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

克劳德将使用:

  • code_analysis.get_repository_architecture → 分析
  • github_wiki.write_wiki_page → 架构页面
  • github_wiki.write_wiki_page → API页面
  • github_wiki.write_wiki_page → 数据库页

安全

  • 永远不要分享你的GitHub代币:令牌可以完全访问存储库
  • 使用范围最小的令牌:只有 repo 必要的
  • 考虑使用过期令牌:适用于生产环境
  • 不要提交令牌:确保仅在运行时提供

发展

# Watch mode during development
pnpm dev

# Production build
pnpm build

# Local installation for testing
pnpm link

故障排除

服务器未连接

  • 验证中的路径 claude_desktop_config.json 绝对正确
  • 检查一下 pnpm build 已执行
  • 验证克劳德桌面日志

认证错误

  • 验证GitHub令牌是否有效
  • 检查令牌是否具有 repo 范围
  • 确保存储库已启用wiki(设置→ Wiki)

Wiki不存在

GitHub仅在手动创建第一页时自动创建wiki存储库。如果存储库从未有过wiki:

  1. 首选 https://github.com/owner/repo/wiki
  2. 点击“创建第一页”
  3. 创建测试页面
  4. 现在MCP服务器将能够访问wiki

许可证

麻省理工学院

目录标签

目录标签

版本控制JavaScriptClaudeGitHubWiki管理本地部署自动化文档代码文档开发工具

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

token

工具数量(toolCount,工具数)

5

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明token部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP