The Bangumi TV MCP Server provides access to the Bangumi TV API through a Model Context Protocol (MCP) service. It allows you to interact with Bangumi TV data and retrieve information about anime, manga, music, games, and more.
# Clone the repository
git clone https://github.com/Ukenn2112/BangumiMCP.git
cd BangumiMCP
# Create and activate virtual environment
uv venv
source .venv/bin/activate # Linux/macOS
# Or on Windows:
# .venv\Scripts\activate
# Install dependencies
uv add "mcp[cli]" requests
To use the Bangumi TV MCP server with a Claude client, you'll need to configure it properly.
Access the Claude quickstart documentation: https://mcpcn.com/docs/quickstart/user/
Create a claude_desktop_config.json
file with the following configuration:
{
"mcpServers": {
"bangumi-tv": {
"command": "uv",
"args": [
"--directory",
"/Users/Desktop/bangumi-tv", # Replace with your directory
"run",
"main.py"
],
"env": {
"BANGUMI_TOKEN": "your_token_here" # Replace with your Bangumi TV token (optional) for R18 content
}
}
}
}
Calendar and Search:
/calendar
- Daily broadcasts/v0/search/subjects
- Search topics/v0/subjects
- Browse topicsSubject Information:
/v0/subjects/{subject_id}
- Get subject details/v0/subjects/{subject_id}/persons
- Get personnel related to a subject/v0/subjects/{subject_id}/characters
- Get characters related to a subject/v0/subjects/{subject_id}/subjects
- Get related subjects list/v0/episodes
- Get episodes list/v0/episodes/{episode_id}
- Get episode details/v0/search/characters
- Search characters/v0/characters/{character_id}
- Get character details/v0/characters/{character_id}/subjects
- Get subjects related to a character/v0/characters/{character_id}/persons
- Get personnel related to a character/v0/search/persons
- Search personnel/v0/persons/{person_id}
- Get personnel details/v0/persons/{person_id}/subjects
- Get subjects related to personnel/v0/persons/{person_id}/characters
- Get characters related to personnelTo add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "bangumi-tv" '{"command":"uv","args":["--directory","/path/to/bangumi-tv","run","main.py"],"env":{"BANGUMI_TOKEN":"your_token_here"}}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"bangumi-tv": {
"command": "uv",
"args": [
"--directory",
"/path/to/bangumi-tv",
"run",
"main.py"
],
"env": {
"BANGUMI_TOKEN": "your_token_here"
}
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"bangumi-tv": {
"command": "uv",
"args": [
"--directory",
"/path/to/bangumi-tv",
"run",
"main.py"
],
"env": {
"BANGUMI_TOKEN": "your_token_here"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect