MCP server for Moegirl Wiki (萌娘百科) — search entries and fetch page summaries via the MediaWiki API.
Project description
mcp-server-moegirl-wiki
Python implementation of an MCP server for 萌娘百科 (Moegirl Wiki), exposing two tools to LLM agents: search Moegirl entries and fetch page summaries via the public MediaWiki API.
Drop-in replacement for the npm package
moegirl-wiki-mcp(which is currently abandoned).
Why
The original npm package moegirl-wiki-mcp is abandonware:
- The author's GitHub account is gone (
yokami618); the source repoyokami618/wiki_mcpreturns 404. - Last release was December 2025.
- It uses two MediaWiki APIs that no longer work reliably on Moegirl Wiki:
action=parse— now blocked for anonymous users (action-notallowed).list=search(full-text index) — near-zero hit rate on character/work pages.
This Python implementation uses APIs that have been verified to work as of 2026:
| Tool | Strategy |
|---|---|
search_moegirl |
generator=search first (rich results) → falls back to opensearch (high title-match hit rate) on empty result |
get_page |
query+prop=extracts+info with redirects=1, exintro=1, explaintext=1 |
Tool names and parameter shapes match the npm package, so prompts and configurations work unchanged after switching the binary.
Install
# Recommended — uv (run without installing globally)
uvx mcp-server-moegirl-wiki
# Alternative — pipx
pipx run mcp-server-moegirl-wiki
# Alternative — pip
pip install mcp-server-moegirl-wiki
mcp-server-moegirl-wiki
Tools
search_moegirl
Search for entries on Moegirl Wiki.
| Parameter | Type | Default | Description |
|---|---|---|---|
keyword |
string | required | Search keyword |
limit |
integer | 5 |
Maximum number of results |
Returns:
{
"results": [
{"title": "丰川祥子", "url": "https://mzh.moegirl.org.cn/丰川祥子", "snippet": "..."},
{"title": "丰川祥子(明日方舟)", "url": "...", "snippet": ""}
],
"count": 2
}
get_page
Fetch the introductory plain-text summary of a wiki page. Auto-follows redirects.
| Parameter | Type | Default | Description |
|---|---|---|---|
title |
string | required | Page title |
max_length |
integer | 1500 |
Maximum characters returned in summary |
Returns on success:
{
"title": "三角初华",
"summary": "三角初华(日语:三角(みすみ) 初華(ういか))是由日本娱乐公司Bushiroad策划的次世代少女乐队企划...",
"url": "https://mzh.moegirl.org.cn/三角初华",
"page_id": 570366
}
On failure:
{"error": "页面不存在", "title": "..."}
MCP client configuration
Claude Desktop
Edit claude_desktop_config.json (~/Library/Application Support/Claude/ on macOS, %APPDATA%/Claude/ on Windows):
{
"mcpServers": {
"moegirl-wiki": {
"command": "uvx",
"args": ["mcp-server-moegirl-wiki"]
}
}
}
MaiBot
In config/bot_config.toml:
[mcp]
enable = true
servers = [
{name = "moegirl", enabled = true, transport = "stdio",
command = "uvx", args = ["mcp-server-moegirl-wiki"],
env = {}, url = "", headers = {},
http_timeout_seconds = 30.0, read_timeout_seconds = 300.0,
authorization = {mode = "none", bearer_token = ""}},
]
If uvx is not on PATH, replace command/args with:
command = "pipx", args = ["run", "mcp-server-moegirl-wiki"]
…or any path to a Python interpreter that has the package installed:
command = "/path/to/venv/bin/mcp-server-moegirl-wiki", args = []
Development
git clone https://github.com/XXXxx7258/mcp-server-moegirl-wiki
cd mcp-server-moegirl-wiki
uv sync --group dev
uv run mcp-server-moegirl-wiki # blocks reading stdin → ready
# Network smoke tests (hit the live Moegirl API)
uv run pytest -m network
# Lint
uv run ruff check .
Known limitations
- Anonymous-only. No login support. Some advanced API actions (
action=parse, full-page wikitext) are blocked by Moegirl for anonymous users; we work around this by usingprop=extractsinstead. - Intro section only.
get_pagereturns the plain-text introduction, not the full page. This is enough for most "what is X" lookups; for deeper content, follow the returnedurl. - Mirror. Uses
mzh.moegirl.org.cn(the static/mobile mirror) which has been more stable in our tests than the main site.
Credits
API client logic adapted from MaiBot's moegirl_wiki_plugin, where the generator=search → opensearch fallback strategy was originally proven.
License
Project details
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 mcp_server_moegirl_wiki-0.1.0.tar.gz.
File metadata
- Download URL: mcp_server_moegirl_wiki-0.1.0.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b7286bb092d760ab979081c40a089e65a231bd4857eb95535c784ba7566c3cf
|
|
| MD5 |
ae9e0f8b07122c91ec0723b6c9e317e2
|
|
| BLAKE2b-256 |
116258a9721a6fe87396a519a006a7c86603914b049257c9519bc17eb7804226
|
Provenance
The following attestation bundles were made for mcp_server_moegirl_wiki-0.1.0.tar.gz:
Publisher:
publish.yml on XXXxx7258/mcp-server-moegirl-wiki
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_server_moegirl_wiki-0.1.0.tar.gz -
Subject digest:
8b7286bb092d760ab979081c40a089e65a231bd4857eb95535c784ba7566c3cf - Sigstore transparency entry: 1496769260
- Sigstore integration time:
-
Permalink:
XXXxx7258/mcp-server-moegirl-wiki@a8fa0698c8539ef37fe5d362556a8b0dcdf51a61 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/XXXxx7258
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a8fa0698c8539ef37fe5d362556a8b0dcdf51a61 -
Trigger Event:
push
-
Statement type:
File details
Details for the file mcp_server_moegirl_wiki-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mcp_server_moegirl_wiki-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6fd12ef698b3043a77e672b66a4ad4456d3b5f28905f1aa2527746875a234923
|
|
| MD5 |
79eae699b1d2dca95664755a74895224
|
|
| BLAKE2b-256 |
4b7ae9ade156d08ecc891ba778b942e5428428899d752b9535424743057ee111
|
Provenance
The following attestation bundles were made for mcp_server_moegirl_wiki-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on XXXxx7258/mcp-server-moegirl-wiki
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_server_moegirl_wiki-0.1.0-py3-none-any.whl -
Subject digest:
6fd12ef698b3043a77e672b66a4ad4456d3b5f28905f1aa2527746875a234923 - Sigstore transparency entry: 1496769484
- Sigstore integration time:
-
Permalink:
XXXxx7258/mcp-server-moegirl-wiki@a8fa0698c8539ef37fe5d362556a8b0dcdf51a61 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/XXXxx7258
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a8fa0698c8539ef37fe5d362556a8b0dcdf51a61 -
Trigger Event:
push
-
Statement type: