Skip to main content

MCP server for Moegirl Wiki (萌娘百科) — search entries and fetch page summaries via the MediaWiki API.

Project description

mcp-server-moegirl-wiki

PyPI version License: MIT

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 repo yokami618/wiki_mcp returns 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 using prop=extracts instead.
  • Intro section only. get_page returns the plain-text introduction, not the full page. This is enough for most "what is X" lookups; for deeper content, follow the returned url.
  • 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=searchopensearch fallback strategy was originally proven.

License

MIT

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

mcp_server_moegirl_wiki-0.1.0.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_server_moegirl_wiki-0.1.0-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

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

Hashes for mcp_server_moegirl_wiki-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8b7286bb092d760ab979081c40a089e65a231bd4857eb95535c784ba7566c3cf
MD5 ae9e0f8b07122c91ec0723b6c9e317e2
BLAKE2b-256 116258a9721a6fe87396a519a006a7c86603914b049257c9519bc17eb7804226

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_server_moegirl_wiki-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_server_moegirl_wiki-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6fd12ef698b3043a77e672b66a4ad4456d3b5f28905f1aa2527746875a234923
MD5 79eae699b1d2dca95664755a74895224
BLAKE2b-256 4b7ae9ade156d08ecc891ba778b942e5428428899d752b9535424743057ee111

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page