bilitrack
Provides tools for interacting with Bilibili's public web API to search users, retrieve user profiles and snapshots, list user videos, dynamics, articles, and followings, get video details including optional subtitles, fetch article content, and read comments and replies on videos, dynamics, and articles.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
bilitrack
bilitrack follows people and content on Bilibili: look a user up, see what they have posted lately — videos, dynamics, and articles — check who they follow, and read the comment threads under a video, dynamic, or article, including subtitle text for a video when you ask for it. Everything is read from Bilibili's public web API.
This package is a clean-room rebuild of the 12-tool BiliStalkerMCP tool list, written fresh from its public README spec.
How it talks to the service
Each tool maps onto a public endpoint under
https://api.bilibili.com/x/... and returns that endpoint's data
payload:
# Optional: a logged-in session raises limits and unlocks gated reads.
export SESSDATA="your SESSDATA cookie value"
export BILI_JCT="your bili_jct cookie value (optional)"
export BUVID3="your buvid3 cookie value (optional)"
# Optional override (default: https://api.bilibili.com)
export BILIBILI_API_URL="https://api.bilibili.com"The cookies are genuinely optional. With none set, requests go out
cookieless, which Bilibili accepts for most public reads — nothing
fails just because SESSDATA is missing. When the API answers with a
non-zero code, the call fails with that code and message; an
upstream HTTP error is reported with its status and a body excerpt.
Username resolution: tools take user_id_or_username. A numeric
value is used as the user's mid directly; anything else is resolved
through user search and only an exact username match is accepted —
a near match is an error, not a guess.
Subtitle simplification: with fetch_subtitles set,
get_video_detail uses the player API to list subtitle tracks and
returns either the track metadata (subtitle_scope: "metadata") or
the joined text of the selected track (by subtitle_lang, or the
first track), truncated to subtitle_max_chars when given. It does
not stitch multi-part or AI-generated tracks the way a full player
client would.
Related MCP server: Bilibili API MCP Server
Install
npx @reneturcios/bilitrack search_users '{"keyword":"example"}'Or run the container image:
docker run -i ghcr.io/cloudcorprecords/bilitrackThe container defaults to the MCP server. Pass CLI arguments to use it as a CLI instead.
CLI
The CLI mirrors the tools: one subcommand per tool, taking its arguments as a single JSON object.
bilitrack search_users '{"keyword":"example","limit":5}'
bilitrack get_user_info '{"user_id_or_username":"12345"}'
bilitrack get_user_snapshot '{"user_id_or_username":"example"}'
bilitrack get_user_videos '{"user_id_or_username":"12345","page":2}'
bilitrack get_video_detail '{"bvid":"BV1xx411c7mD","fetch_subtitles":true,"subtitle_lang":"zh-CN"}'
bilitrack get_content_comments '{"content_type":"video","content_id":"12345","sort":"hot"}'
bilitrack --versionExit codes: 0 on success, 1 on an API or validation error (the
error names the problem), 2 for usage errors.
MCP server
One bin serves both faces. The mcp subcommand starts a stdio MCP
server:
npx -y @reneturcios/bilitrack mcpMCP client configuration:
{
"mcpServers": {
"bilitrack": {
"command": "npx",
"args": ["-y", "@reneturcios/bilitrack", "mcp"],
"env": { "SESSDATA": "your cookie value (optional)" }
}
}
}Tools
All ID parameters are strings in these schemas.
Tool | Input | What it does |
|
| Search Bilibili users by keyword. |
|
| Get a combined snapshot of a Bilibili user: profile, videos, dynamics, and articles. |
|
| Get profile information for a Bilibili user. |
|
| List a Bilibili user's videos, paged. |
|
| Search within a Bilibili user's videos by keyword. |
|
| Get detail for a Bilibili video by BVID, optionally fetching subtitles. |
|
| List a Bilibili user's dynamics (feed posts), paged by cursor. |
|
| List a Bilibili user's articles, paged. |
|
| Get the full content of a Bilibili article. |
|
| List accounts a Bilibili user follows, paged. |
|
| List comments on a Bilibili video, dynamic, or article. |
|
| List replies under one root comment on Bilibili content. |
content_type accepts video, article, dynamic, audio,
album, course, or a numeric Bilibili reply type as a string.
Development
npm install
npm run build # tsc -> dist/
npm test # node test runner over test/*.test.ts, fake fetch only, no network
npm run dev # run the CLI from source via tsxLicense
MIT — see LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
Track Bilibili creators and get the latest updates on videos, dynamics, and articles. Fetch user p…
Bilibili (B站) data without login: video stats, comments, danmaku, creators, trending, hot searches.
Bilibili public video, article, dynamic, creator, comments, reactions, and transcript tools.
Bilibili videos for AI agents: search, creators, trending, stats, tags and danmaku comments.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables interaction with Bilibili (B站) platform through API and web scraping. Supports video search, article search, video info retrieval, comment fetching, danmaku extraction, and article content access.4-
- FlicenseNot gradedqualityDmaintenanceEnables interaction with Bilibili (哔哩哔哩) through its API, supporting video search and recommendations, user search, dynamic feeds, video collections, and danmaku retrieval through natural language.5-
- AlicenseAqualityDmaintenanceEnables retrieval of comments from Bilibili videos and dynamic posts with support for pagination, sorting, and nested replies in both Markdown and JSON formats.24 npm1MIT
- AlicenseAqualityDmaintenanceEnables searching and retrieving Bilibili user information and videos via the Bilibili API.31MIT