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

English | 简体中文

MCP server for 萌娘百科 (Moegirl Wiki). Two tools: search entries and fetch a page's intro.

Install

uvx mcp-server-moegirl-wiki         # recommended
pipx run mcp-server-moegirl-wiki
pip install mcp-server-moegirl-wiki

Tools

search_moegirl(keyword: str, limit: int = 5)

Returns {"results": [{"title", "url", "snippet"}, ...], "count": int}.

get_page(title: str, max_length: int = 6250)

Returns {"title", "content", "url", "page_id"} — full plain-text rendering of the page (all sections, templates expanded, links resolved). Auto-follows redirects. content is truncated to max_length characters; default 6250 covers a typical character page in full, pass larger (e.g. 20000) for very long pages.

Environment variables

Variable Default Description
MOEGIRL_MAX_LENGTH 6250 Default max_length for get_page when the caller does not specify one. Useful for tuning per-deployment without forking the package. Invalid/non-positive values are ignored with a warning.

Configuration

Claude Desktop

{
  "mcpServers": {
    "moegirl-wiki": {
      "command": "uvx",
      "args": ["mcp-server-moegirl-wiki"]
    }
  }
}

MaiBot (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 = ""}},
]

Development

git clone https://github.com/XXXxx7258/mcp-server-moegirl-wiki
cd mcp-server-moegirl-wiki
uv sync --group dev
uv run pytest -m network
uv run ruff check .

Limitations

  • get_page returns rendered plain text (templates expanded, links resolved). Raw wikitext (prop=revisions, action=parse, ?action=raw, Special:Export) is blocked by Moegirl Wiki's site-wide ACL — empirically verified that bot-password login does not unlock it; only sysop/staff groups can call these actions.
  • Uses the mzh.moegirl.org.cn mirror.

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.2.2.tar.gz (8.8 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.2.2-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file mcp_server_moegirl_wiki-0.2.2.tar.gz.

File metadata

  • Download URL: mcp_server_moegirl_wiki-0.2.2.tar.gz
  • Upload date:
  • Size: 8.8 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.2.2.tar.gz
Algorithm Hash digest
SHA256 4703c7cc95105cc6479339c0b37d7d753134889b46796acc490224f70cdfab67
MD5 e1d0b6ec732dda7d60e4a68f1386a099
BLAKE2b-256 dca55ed01bc216fefeff9903d22976d46f714115184b52a9ace1b82acc693f3a

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_server_moegirl_wiki-0.2.2.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.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_server_moegirl_wiki-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5b4c0087615c26d76f2a83a273805275d08f73b3a06b0169cc57f525e19eccd5
MD5 33f724e3fe1becbca903f7b3324c8791
BLAKE2b-256 4f6741aade81746de3788af228748529c86c515bb6c427e6618d9f0794ce65cf

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_server_moegirl_wiki-0.2.2-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