This server provides programmatic access to Bangumi TV's comprehensive media database through 55 MCP tools and 3 workflow prompts, enabling AI assistants to interact with anime, manga, music, game, and real-world media data.
Core Capabilities:
Search and Browse Media:
Search subjects by keyword with type filtering (Book/Anime/Music/Game/Real) and sorting options
Browse subjects by category with advanced filters (year, month, platform, series)
Get weekly broadcast schedules for currently airing anime
Detailed Information Access:
Retrieve comprehensive subject details including metadata, ratings, images, and descriptions
Access episode lists with type filtering (MainStory, SP, OP, ED, PV, MAD, Other)
Get character details including appearances and associated voice actors/creators
Retrieve person/company profiles including filmography and character roles
Discover relationships between subjects (sequels, prequels, adaptations, spin-offs)
Cross-Reference Features:
Link subjects to their characters, staff, and cast
Connect characters with their voice actors and creators
Associate persons with their works and character roles
User Features:
Access public user profiles and avatars
View and manage collections for subjects, episodes, characters, and persons (requires authentication)
Access revision histories for subjects, characters, persons, and episodes
Index Management:
Create, update, and manage custom content indices (requires authentication)
Add/remove subjects from indices
Pre-built Workflows:
Search anime by keyword with AI summaries
Get comprehensive subject information including details, persons, characters, and relations
Search for characters and identify their voice actors
Authentication Features (with BANGUMI_TOKEN):
Access authenticated user information and R18 content
Perform write operations (create, update, delete)
Manage personal collections and favorites
Technical Features:
Full OpenAPI 3.0.3 specification resource
Type-safe Python implementation with async support
Pagination support for all list operations
Modular architecture following MCP best practices
The MCP server was fully generated by Google Gemini, as acknowledged in the README.
Click on "Install 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 TV MCP Servicesearch for anime about a girl who can see spirits"
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 Server
English
A Model Context Protocol (MCP) server that provides programmatic access to the Bangumi TV API, enabling AI assistants like Claude to interact with comprehensive anime, manga, music, game, and real-world media data.
Features
55 MCP Tools: Complete coverage of Bangumi API endpoints
3 Workflow Prompts: Pre-built multi-step workflows for common tasks
1 Resource: Full OpenAPI specification for API documentation
Modular Architecture: Clean, maintainable codebase following MCP best practices
Type-Safe: Full Python type hints and enum definitions
Async Support: Non-blocking API calls using httpx
Quick Start
Prerequisites
Python 3.10 or higher
uv package manager (recommended) or pip
Installation
Configuration for Claude Desktop
Add to your claude_desktop_config.json:
Note: BANGUMI_TOKEN is optional but required for:
Authenticated operations (collections, personal data)
R18 content access
Write operations (create, update, delete)
Get your token at: https://next.bgm.tv/demo/access-token
Project Architecture
BangumiMCP follows a modular architecture designed for maintainability and scalability:
Available Tools
Subjects & Episodes (10 tools)
get_daily_broadcast- Weekly broadcast schedulesearch_subjects- Full-text search with filtersbrowse_subjects- Category-based browsingget_subject_details- Detailed subject informationget_subject_image- Subject image URLget_subject_persons- Related creators/staffget_subject_characters- Related charactersget_subject_relations- Related subjectsget_episodes- Episode listget_episode_details- Episode information
Characters (7 tools)
search_characters- Character searchget_character_details- Character informationget_character_image- Character image URLget_character_subjects- Subjects featuring characterget_character_persons- Voice actors & creatorscollect_character- Add to favorites ⚠️ Requires authuncollect_character- Remove from favorites ⚠️ Requires auth
Persons (7 tools)
search_persons- Search creators/actorsget_person_details- Person informationget_person_image- Person image URLget_person_subjects- Works by personget_person_characters- Characters associatedcollect_person- Add to favorites ⚠️ Requires authuncollect_person- Remove from favorites ⚠️ Requires auth
Users (3 tools)
get_user_info- Public user profileget_user_avatar- User avatar URLget_current_user- Authenticated user info ⚠️ Requires auth
Collections (11 tools)
get_user_collections- User's subject collectionsget_user_subject_collection- Subject collection statusupdate_subject_collection- Update subject status ⚠️ Requires authget_user_episode_collection- Episode watch list ⚠️ Requires authupdate_episode_collection- Batch update episodes ⚠️ Requires authget_single_episode_collection- Single episode status ⚠️ Requires authupdate_single_episode_collection- Update single episode ⚠️ Requires authget_user_character_collections- Character collectionsget_user_character_collection- Character collection statusget_user_person_collections- Person collectionsget_user_person_collection- Person collection status
Revisions (8 tools)
get_person_revisions- Person edit historyget_person_revision- Single person edit detailget_character_revisions- Character edit historyget_character_revision- Single character edit detailget_subject_revisions- Subject edit historyget_subject_revision- Single subject edit detailget_episode_revisions- Episode edit historyget_episode_revision- Single episode edit detail
Indices (9 tools)
create_index- Create new index ⚠️ Requires authget_index- Index detailsupdate_index- Update index info ⚠️ Requires authget_index_subjects- Subjects in indexadd_subject_to_index- Add subject ⚠️ Requires authupdate_index_subject- Update subject info ⚠️ Requires authremove_subject_from_index- Remove subject ⚠️ Requires authcollect_index- Add index to collection ⚠️ Requires authuncollect_index- Remove index from collection ⚠️ Requires auth
Workflow Prompts
Pre-built multi-step workflows for common tasks:
search_and_summarize_anime - Search anime by keyword and get AI summary
get_subject_full_info - Get comprehensive subject information (details, persons, characters, relations)
find_voice_actor - Search character and identify voice actors
Development
Adding New Tools
Identify the appropriate category (subject, character, person, etc.)
Add the tool function to the corresponding file in
src/tools/Register the tool in the module's
register()functionUpdate this README with the new tool count
Testing
Code Structure
Dependency Hierarchy (no circular imports):
Level 0:
config.py,enums.py(no dependencies)Level 1:
utils/(depends on config & enums)Level 2:
resources/,tools/,prompts/(depend on utils)Level 3:
main.py(orchestrates everything)
Import Guidelines:
Use relative imports within
src/package (e.g.,from ..config import)Import from specific modules, not package level
Follow the dependency hierarchy to avoid circular imports
Environment Variables
Variable | Required | Description |
| No | Bangumi Access Token for authenticated operations and R18 content |
License
This project is built on the Bangumi API documentation and follows its terms of service.
Contributing
Contributions are welcome! Please feel free to submit issues or pull requests.
Related MCP server: YouTube Toolbox
中文
一个基于 Model Context Protocol (MCP) 的服务器,为 Bangumi TV API 提供程序化访问接口,使 Claude 等 AI 助手能够与海量的动画、漫画、音乐、游戏和真人影视数据进行交互。
功能特性
55 个 MCP 工具:完整覆盖 Bangumi API 端点
3 个工作流提示:预构建的多步骤工作流,用于常见任务
1 个资源:完整的 OpenAPI 规范文档
模块化架构:清晰、可维护的代码库,遵循 MCP 最佳实践
类型安全:完整的 Python 类型提示和枚举定义
异步支持:使用 httpx 的非阻塞 API 调用
快速开始
前置要求
Python 3.10 或更高版本
uv 包管理器(推荐)或 pip
安装
Claude Desktop 配置
在 claude_desktop_config.json 中添加:
注意:BANGUMI_TOKEN 是可选的,但以下操作需要:
认证操作(收藏、个人数据)
访问 R18 内容
写操作(创建、更新、删除)
获取令牌:https://next.bgm.tv/demo/access-token
项目架构
BangumiMCP 采用模块化架构,便于维护和扩展:
可用工具
条目和章节(10 个工具)
get_daily_broadcast- 每周放送时间表search_subjects- 全文搜索,支持过滤browse_subjects- 按分类浏览get_subject_details- 详细条目信息get_subject_image- 条目图片 URLget_subject_persons- 相关创作者/制作人员get_subject_characters- 相关角色get_subject_relations- 相关条目get_episodes- 章节列表get_episode_details- 章节信息
角色(7 个工具)
search_characters- 角色搜索get_character_details- 角色信息get_character_image- 角色图片 URLget_character_subjects- 角色出现的条目get_character_persons- 声优和创作者collect_character- 添加到收藏 ⚠️ 需要认证uncollect_character- 从收藏中移除 ⚠️ 需要认证
人物(7 个工具)
search_persons- 搜索创作者/演员get_person_details- 人物信息get_person_image- 人物图片 URLget_person_subjects- 人物参与的作品get_person_characters- 关联的角色collect_person- 添加到收藏 ⚠️ 需要认证uncollect_person- 从收藏中移除 ⚠️ 需要认证
用户(3 个工具)
get_user_info- 公开用户资料get_user_avatar- 用户头像 URLget_current_user- 当前认证用户信息 ⚠️ 需要认证
收藏(11 个工具)
get_user_collections- 用户的条目收藏get_user_subject_collection- 条目收藏状态update_subject_collection- 更新条目状态 ⚠️ 需要认证get_user_episode_collection- 章节观看列表 ⚠️ 需要认证update_episode_collection- 批量更新章节 ⚠️ 需要认证get_single_episode_collection- 单个章节状态 ⚠️ 需要认证update_single_episode_collection- 更新单个章节 ⚠️ 需要认证get_user_character_collections- 角色收藏get_user_character_collection- 角色收藏状态get_user_person_collections- 人物收藏get_user_person_collection- 人物收藏状态
修订历史(8 个工具)
get_person_revisions- 人物编辑历史get_person_revision- 单个人物编辑详情get_character_revisions- 角色编辑历史get_character_revision- 单个角色编辑详情get_subject_revisions- 条目编辑历史get_subject_revision- 单个条目编辑详情get_episode_revisions- 章节编辑历史get_episode_revision- 单个章节编辑详情
目录(9 个工具)
create_index- 创建新目录 ⚠️ 需要认证get_index- 目录详情update_index- 更新目录信息 ⚠️ 需要认证get_index_subjects- 目录中的条目add_subject_to_index- 添加条目 ⚠️ 需要认证update_index_subject- 更新条目信息 ⚠️ 需要认证remove_subject_from_index- 移除条目 ⚠️ 需要认证collect_index- 收藏目录 ⚠️ 需要认证uncollect_index- 取消收藏目录 ⚠️ 需要认证
工作流提示
预构建的多步骤工作流,用于常见任务:
search_and_summarize_anime - 按关键字搜索动画并获取 AI 摘要
get_subject_full_info - 获取全面的条目信息(详情、人物、角色、关联)
find_voice_actor - 搜索角色并识别声优
开发
添加新工具
确定合适的类别(条目、角色、人物等)
将工具函数添加到
src/tools/中相应的文件在模块的
register()函数中注册工具更新此 README 中的工具数量
测试
代码结构
依赖层次结构(无循环导入):
Level 0:
config.py,enums.py(无依赖)Level 1:
utils/(依赖 config 和 enums)Level 2:
resources/,tools/,prompts/(依赖 utils)Level 3:
main.py(协调所有模块)
导入指南:
在
src/包内使用相对导入(例如from ..config import)从特定模块导入,而不是包级别
遵循依赖层次结构以避免循环导入
环境变量
变量 | 必填 | 说明 |
| 否 | Bangumi 访问令牌,用于认证操作和访问 R18 内容 |
许可证
此项目基于 Bangumi API 文档构建,并遵循其服务条款。
贡献
欢迎贡献!请随时提交问题或拉取请求。
致谢
此项目基于 Bangumi API 文档构建。