bwiki-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@bwiki-mcp 编辑Main Page页面,内容添加'==新章节==\n这是新内容',摘要写'添加新章节'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
BWIKI MCP Server
专为 BWIKI 编辑优化的 MCP (Model Context Protocol) 服务器。基于 Playwright 构建,自动处理 CodeMirror 编辑器,提供语义化的 BWIKI 操作工具。
✨ 特性
🎯 BWIKI 专用工具 - 13 个语义化工具,专为 BWIKI 操作设计
🔧 自动处理 CodeMirror - 无需手动处理编辑器类型判断
📁 智能分类管理 - 自动插入到正确位置,避免重复
🔐 持久化登录 - 支持浏览器数据目录保存登录状态
🌐 跨平台 - 支持 Windows、macOS、Linux
Related MCP server: mcp-mediawiki-crunchtools
📦 安装
# 克隆仓库
git clone https://github.com/你的用户名/bwiki-mcp.git
cd bwiki-mcp
# 安装依赖
npm install
# 构建
npm run build⚙️ 配置
环境变量
变量名 | 描述 | 默认值 |
| 浏览器用户数据目录(持久化登录) | 无 |
| 无头模式 |
|
| BWIKI 基础 URL |
|
Trae IDE / Claude Desktop 配置
在 MCP 配置文件中添加:
{
"mcpServers": {
"bwiki-mcp": {
"command": "node",
"args": ["/path/to/bwiki-mcp/dist/cli.js"],
"env": {
"BWIKI_USER_DATA_DIR": "/path/to/bwiki-mcp/browser-data",
"BWIKI_BASE_URL": "https://wiki.biligame.com/你的wiki名称"
}
}
}
}🛠️ 可用工具
工具名称 | 功能描述 |
| 导航到 BWIKI 页面 |
| 编辑页面内容(自动处理 CodeMirror) |
| 为页面添加分类标记 |
| 获取页面 Wiki 源码 |
| 获取页面分类列表 |
| 获取文件信息 |
| 点击页面元素 |
| 执行 JavaScript 代码 |
| 截取页面截图 |
| 获取页面 HTML 快照 |
| 获取当前 URL |
| 等待元素出现 |
| 在输入框中输入文本 |
📖 使用示例
编辑页面
// 使用 bwiki_edit_page 工具
{
"pageName": "Main Page",
"content": "== 新章节 ==\n这是新内容",
"summary": "添加新章节"
}添加分类
// 使用 bwiki_add_category 工具
{
"pageName": "文件:Example.png",
"category": "游戏UI组件",
"summary": "添加分类标记"
}获取页面内容
// 使用 bwiki_get_content 工具
{
"pageName": "User:用户名/Sandbox"
}🏗️ 项目结构
bwiki-mcp/
├── src/
│ ├── index.ts # MCP 服务器主入口
│ ├── cli.ts # 命令行入口
│ └── tools/
│ └── bwiki-tools.ts # BWIKI 专用工具实现
├── dist/ # 编译输出
├── package.json
├── tsconfig.json
└── README.md🔧 开发
# 开发模式(自动编译)
npm run dev
# 构建
npm run build⚠️ 安全提示
browser-data/ 目录包含浏览器登录状态和 Cookies,不要分享给他人!
首次使用时:
创建
browser-data目录运行工具时会打开浏览器窗口
手动登录 BWIKI
登录状态会自动保存
📄 许可证
🙏 致谢
Microsoft Playwright MCP - 浏览器自动化基础
Model Context Protocol - MCP 协议规范
Available Tools
13 toolsbwiki_add_categoryA
为BWIKI页面添加分类标记。智能插入到正确位置,避免重复。
Inputs: category (required), pageName (required), summary.
bwiki_clickC
在BWIKI页面上点击元素。
Inputs: selector (required), waitFor.
bwiki_edit_pageB
编辑BWIKI页面内容。自动处理CodeMirror编辑器,支持追加模式。
Inputs: content (required), pageName (required), append, summary.
bwiki_evaluateA
在BWIKI页面上执行JavaScript代码。用于高级操作如直接操作CodeMirror。
Inputs: code (required).
bwiki_get_categoriesA
获取BWIKI页面已有的分类列表。
Inputs: pageName (required).
bwiki_get_contentA
获取BWIKI页面的Wiki源码内容。
Inputs: pageName (required).
bwiki_get_file_infoA
获取BWIKI文件信息,包括URL、描述和分类。
Inputs: fileName (required).
bwiki_get_urlA
获取当前页面URL。
Inputs: no named parameters.
bwiki_screenshotC
截取BWIKI页面截图。
Inputs: fullPage, savePath, selector.
bwiki_snapshotA
获取BWIKI页面的HTML快照,用于元素定位。
Inputs: no named parameters.
bwiki_typeC
在输入框中输入文本。
Inputs: text (required), selector (required), clear.
bwiki_wait_for_selectorB
等待特定元素出现在页面上。
Inputs: selector (required), timeout.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Each tool has a clear, distinct purpose: navigation, content retrieval/editing, category management, file info, and browser interaction primitives. The only potentially confusing pair is snapshot vs. screenshot, but the descriptions clearly distinguish HTML source from image capture.
All tools share the 'bwiki_' prefix and follow a verb-based naming pattern. Getter functions use 'get_<noun>', while actions are single verbs like 'click', 'type', 'evaluate', 'navigate'. This makes tool names predictable and easy to remember.
13 tools is well-scoped for a wiki automation server, covering content operations, category management, file lookup, and page interaction. It is neither too sparse nor overloaded, with each tool earning its place.
The surface covers the core wiki editing workflow: navigate, read, edit, add categories, and get file info. Browser automation tools (click, type, evaluate, wait, screenshot) enable advanced interactions. Missing page creation/deletion may be a minor gap, but edit_page likely handles page creation and the absence of delete is not critical for typical wiki editing.
Related MCP Connectors
MCP server for developer documentation, generated by doc2mcp.
MCP server for developers documentation, generated by doc2mcp.
MCP server for doc2mcp documentation, generated by doc2mcp.
MCP server for skill documentation, generated by doc2mcp.
Related MCP Servers
- AlicenseAqualityDmaintenanceThis MCP server provides complete MediaWiki markup syntax documentation by dynamically fetching and consolidating information from official MediaWiki help pages. It enables LLMs to access up-to-date and comprehensive MediaWiki syntax information.1MIT
- AlicenseBqualityBmaintenanceA secure MCP server for interacting with MediaWiki instances, allowing users to search, read, create, and manage wiki content like pages, categories, and files. It supports both public and private wikis with comprehensive authentication for full read and write operations.19AGPL 3.0
- AlicenseAqualityAmaintenanceMCP server for MediaWiki wikis. Search, read, edit, and manage wiki content from AI assistants. Includes formatting, link checking, revision history, and markdown conversion.4323MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables full management of WikiJS instances, supporting operations like page creation, searching, and updating. It also provides tools for knowledge graph exploration, content summarization, and retrieval of wiki statistics.8 npmMIT