Skip to main content
Glama

Touhou Wiki Plugin (touhou-wiki)

Zero-dependency Antigravity Plugin, Model Context Protocol (MCP) server, Antigravity Skill, and CLI for live HTTP/2 queries against Touhou Wiki.

Built on native Node.js (node:http2, node >= 18) with zero npm dependencies, balanced-brace MediaWiki Infobox extraction, Touhou Wiki template unwrapping ({{ruby-ja}}, {{lang}}, {{H:title}}, {{nihongo}}), and TTL caching.


Features

  • 7 Live MCP Tools (touhou_wiki_*) covering full-text & title search, structured Infobox + article fetching, TOC inspection, section-level extraction, category browsing, subpage discovery, and image URL/dimension resolution.

  • 1 MCP Resource (touhou-wiki://guide/categories) exposing canonical Touhou Wiki categories and official game (TH01–TH20) / print-work abbreviations.

  • Antigravity Skill (skills/touhou-wiki/SKILL.md) guiding agents to inspect Table of Contents first, fetch targeted sections, verify canon vs. doujin categories, and cite en.touhouwiki.net URLs.

  • Standalone CLI (scripts/touhou-wiki-cli.mjs) for terminal scripts or non-MCP environments.


Related MCP server: MediaWiki MCP Server

Installation

Install directly from GitHub:

agy plugin install https://github.com/Remilya/Touhou-mcp

Or validate and install from a local clone:

git clone https://github.com/Remilya/Touhou-mcp.git
agy plugin validate --strict ./Touhou-mcp
agy plugin install ./Touhou-mcp

2. Manual Global Plugin Install (Antigravity App / IDE)

Clone or copy this repository into your global Antigravity plugins directory:

  • macOS / Linux: ~/.gemini/config/plugins/touhou-wiki

  • Windows: %USERPROFILE%\.gemini\config\plugins\touhou-wiki

Then open Customizations in Antigravity to verify Touhou Wiki appears with its bundled MCP server and touhou-wiki skill.

3. Standalone MCP Server Only (Claude Desktop / Cursor / Windsurf / Custom mcp_config.json)

Point any MCP client at scripts/touhou-wiki-mcp.mjs using Node.js 18+:

{
  "mcpServers": {
    "touhou-wiki": {
      "command": "node",
      "args": ["/path/to/Touhou-mcp/scripts/touhou-wiki-mcp.mjs"]
    }
  }
}

Exposed MCP Tools

Tool Name

Purpose

Key Arguments

touhou_wiki_search

Combined title (opensearch) and full-text MediaWiki search (ns=0).

query, limit, include_subpages

touhou_wiki_get_page

Fetch structured Infobox, kanji/romaji metadata, primary image URL, categories, TOC, and cleaned text.

title, max_chars, include_raw_wikitext, resolve_image

touhou_wiki_get_sections

Retrieve article Table of Contents (section indices, levels, titles, anchors).

title

touhou_wiki_get_section

Fetch a single section by numeric index ("0" for Lead) or heading name ("Personality").

title, section, max_chars, include_raw_wikitext

touhou_wiki_list_category

Browse pages or subcategories in a Category:... with continue_token pagination.

category, type, limit, continue_token

touhou_wiki_list_subpages

List <Title>/... subpages (e.g., Perfect Memento in Strict Sense).

title, limit

touhou_wiki_get_image_info

Resolve direct image URLs, dimensions, and MIME types for File:... names or an article's images.

files, page, limit

Exposed MCP Resource

URI

MIME Type

Contents

touhou-wiki://guide/categories

application/json

Canonical Touhou Wiki categories plus TH01–TH20 and print-work abbreviations.


Standalone CLI Usage

node scripts/touhou-wiki-cli.mjs --help
node scripts/touhou-wiki-cli.mjs search "Hakurei Shrine" --limit 5
node scripts/touhou-wiki-cli.mjs page "Reimu Hakurei" --max-chars 3000
node scripts/touhou-wiki-cli.mjs sections "Embodiment of Scarlet Devil"
node scripts/touhou-wiki-cli.mjs section "Reimu Hakurei" "Personality"
node scripts/touhou-wiki-cli.mjs category "Locations" --type articles --limit 25
node scripts/touhou-wiki-cli.mjs subpages "Perfect Memento in Strict Sense" --limit 15
node scripts/touhou-wiki-cli.mjs images --files "File:Th20Reimu.png"

Local Verification & Testing

Run the offline unit tests (wikitext unwrapping, infobox extraction, tool schemas, resource checks):

npm test

Run the full live HTTP/2 integration suite against https://en.touhouwiki.net:

npm run test:live

License & Attribution

  • Plugin code, MCP server, CLI, and skill documentation are licensed under the MIT License.

  • Article text and media retrieved at runtime originate from Touhou Wiki (en.touhouwiki.net) and remain subject to its respective content licenses (including CC BY-SA where applicable). Touhou Project is created by ZUN / Team Shanghai Alice.

Available Tools

7 tools
touhou_wiki_get_image_infoA

Resolve direct image URLs, MIME types, and pixel dimensions for specific File:... names or all images embedded in a Touhou Wiki article.

Inputs: page, files, limit.

touhou_wiki_get_pageA

Fetch an article from en.touhouwiki.net with structured Infobox fields, Japanese kanji/romaji metadata, primary image URL, categories, section TOC, and cleaned article text.

Inputs: title (required), max_chars, resolve_image, include_raw_wikitext.

touhou_wiki_get_sectionA

Fetch a single section of a Touhou Wiki article by numeric section index (e.g. "0" for Lead/Infobox, "1", "2") or by section heading name (e.g. "Personality", "Abilities").

Inputs: title (required), section (required), max_chars, include_raw_wikitext.

touhou_wiki_get_sectionsA

Retrieve the Table of Contents (section index numbers, hierarchy levels, titles, and anchors) for a Touhou Wiki article without loading its full body.

Inputs: title (required).

touhou_wiki_list_categoryB

List pages or subcategories in a Touhou Wiki Category (e.g. "Category:Characters", "Category:Locations", "Category:Official Games"), with pagination support.

Inputs: category (required), type, limit, continue_token.

touhou_wiki_list_subpagesA

List subpages under a Touhou Wiki article prefix (e.g. "Perfect Memento in Strict Sense", "Embodiment of Scarlet Devil", "Forbidden Scrollery").

Inputs: title (required), limit.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 7 tools

    Disambiguation4/5

    Each tool has a distinct scope: search vs. full-page fetch vs. TOC-only vs. single-section vs. category listing vs. subpage listing vs. image metadata. The only mild overlap is between get_page (which includes the TOC and full text) and get_sections/get_section, but the descriptions make the cost/granularity tradeoff explicit enough that an agent can choose correctly.

    Naming Consistency5/5

    All seven tools use the same touhou_wiki_ prefix followed by a consistent verb_noun pattern (search, get_page, get_sections, get_section, list_category, list_subpages, get_image_info) in snake_case. The singular/plural get_section vs get_sections pair is a deliberate and readable distinction rather than an inconsistency.

    Tool Count5/5

    Seven tools is a well-scoped surface for a wiki server: retrieval, navigation, and media resolution each get focused, non-redundant tools. No tool feels like filler and none of the obvious access patterns is split into unnecessary variants.

    Completeness4/5

    The surface covers search, page retrieval, section navigation, category browsing, subpage enumeration, and image resolution — the core read-only workflows for a MediaWiki domain. Minor gaps remain for link graph operations (what-links-here, external links) and site-wide listings like recent changes, which agents would have to work around.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables LLM clients to search, read, create, edit, and manage pages, files, categories, and revisions on any wiki running the MediaWiki software, with optional OAuth-authenticated write access. Also exposes extension-specific capabilities such as Wikibase entities and SPARQL queries, Semantic MediaWiki and Cargo queries, and NeoWiki knowledge-graph subjects.
      8 npm
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables LLM clients to read, search, create, edit, move, protect, and delete pages, upload files, and query wiki data across any number of configured wikis. It supports per-wiki defaults, OAuth authentication, and extension packs for Semantic MediaWiki, Wikibase, Cargo, Bucket, and NeoWiki.
      8 npm
      MIT