Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
BANGUMI_TIMEOUTNoHTTP 请求超时(秒)20.0
BANGUMI_BASE_URLNoAPI 基础地址https://api.bgm.tv
BANGUMI_CACHE_TTLNo用户完整收藏库内存缓存有效期(秒),带并发合并与写后自动失效300.0
BANGUMI_USER_AGENTNo符合 Bangumi API 规范的自定义 User-Agentwhycantiusemyname/bangumi-mcp/<ver> (...)
BANGUMI_MAX_RETRIESNo仅针对只读请求的 429 / 5xx 最大重试次数(指数退避 + Retry-After 秒数/HTTP 日期)4
BANGUMI_ACCESS_TOKENNoBangumi Personal Access Token,仅个人读写接口需要(非本机 http:// 将被拒绝发送)
BANGUMI_MAX_RETRY_AFTERNoRetry-After 最大等待预算(秒),超出则直接返回限流提示30.0
BANGUMI_DEFAULT_USERNAMENo默认 Bangumi 用户名,调用用户相关 MCP 工具及 bangumi-cli sync/check/user 时可省略用户名

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Bangumi (bgm.tv) API v0 MCP Server. Public read-only tools (search, subjects, episodes, calendar, characters, persons, user public collections, full sync, batch deduplication, indices) work without a token. Personal read/write tools require BANGUMI_ACCESS_TOKEN.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
search_subjectsA

Search Bangumi subjects (POST /v0/search/subjects).

Args: keyword: Search query (Japanese, Chinese, or English title/keyword). subject_types: Optional filter list, e.g. ["anime"], ["book", "game"], or ints [1,2,3,4,6]. sort: Sort order: "match" (default), "heat", "rank", or "score". tags: User tags filter (AND logic), e.g. ["科幻", "原创"]. meta_tags: Public wiki meta tags (AND logic; prefix "-" to exclude, e.g. ["-科幻"]). air_date: Date range constraints (YYYY-MM-DD), e.g. [">=2024-01-01", "<2025-01-01"]. rating: Score constraints, e.g. [">=8.0", "<9.5"]. rating_count: Vote count constraints, e.g. [">=500"]. rank: Rank constraints, e.g. [">=1", "<=200"]. nsfw: Optional NSFW filter (ignored by Bangumi when unauthenticated). limit: Results per page (1-50, default 15). offset: Pagination offset (default 0).

browse_subjectsC

Browse Bangumi subjects by type, year/month, or rank (GET /v0/subjects).

get_subjectB

Get compact, structured details for a Bangumi subject (GET /v0/subjects/{subject_id}).

get_subject_personsB

Get staff/creators/studios associated with a subject (GET /v0/subjects/{subject_id}/persons).

get_subject_charactersC

Get characters and their voice actors for a subject (GET /v0/subjects/{subject_id}/characters).

get_subject_relationsB

Get related subjects (sequels, prequels, manga/novel adaptations, spin-offs) (GET /v0/subjects/{subject_id}/subjects).

get_episodesC

List episodes for a subject (GET /v0/episodes).

get_episodeC

Get detailed info for a single episode (GET /v0/episodes/{episode_id}).

get_calendarA

Get Bangumi weekly airing broadcast calendar (GET /calendar).

Args: weekday: Optional filter: 1-7 (Mon-Sun), "monday".."sunday", "周一".."周日", or "today".

search_charactersC

Search Bangumi characters (POST /v0/search/characters).

get_characterC

Get character details, optionally with related subjects and voice actors.

search_personsC

Search real-world persons/studios (voice actors, directors, mangaka, etc.) (POST /v0/search/persons).

get_personB

Get person/studio details, optionally with related subjects and voiced characters.

get_userB

Get public profile for a Bangumi user (GET /v0/users/{username}).

get_user_collectionsC

Query a single page of a user's collections (GET /v0/users/{username}/collections).

get_user_subject_collectionB

Get a user's collection record for a single subject (GET /v0/users/{username}/collections/{subject_id}).

sync_user_collectionsB

Fetch all paginated collections across all 5 subject types (book/anime/music/game/real) with status statistics.

Read-only in MCP (no local filesystem writes; use bangumi-cli sync -o FILE for local JSON export).

check_user_collectionsA

Batch-check candidate titles or subject_ids against a user's Bangumi collections for recommendation deduplication.

Pass integer subject_ids (or 'id:10380'/'#10380') for exact ID lookup, or title strings (e.g. '命运石之门', '86'). Returns collect/doing/wish/on_hold/dropped/uncollected/unknown along with user rating, episode progress, and ambiguity/completeness notes.

get_user_favoritesC

Get a user's favorited characters and/or persons.

get_indexB

Get a Bangumi curated Index (目录) and optionally its subjects.

get_meA

Get the currently authenticated Bangumi user profile (GET /v0/me). Requires BANGUMI_ACCESS_TOKEN.

upsert_collectionB

Add or update the authenticated user's collection for a subject (POST/PATCH /v0/users/-/collections/{subject_id}).

Requires BANGUMI_ACCESS_TOKEN. Does not auto-retry on network timeout.

get_episode_progressA

Read the authenticated user's episode watch progress for a subject OR single episode.

Requires BANGUMI_ACCESS_TOKEN. Pass exactly one of subject_id or episode_id.

update_episode_statusA

Update watch status for a single episode (PUT /v0/users/-/collections/-/episodes/{episode_id}).

Requires BANGUMI_ACCESS_TOKEN. Invalidates cached collection progress.

batch_update_episodesA

Batch update watch status for multiple episodes of a subject (PATCH /v0/users/-/collections/{subject_id}/episodes).

Requires BANGUMI_ACCESS_TOKEN. Recalculates subject completion and invalidates collection cache.

set_character_collectionA

Collect (favorite) a character for the authenticated user (POST /v0/characters/{character_id}/collect).

Requires BANGUMI_ACCESS_TOKEN. Note: uncollecting (collect=False) is currently disabled in upstream bangumi/server and returns UNSUPPORTED_UPSTREAM.

set_person_collectionA

Collect (favorite) a person/studio for the authenticated user (POST /v0/persons/{person_id}/collect).

Requires BANGUMI_ACCESS_TOKEN. Note: uncollecting (collect=False) is currently disabled in upstream bangumi/server and returns UNSUPPORTED_UPSTREAM.

create_indexC

Create a new Bangumi Index (目录) (POST /v0/indices). Requires BANGUMI_ACCESS_TOKEN.

update_indexA

Edit a Bangumi Index's title and/or description (PUT /v0/indices/{index_id}). Requires BANGUMI_ACCESS_TOKEN.

add_index_subjectB

Add (or overwrite if already present) a subject in a Bangumi Index (POST /v0/indices/{index_id}/subjects). Requires BANGUMI_ACCESS_TOKEN.

update_index_subjectA

Overwrite a subject's sort order and comment inside an Index (PUT /v0/indices/{index_id}/subjects/{subject_id}).

Requires BANGUMI_ACCESS_TOKEN. Upstream writes BOTH sort and comment on every PUT (and inserts the subject into the index if not already present), so always pass both desired values.

remove_index_subjectA

Remove a subject from a Bangumi Index (DELETE /v0/indices/{index_id}/subjects/{subject_id}). Requires BANGUMI_ACCESS_TOKEN.

set_index_collectionB

Collect (bookmark) or uncollect a Bangumi Index for the authenticated user. Requires BANGUMI_ACCESS_TOKEN.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

B3.1/5.0

Scored across 33 tools

Disambiguation3/5

Several tools share 'collection' terminology (set_index_collection, upsert_collection, get_user_collections, sync_user_collections, check_user_collections, set_character_collection, set_person_collection), and add_index_subject overlaps with update_index_subject since both can insert/overwrite a subject in an index. Descriptions clarify the distinctions, but an agent must read carefully to avoid misselection.

Naming Consistency5/5

All tool names follow a consistent snake_case verb_noun pattern (e.g., search_subjects, get_subject, update_episode_status, create_index, remove_index_subject). The few slight variations like get_me or batch_update_episodes still fit the same convention.

Tool Count3/5

33 tools is heavy for a single MCP server, though the Bangumi API is broad and each domain (subjects, characters, persons, users, collections, indices, episodes) requires multiple operations. There is some redundancy, such as add_index_subject vs update_index_subject, which pushes the count toward the high side.

Completeness3/5

The surface covers most core workflows: search/browse subjects, get details, manage users and collections, update episode progress, and create/edit indices. However, there is no delete_index tool and no explicit way to uncollect a subject, leaving notable gaps in the index and collection lifecycles.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues