Bangumi MCP
This is the legacy 0.1.x Bangumi-MCP toolset (~55 endpoint-per-operation tools) exposing read access to Bangumi data plus authenticated collection and index writes.
Time & calendar —
get_current_time;get_calendarfor the weekly broadcast schedule of currently airing anime.Subject search/browse —
search_subjects(keyword + type, tags, meta tags, air date, rating, rank, NSFW filters, sort, paging);get_subjectsbrowse by category/year/month/day/platform/series.Subject detail —
get_subject_info, plusget_subject_image,get_subject_persons,get_subject_characters,get_subject_relationsfor related data.Episodes —
get_episodes(list with type/paging filters) andget_episode_info.Characters & persons —
search_characters/search_persons;get_character_info/get_person_info, images, related subjects, related persons/characters;post_character_collection/post_person_collectionto collect them.Indices —
post_index,get_index_info,put_index, collect/uncollect (post_index_collection/delete_index_collection),get_index_subjects,post_index_subject,put_index_subject,delete_index_subject.Revisions — history list and detail for subjects, episodes, characters and persons (
get_*_revisions,get_*_revision_info).Users —
get_user_infoby username,get_me_infofor the authenticated user,get_user_avatar.Collections (read) — subject/character/person collections for any user (
get_user_collections, per-item info), and the authenticated user's episode progress.Collections (write) —
post_my_collection/patch_my_collectionfor subject status, rating, comment, tags;patch_my_episode_collections(batch) andput_my_episode_collection_infofor episode status.Auth notes — public reads work anonymously;
/meand all write tools require aBANGUMI_API_TOKENwithwrite:collection/write:indicesscopes.
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., "@Bangumi MCP search for anime Steins;Gate"
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.
Bangumi MCP
Bangumi MCP gives MCP clients access to Bangumi (bgm.tv): anime, manga, books, music, games, characters, staff, indices and personal collections.
The project is built on the MCP Python SDK 2.3 (protocol revision
2026-07-28) and tracks the 2026-07-24 revision of the
Bangumi OpenAPI document bundled at
bangumi_mcp/dist.json.
Highlights
11 intent-based tools instead of one tool per REST endpoint. Each tool covers a whole workflow, so the catalogue stays small without losing access to any of the 56 operations exposed by the 47 Bangumi API paths.
Generated, validated schemas: inputs come from Python type hints and outputs from Pydantic models. Clients receive
outputSchemaandstructuredContentand can validate results themselves.MCP 2.x features: tool annotations, cache hints, resources, prompts, progress reporting, Streamable HTTP (stateful or stateless) and legacy SSE.
Bangumi-aware: correct
filter.tagsearch payloads, batched episode updates, token-scope hints, retries for rate limits and public reads that keep working when the configured token has expired.
Related MCP server: Anitabi MCP Server
Quick start
git clone https://github.com/etherwindy/Bangumi-MCP.git
cd Bangumi-MCP
uv sync
uv run bangumi-mcp --helpSet a Bangumi access token (optional for public reads, required for /v0/me
and every write):
# .env
BANGUMI_API_TOKEN=your_api_token_hereCreate tokens at https://next.bgm.tv/demo/access-token. The current Bangumi spec marks mutating endpoints with OAuth scopes:
Scope | Needed for |
| subject/episode collections, collect character/person/index |
| creating/editing indices and their subjects |
A 403 answer includes a hint telling you which scope is missing.
Tools
All tools are annotated with readOnlyHint, destructiveHint,
idempotentHint and openWorldHint.
Tool | What it does | Bangumi endpoints |
| Search subjects, characters or persons by keyword. Subject search supports type, tags, meta tags, air date, rating, rating count, rank and NSFW filters. |
|
| Browse subjects by type/category/year/month/platform/series, sorted by date or rank. |
|
| Subject detail (summary, infobox, rating, tags, images, collection counts). |
|
| List a subject's episodes or fetch one episode. |
|
| Character or person detail; |
|
| Revision history or one revision's diff payload for subject/episode/character/person. |
|
| A user profile by username, or the authenticated user when |
|
| Read subject/character/person collections (any user) and the authenticated user's episode progress. |
|
| Write collection state: subject status/rating/comment/tags/progress, batch or single episode status, collect/uncollect character/person/index. |
|
| Create/read/update indices, list/add/edit/remove index subjects, collect/uncollect an index. |
|
| Weekly broadcast schedule of currently airing anime. |
|
The API has no endpoint for deleting an index. Indices created with
bangumi_manage_index(action="create")must be removed on bgm.tv.Known upstream limitation: Bangumi's API advertises
DELETE /v0/characters/{id}/collectandDELETE /v0/persons/{id}/collectbut the server does not implement them (bangumi/api#234).bangumi_update_collection(action="unset")therefore returns a clear error for characters and persons; uncollect them on https://bgm.tv for now.
Image URLs are part of the subject/character/person/user payloads, so there is
no separate image tool. bangumi_get_subject(subject_id=..., include=[...])
replaces the old get_subject_info / get_subject_persons /
get_subject_characters / get_subject_relations family.
Migrating from 0.1.x
The 55 endpoint tools were consolidated into the 11 tools above. No functionality was dropped.
Old tools | New tool |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
All nine index tools |
|
|
|
| removed — hosts already know the current time |
MCP features in use
SDK 2.x /
MCPServer— the high-level server class (formerlyFastMCP). Handlers are typed functions; schemas are generated from type hints, not maintained by hand.Protocol 2026-07-28 — no handshake and no session on modern connections,
tools/listcache hints,resources/readcache hints and per-request routing headers. The same process still serves 2025-era clients (including the legacy HTTP+SSE transport).Structured output — each tool declares an
outputSchema; results are returned as both text andstructuredContent. The client validates structured content, which is why nullable Bangumi fields are modelled as nullable andnullvalues are dropped from payloads.Annotations and titles — every tool carries human-readable titles and MCP hints (
readOnlyHint,destructiveHint,idempotentHint,openWorldHint).Resources —
bangumi://calendarplusbangumi://subject/{id},bangumi://character/{id},bangumi://person/{id}andbangumi://user/{username}templates let clients attach Bangumi data without tool calls.Prompts —
bangumi_recommend,bangumi_subject_deep_diveandbangumi_backlog_reviewprovide ready-made workflows.Progress — multi-fetch tools (
bangumi_get_subject,bangumi_get_entity) report progress while loading related sections.Transport control —
--statelessfor session-less Streamable HTTP and--json-responsefor clients that prefer JSON over SSE streams.
Configuration
Variable | Default | Meaning |
| unset | Bangumi access token. Public reads work without it. |
|
| Override the API root (proxy/testing). |
.env files in the working directory are loaded automatically. If a token is
present but expired, public reads automatically retry anonymously; only
authenticated calls fail, with a hint pointing at the token page.
Usage
STDIO
{
"mcpServers": {
"Bangumi-MCP": {
"command": "uv",
"args": ["--directory", "/path/to/Bangumi-MCP", "run", "bangumi-mcp"],
"env": {
"BANGUMI_API_TOKEN": "your_token_here"
}
}
}
}Streamable HTTP
uv run bangumi-mcp --mode=streamable_http --host localhost --port 18080{
"mcpServers": {
"Bangumi-MCP": {
"type": "streamableHttp",
"url": "http://localhost:18080/mcp"
}
}
}Add --stateless to avoid server-side sessions entirely, or
--json-response to receive plain JSON responses.
SSE (legacy clients)
uv run bangumi-mcp --mode=sse --host localhost --port 18080{
"mcpServers": {
"Bangumi-MCP": {
"type": "sse",
"url": "http://localhost:18080/sse"
}
}
}SSE exists for clients that still use the 2025-era handshake. New clients should use Streamable HTTP.
Development
uv sync
uv run pytest
uv run python scripts/update_openapi.py --check # is the bundled schema stale?
uv run python scripts/update_openapi.py # refresh itLayout:
bangumi_mcp/
__main__.py CLI (stdio / sse / streamable_http)
mcp_server.py MCPServer factory, transports, cache hints
bangumi_client.py httpx client, retries, error mapping
models.py Pydantic models used for output schemas
resources.py MCP resources
prompts.py MCP prompts
tools/ one module per tool group
scripts/update_openapi.py
tests/When refreshing the OpenAPI document, review the diff and update
bangumi_mcp/models.py, bangumi_client.py and the tool descriptions if an
endpoint or payload changed.
Acknowledgements
Originally built with the assistance of Qwen3-Coder and Claude Sonnet 4.
License
MIT — see LICENSE.
Available Tools
55 toolsdelete_index_collectionBDestructiveIdempotent
为当前用户取消收藏目录
Inputs: index_id (required). Returns: object
delete_index_subjectBDestructiveIdempotent
从当前用户创建的目录中删除条目
Inputs: index_id (required), subject_id (required). Returns: object
get_calendarARead-onlyIdempotent
获取放送时间表
Inputs: no named parameters. Returns: calendar
get_character_imageBRead-onlyIdempotent
获取角色图片 URL
Inputs: character_id (required), type (required). Returns: object
get_character_infoARead-onlyIdempotent
获取角色详细信息,仅在需要获得完整信息时使用
Inputs: character_id (required). Returns: object
get_character_personsBRead-onlyIdempotent
获取角色相关人员信息列表
Inputs: character_id (required). Returns: object
get_character_revision_infoCRead-onlyIdempotent
获取角色修订详情
Inputs: revision_id (required). Returns: object
get_character_revisionsCRead-onlyIdempotent
获取角色修订历史列表
Inputs: character_id (required), limit, offset. Returns: object
get_character_subjectsARead-onlyIdempotent
获取角色相关条目信息列表
Inputs: character_id (required). Returns: object
get_current_timeARead-onlyIdempotent
获取当前时间
Inputs: no named parameters.
get_episode_infoARead-onlyIdempotent
获取某集信息,仅在需要获得完整信息时使用
Inputs: episode_id (required). Returns: object
get_episode_revision_infoCRead-onlyIdempotent
获取章节修订详情
Inputs: revision_id (required). Returns: object
get_episode_revisionsBRead-onlyIdempotent
获取章节修订历史列表
Inputs: episode_id (required), limit, offset. Returns: object
get_episodesBRead-onlyIdempotent
获取条目剧集信息
Inputs: subject_id (required), type, limit, offset. Returns: object
get_index_infoCRead-onlyIdempotent
获取目录信息
Inputs: index_id (required). Returns: object
get_index_subjectsBRead-onlyIdempotent
获取目录中的条目列表
Inputs: index_id (required), params. Returns: object
get_me_infoARead-onlyIdempotent
获取当前用户信息
Inputs: no named parameters. Returns: object
get_my_episode_collection_infoARead-onlyIdempotent
获取当前用户指定剧集收藏条目
Inputs: episode_id (required). Returns: object
get_my_episode_collectionsBRead-onlyIdempotent
获取当前用户剧集收藏信息列表
Inputs: subject_id (required), params. Returns: object
get_person_charactersBRead-onlyIdempotent
获取人物相关角色列表
Inputs: person_id (required). Returns: object
get_person_imageCRead-onlyIdempotent
获取人物图片 URL
Inputs: person_id (required), type (required). Returns: object
get_person_infoARead-onlyIdempotent
获取人物详细信息,仅在需要获得完整信息时使用
Inputs: person_id (required). Returns: object
get_person_revision_infoBRead-onlyIdempotent
获取人物修订详情
Inputs: revision_id (required). Returns: object
get_person_revisionsBRead-onlyIdempotent
获取人物修订历史列表
Inputs: person_id (required), limit, offset. Returns: object
get_person_subjectsCRead-onlyIdempotent
获取人物相关条目列表
Inputs: person_id (required). Returns: object
get_subject_charactersCRead-onlyIdempotent
获取条目角色信息列表
Inputs: subject_id (required). Returns: object
get_subject_imageBRead-onlyIdempotent
获取条目图片 URL
Inputs: subject_id (required), type (required). Returns: object
get_subject_infoARead-onlyIdempotent
获取条目详细信息,仅在需要获得完整信息时使用
Inputs: subject_id (required). Returns: object
get_subject_personsBRead-onlyIdempotent
获取条目相关人员信息列表
Inputs: subject_id (required). Returns: object
get_subject_relationsBRead-onlyIdempotent
获取与输入条目相关的其他条目信息列表
Inputs: subject_id (required). Returns: object
get_subject_revision_infoCRead-onlyIdempotent
获取条目修订详情
Inputs: revision_id (required). Returns: object
get_subject_revisionsARead-onlyIdempotent
获取条目修订历史列表
Inputs: subject_id (required), limit, offset. Returns: object
get_subjectsCRead-onlyIdempotent
浏览条目
Inputs: type, cat, series, platform, +6 more. Returns: object
get_user_avatarBRead-onlyIdempotent
获取用户头像 URL
Inputs: username (required), type (required). Returns: object
get_user_character_collection_infoARead-onlyIdempotent
获取用户指定角色收藏信息
Inputs: username (required), character_id (required). Returns: object
get_user_character_collectionsBRead-onlyIdempotent
获取用户角色收藏信息列表
Inputs: username (required). Returns: object
get_user_collection_infoCRead-onlyIdempotent
获取用户指定条目信息
Inputs: username (required), subject_id (required). Returns: object
get_user_collectionsBRead-onlyIdempotent
获取用户收藏信息列表
Inputs: username (required), params. Returns: object
get_user_infoCRead-onlyIdempotent
获取用户信息
Inputs: username (required). Returns: object
get_user_person_collection_infoBRead-onlyIdempotent
获取用户指定人物收藏信息
Inputs: username (required), person_id (required). Returns: object
get_user_person_collectionsCRead-onlyIdempotent
获取用户人物收藏信息列表
Inputs: username (required). Returns: object
patch_my_collectionBIdempotent
为当前用户更新指定收藏条目
Inputs: subject_id (required), params. Returns: object
patch_my_episode_collectionsBIdempotent
为当前用户批量更改剧集收藏状态
Inputs: subject_id (required), episode_id (required), type (required). Returns: object
post_character_collectionC
为当前用户收藏角色
Inputs: character_id (required). Returns: object
post_indexA
为当前用户创建新目录
Inputs: no named parameters. Returns: object
post_index_collectionBIdempotent
为当前用户收藏目录
Inputs: index_id (required). Returns: object
post_index_subjectB
添加条目到当前用户创建的目录
Inputs: index_id (required), params (required). Returns: object
post_my_collectionBIdempotent
为当前用户收藏指定条目,如果已收藏则更新
Inputs: subject_id (required), params. Returns: object
post_person_collectionA
为当前用户收藏人物
Inputs: person_id (required). Returns: object
put_indexBIdempotent
更新当前用户创建的目录信息
Inputs: index_id (required), params (required). Returns: object
put_index_subjectBIdempotent
更新目录中的条目排序或评论
Inputs: index_id (required), subject_id (required), params (required). Returns: object
put_my_episode_collection_infoBIdempotent
为当前用户更改剧集收藏状态
Inputs: episode_id (required), type (required). Returns: object
search_charactersDRead-onlyIdempotent
搜索角色
Inputs: keyword (required), filter, limit, offset. Returns: object
search_personsCRead-onlyIdempotent
搜索人物
Inputs: keyword (required), filter, limit, offset. Returns: total, limit, offset, data
search_subjectsARead-onlyIdempotent
搜索条目(可以是书籍、动画、音乐、游戏、三次元内容等)
Inputs: keyword (required), sort, filter, limit, +1 more. Returns: total, limit, offset, data
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 55 tools
Each tool targets a specific resource and action (e.g., get_subject_characters vs get_character_subjects have clearly different directions). There is no overlap or ambiguity among the 55 tools.
Most tools follow a consistent verb_noun pattern (e.g., get_subject_info, post_my_collection). Minor inconsistencies like 'get_calendar' lacking a resource prefix and some mixed use of singular/plural are present but do not hinder understanding.
With 55 tools, the server has an excessively large tool surface for an MCP server. While each tool serves a distinct purpose, the sheer number makes it difficult for agents to select the correct tool, and many retrieval tools could potentially be consolidated.
The tool set covers a wide range of operations for the Bangumi domain: retrieval, creation, update, and deletion for subjects, characters, persons, episodes, indexes, and user collections. Minor gaps like missing delete for user subject collections are present but do not severely hinder core workflows.
Maintenance
Related MCP Connectors
Access and interact with anime and manga data seamlessly. Retrieve detailed information about your…
AniList MCP — wraps AniList GraphQL API (free, no auth)
Search MusicBrainz artists, releases, works, labels; resolve ISRC/ISWC/barcode; fetch cover art.
Search books and authors, fetch editions, browse subjects, and resolve cover images.
Related MCP Servers
- FlicenseAqualityDmaintenanceProvides MCP access to the BangumiTV API, allowing users to retrieve and interact with anime, manga, music, and game information through natural language queries.1727-
- AlicenseAqualityDmaintenanceEnables users to search for anime information via the Bangumi API and discover corresponding real-world pilgrimage locations through the Anitabi API. It provides tools for retrieving anime metadata and detailed geographic coordinates for 'seichi junrei' locations.3AGPL 3.0
- FlicenseAqualityDmaintenanceEnables anime search and retrieval of details on works, series, episodes, people, organizations, staff, and broadcast schedules via the Annict REST API.14-
- AlicenseAqualityDmaintenanceEnables searching and retrieving Bilibili user information and videos via the Bilibili API.31MIT