mcp-onepiece
An MCP server that gives MCP clients structured, spoiler-safe access to the One Piece Wiki — articles, infoboxes, chapters, episodes and arcs.
Search the wiki full-text with
search_wiki(returns titles and URLs).Read articles as clean text with
get_page, optionally a single section; browse section headings withget_page_sectionsand character tabs withlist_subpages.Get structured data: infobox label → value pairs (
get_infobox) such as bounty, Devil Fruit, debut; and an article's categories (get_page_categories) like crews, fruit types, Haki users.Browse categories with
get_category_members, paginated.Look up manga and anime:
get_chapter(title, volume, release date, Jump issue, adapting episodes, arc, summary) andget_episode(title, air date, season, opening, adapted chapters, summary; empty chapters = filler).Explore story arcs:
get_arcfor saga, order, chapter/episode/volume ranges and neighbours (accepts loose names like "wano");list_arcsfor all canon arcs grouped by saga, or the arc containing a given chapter.Control spoilers:
set_spoiler_limitrecords the last chapter read (or last arc finished) and is remembered across sessions; later chapters, episodes, arcs and later-arc article sections are then withheld.Check the limit with
get_spoiler_limit(ornullif none set).Works with any MCP client (Claude, Cursor, VS Code, Windsurf, Codex, Gemini CLI) over stdio via
npx.
Provides structured access to One Piece Wiki articles, infoboxes, manga chapters, anime episodes, and story arcs, with spoiler limit filtering, through the One Piece Wiki.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-onepiece Which chapters are in the Wano arc?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
One Piece Wiki MCP Server
@wlahsib/mcp-onepiece on npm
An MCP server for the One Piece Wiki. It gives any MCP client (Claude, Cursor, VS Code, Windsurf, Codex, Gemini CLI and others) structured access to articles, infoboxes, manga chapters, anime episodes and story arcs, plus a spoiler limit that keeps answers within what you've read.
Generic MediaWiki servers can fetch pages from this wiki too. This one knows how the One Piece Wiki is laid out, so it can return clean text instead of wikitext, read infobox fields as data, map chapters ↔ episodes ↔ arcs, and cut later-arc sections out of character histories.
Tools
Tool | What it does |
| Full-text search; returns titles and URLs. |
| Clean article text, optionally one |
| Section headings and indexes for |
| Character tabs such as |
| Infobox as label → value: bounty, Devil Fruit, affiliations, age, debut, voice actors… |
| The article's categories (crews, fruit type, Haki users…). |
| Members of a category, paginated. |
| Title, volume, release date, Jump issue, adapting episodes, arc and short summary. |
| Title, air date, season, opening, adapted chapters (empty = filler), the anime-only arc it belongs to ( |
| Saga, order, chapter/episode/volume ranges and neighbouring arcs. Accepts loose names ( |
| Every canon arc grouped by saga, or the arc containing a given |
| Anime-only (filler) arcs with episode ranges and the canon arc each airs after: "which episodes can I skip?". Standalone filler episodes inside canon arcs aren't listed; |
| The manga's cover-page serials (e.g. Buggy's Crew Adventure Chronicles) with saga, chapter range and, where adapted, episode range. |
| Set the last chapter read (or the last arc finished). It is remembered across sessions; |
The article tools take a title and follow redirects ("Zoro" → Roronoa Zoro). A title that differs from the
article's only in case ("roronoa zoro") resolves to it; a title with no article returns up to three suggested titles.
With a spoiler limit set, they withhold articles about subjects that debut past it (see below).
How the spoiler limit works
With a limit set (via set_spoiler_limit, or by default via ONEPIECE_SPOILER_CHAPTER):
get_chapter,get_arcandlist_arcswithhold anything that starts after the limit.get_episodeis judged by the chapters it adapts. Filler is judged by the canon arc it airs during or, when it airs between canon arcs, the one it airs after.list_filler_arcsleaves out anime-only arcs whose canon arc starts after the limit;list_cover_storiesleaves out serials whose first chapter is past it.get_page,get_page_sections,get_infobox,get_page_categoriesandlist_subpageswithhold articles whose subject first appears after the limit:Chapter NandEpisode Npages follow theget_chapterandget_episoderules, and canon arc pages (and saga pages made up only of later arcs) theget_arcrule.Anything else is judged by the Debut field of its infobox: the first chapter listed, or for anime-only subjects the first chapter of the canon arc the anime had reached by the debut episode. Subjects that debuted in a film or game, or have no infobox, are not withheld.
Subpages such as
Kaidou/Historyare judged by their base article.
get_pageremoves sections headed by a later arc or saga, which is how every character History page is organised.
It cannot filter later facts mentioned in the intros, infoboxes (e.g. a current bounty) or prose outside arc
headings of subjects that debuted earlier, and every affected response ends with a notice saying so.
search_wiki and get_category_members are not filtered.
The limit is remembered. set_spoiler_limit saves the new value, including turning the limit off, to a small JSON
state file (~/.config/mcp-onepiece/state.json by default; see ONEPIECE_STATE_FILE under
Configuration), and the server loads it at startup. A saved value wins over ONEPIECE_SPOILER_CHAPTER,
which only applies until you first set a limit. get_spoiler_limit reports the source: saved, environment,
session (set while saving is off or failed) or null when there is no limit. The file is read only at startup, so
servers running at the same time don't see each other's changes, and whichever saves last wins. If the file can't be
written, the limit still applies for the session and the tool response says it wasn't saved.
Related MCP server: osrs-wiki-mcp
Install
Requires Node.js 20 or newer. There is nothing to clone or build: MCP clients start the server with npx, which downloads
it from npm on first use.
Claude Code
claude mcp add -s user onepiece-wiki -- npx -y @wlahsib/mcp-onepieceClaude Desktop, Cursor, Windsurf, Gemini CLI
These all use the same mcpServers format. Add this to the client's config file:
Client | Config file |
Claude Desktop |
|
Cursor |
|
Windsurf |
|
Gemini CLI |
|
{
"mcpServers": {
"onepiece-wiki": {
"command": "npx",
"args": ["-y", "@wlahsib/mcp-onepiece"]
}
}
}VS Code (GitHub Copilot agent mode)
Add to .vscode/mcp.json in a workspace, or run MCP: Add Server from the command palette:
{
"servers": {
"onepiece-wiki": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@wlahsib/mcp-onepiece"]
}
}
}OpenAI Codex CLI
codex mcp add onepiece-wiki -- npx -y @wlahsib/mcp-onepieceAny other MCP client
The server speaks MCP over stdio. Point the client at the command npx -y @wlahsib/mcp-onepiece.
Setting a default spoiler limit
Pass ONEPIECE_SPOILER_CHAPTER in the client's environment settings, e.g. for the mcpServers format:
"onepiece-wiki": {
"command": "npx",
"args": ["-y", "@wlahsib/mcp-onepiece"],
"env": { "ONEPIECE_SPOILER_CHAPTER": "1000" }
}or claude mcp add -s user onepiece-wiki -e ONEPIECE_SPOILER_CHAPTER=1000 -- npx -y @wlahsib/mcp-onepiece.
You can also just tell the assistant how far you've read; it calls set_spoiler_limit, and that limit is remembered for
future sessions. Once a limit has been saved it takes precedence over ONEPIECE_SPOILER_CHAPTER.
Troubleshooting
spawn npx ENOENT: desktop apps launched from the Dock or Start menu may not see your shell'sPATH. Use the full path fromwhich npx(macOS/Linux) ascommand. On Windows, use"command": "cmd", "args": ["/c", "npx", "-y", "@wlahsib/mcp-onepiece"].Picking up a new version:
npxcaches packages; usenpx -y @wlahsib/mcp-onepiece@latestto force an update.
Running from source
git clone https://github.com/bishalw/mcp-onepiece.git && cd mcp-onepiece
npm install && npm run buildThen use node /absolute/path/to/mcp-onepiece/dist/index.js as the command in any of the configs above.
Configuration
All settings are optional environment variables.
Variable | Default | Meaning |
| unset | Default spoiler limit (last chapter read). Used only until a limit is saved with |
|
| Where the spoiler limit is remembered between sessions. |
|
| Wiki origin. |
|
| How long API responses are cached in memory. The arc catalog is kept for 24 hours. |
|
| Cache size bound (LRU). |
|
| Maximum simultaneous requests to the wiki. |
|
| Per-request timeout. |
|
|
|
Invalid values stop the server at startup with a message naming the variable.
Development
npm run dev # run from source with tsx
npm run check # typecheck + lint + tests
npm run build # compile to dist/
npm run inspect # open the MCP Inspector against dist/
npm run fixtures:record # re-record test fixtures from the live wikiReleasing
npm version patch # or minor / major; commits and tags
npm publish # prepublishOnly runs all checks and a fresh build first
git push --follow-tagsThe published package contains only dist/*.js, README.md and package.json. The server and the wiki User-Agent
both read their version from package.json.
Layout
src/
index.ts entry point: config, logging, stdio transport, shutdown
state.ts state file that remembers the spoiler limit between sessions
version.ts package name and version, read from package.json
server.ts createServer(): wires the client, domain services and tools
config.ts environment parsing and validation (zod)
wiki/ MediaWiki API client: cache, concurrency limit, timeouts, retries, title fallback
parsing/ HTML → text, infobox and range parsing (pure functions)
domain/ arcs catalog, filler arcs and cover stories, chapters/episodes, spoiler guard
tools/ MCP tool definitions, thin adapters over domain/
test/
unit/ parsing, cache, limiter, client, config, spoiler guard, filler/cover-story parsing
integration/ MCP client ↔ server over an in-memory transport, replaying fixtures; spoiler-limit persistence
support/ fixture record/replay, test harness, scenarios
fixtures/ recorded wiki API responses
scripts/
record-fixtures.tsTests and fixtures
Integration tests drive the real server through an MCP client, but the wiki is replaced by responses recorded in
test/fixtures. Tests never touch the network, and a request with no recorded fixture fails with a message telling you
to re-record. They also run with the state file turned off (persistence tests use temp directories), so they never
touch your saved spoiler limit. npm run fixtures:record runs every entry in test/support/scenarios.ts against the live wiki and
rewrites the fixtures. Do this after adding a scenario, or when the wiki's markup changes and you want to confirm the
parsers still work.
Design notes
Parsing rendered HTML instead of wikitext. Infobox values such as arc chapter ranges are computed by templates (
chapter = auto), so only the rendered page has them.Stable keys. Infobox fields are read by their
data-sourcetemplate parameter rather than by display label.Polite by default. Requests use a descriptive User-Agent, bounded concurrency, caching, and exponential backoff that honours
Retry-After.Errors the model can act on. Missing pages, unknown arcs and spoiler blocks are returned as tool errors with a next step. Unexpected failures are logged to stderr and summarised.
Licence
The code is released under the MIT License.
Wiki content
Wiki content is © One Piece Wiki contributors under CC BY-SA. Tool responses include article URLs so answers can link their sources.
Available Tools
13 toolsget_arcGet a story arcARead-onlyIdempotent
A canon story arc's saga, position in the story, chapter/episode/volume ranges, release years and neighbouring arcs. Accepts loose names such as 'wano' or 'Enies Lobby'.
Inputs: name (required).
get_category_membersList a category's membersBRead-onlyIdempotent
Articles and subcategories in a category, e.g. 'Straw Hat Pirates Members', 'Logia Devil Fruit Users', 'Male Characters'.
Inputs: category (required), limit, cursor.
get_chapterGet a manga chapterARead-onlyIdempotent
A manga chapter's title, volume, release date, Weekly Shōnen Jump issue, the anime episodes that adapt it, its story arc and a short summary. Blocked when past the spoiler limit.
Inputs: number (required).
get_episodeGet an anime episodeARead-onlyIdempotent
An anime episode's title, air date, season, opening song, the manga chapters it adapts (empty for filler) and a short summary. Blocked when it adapts chapters past the spoiler limit.
Inputs: number (required).
get_infoboxGet an article's infoboxARead-onlyIdempotent
The article's infobox as label → value pairs. For characters: affiliations, occupations, bounty, Devil Fruit, age, birthday, height, debut chapter/episode and voice actors. Devil Fruits, arcs, ships and places have their own fields. Fields outside the main block are prefixed with their group, e.g. 'Devil Fruit – Type'.
Inputs: title (required).
get_pageRead an articleARead-onlyIdempotent
Readable text of an article, with references, navigation boxes and the infobox removed (use get_infobox for that). For long articles pass section to fetch one part. When a spoiler limit is set, sections about later arcs are removed.
Inputs: title (required), section, max_chars.
get_page_categoriesList an article's categoriesARead-onlyIdempotent
Categories an article belongs to: a quick way to see a character's crews, Devil Fruit type, species, Haki and more.
Inputs: title (required).
get_page_sectionsList an article's sectionsARead-onlyIdempotent
Section headings of an article, with indexes usable as get_page's section.
Inputs: title (required).
get_spoiler_limitGet the spoiler limitARead-onlyIdempotent
The current spoiler limit (last chapter the user has read), or null if none is set.
Inputs: no named parameters.
list_arcsList story arcsARead-onlyIdempotent
Every canon story arc in order, grouped by saga, with chapter and episode ranges. Also answers 'which arc is chapter N in?' via chapter. Arcs past the spoiler limit are left out.
Inputs: chapter.
list_subpagesList an article's subpagesARead-onlyIdempotent
Subpages of an article. Major characters are split into tabs such as '/History', '/Personality and Relationships', '/Abilities and Powers' and '/Misc.'; find them here, then read one with get_page.
Inputs: title (required).
search_wikiSearch the One Piece WikiARead-onlyIdempotent
Full-text search of One Piece Wiki articles. Large articles are split into subpages (e.g. 'Monkey D. Luffy/Abilities and Powers'), and those show up in results too.
Inputs: query (required), limit.
set_spoiler_limitSet the spoiler limitAIdempotent
Set the last manga chapter the user has read. Afterwards, chapters, episodes and arcs past it are withheld and article sections about later arcs are removed. Call with no chapter to turn the limit off. Use this whenever the user says how far they are, e.g. 'I'm at chapter 900' or 'I just finished Enies Lobby'.
Inputs: arc, chapter.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Each tool targets a distinct resource or aspect: search, page content, sections, subpages, infobox, categories, category members, chapters, episodes, arcs, and spoiler settings. Even similar-sounding tools like get_arc vs list_arcs are clearly separated by singular vs list. There is no overlap or ambiguity.
All tools follow a consistent verb_noun pattern with snake_case: search_wiki, get_page, get_page_sections, list_subpages, get_infobox, etc. The naming is uniform and predictable, making it easy for an agent to infer functionality from names.
13 tools is well within the ideal 3-15 range for a focused server. Each tool serves a clear purpose in the wiki domain, from content retrieval to structured data extraction and spoiler control, without redundancy or bloat.
The surface covers the full lifecycle of interacting with the One Piece wiki: searching, reading pages, navigating sections/subpages, extracting infobox data, exploring categories, querying chapters/episodes/arcs, and managing spoiler limits. There are no obvious gaps for the intended use case.
Maintenance
Related MCP Connectors
Access and interact with anime and manga data seamlessly. Retrieve detailed information about your…
Search and read Wikipedia articles and sections, list cited references, nearby pages, and languages.
Wikipedia, Wikidata and Wiktionary as clean JSON, not HTML. 1.9M searchable. Free, no auth.
Search and read Wikipedia in any language: summaries and full articles. Free, no key.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables searching and retrieving Wikipedia content across multiple languages, including article summaries, sections, coordinates, and related topics.-
- AlicenseAqualityBmaintenanceProvides read-only access to Old School RuneScape Wiki data, returning structured content with source provenance via MCP tools for searching pages, items, monsters, quests, shops, and drop sources.10234 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables structured access to Bulbapedia's Pokémon encyclopedia through natural language, including searching pages, retrieving Pokémon data, moves, abilities, items, locations, and wiki metadata via the MediaWiki API.116 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables 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 npmMIT