Genshin Bwiki MCP / 原神 Bwiki MCP
A read-only Python MCP server for searching and reading the community-maintained Genshin Bwiki. It wraps the site's public MediaWiki API and requires no account or API key.
这是一个只读 Python MCP server,用于检索和读取社区维护的原神 WIKI_BWIKI。它封装站点公开的 MediaWiki API,不需要账号或 API Key。
This project is an independent API client, not an official Bilibili or HoYoverse product. Wiki content remains subject to the source site's rules and rights notices.
本项目是独立 API 客户端,并非哔哩哔哩或米哈游官方产品。Wiki 内容仍受来源站点社区规则及权利声明约束。
Tools / 工具
| Tool | Description / 功能 |
|---|---|
search_pages |
Search by keyword and return titles, snippets, IDs, timestamps and source URLs. / 按关键词搜索页面。 |
get_page_summary |
Return bounded plain text derived from a rendered page. / 返回从渲染页面提取、长度受限的纯文本。 |
get_page |
Read bounded HTML and/or original wikitext by title or page ID. / 按标题或 ID 读取 HTML 和/或 wikitext。 |
site_info |
Check site identity, MediaWiki version, language and URLs. / 检查站点身份、版本、语言及 URL。 |
All tool responses are JSON strings with one of these envelopes:
{"ok": true, "data": {}}
{"ok": false, "error": "ValueError", "message": "..."}
JSON configuration / JSON 配置
Install uv, then import example.json into an MCP client that accepts the common mcpServers format. The included file points at this checkout and uses uvx --refresh --from so it can run before a PyPI release.
安装 uv,然后把 example.json 导入支持通用 mcpServers 格式的客户端。示例已经指向当前项目目录,并使用 uvx --refresh --from,因此不依赖预先发布到 PyPI。
For another machine, replace the path after --from with that machine's absolute project path. After a future PyPI release, the shorter configuration is:
换到其他机器时,请把 --from 后的路径改为项目的绝对路径。未来发布到 PyPI 后,可使用更短的配置:
{
"mcpServers": {
"genshin_bwiki": {
"command": "uvx",
"args": ["--refresh", "genshin-bwiki-mcp"]
}
}
}
Local development / 本地开发
uv sync
uv run pytest -q
uv run genshin-bwiki-mcp
uv build
The server uses stdio transport. Do not print debugging output to stdout while it is attached to an MCP client.
服务器使用 stdio 传输;连接 MCP 客户端时,请勿向 stdout 输出调试信息。
API behavior / API 行为
- Base endpoint / 基础端点:
https://wiki.biligame.com/ys/api.php - Requests are anonymous, read-only, time-limited, and carry an identifying user agent. / 请求匿名、只读、带超时和可识别 User-Agent。
- Output size limits reduce accidental context flooding. / 输出长度限制可避免意外占满模型上下文。
- Bwiki does not return content through the usual MediaWiki Extracts response, so
get_page_summaryconvertsaction=parseHTML locally. / Bwiki 未通过常见 Extracts 响应返回正文,因此摘要工具会在本地转换action=parseHTML。
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file genshin_bwiki_mcp-0.1.0.tar.gz.
File metadata
- Download URL: genshin_bwiki_mcp-0.1.0.tar.gz
- Upload date:
- Size: 75.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25bf097e6d6071128a26afd636a5cb18852bc8d1fe1d87e788f9502e9141422a
|
|
| MD5 |
a568a2b88ed4fb4edd654b7e19d7142a
|
|
| BLAKE2b-256 |
4b313f35d6cc78b58885f96d434b3df5c2ea55d95d032bc7916cc568cef0c6fc
|
File details
Details for the file genshin_bwiki_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: genshin_bwiki_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53b7cd477cf810abed505b017a0b0cb64642d2d9ac521aa35ad979d296016e82
|
|
| MD5 |
4a1480e5fa206c6d8dd2c7c90ace61c2
|
|
| BLAKE2b-256 |
18e2b42e3f4cbd21c9f9235fcda37589c55573fe901939b60bc0f9e73b4d7ab6
|