Track Bilibili creators and get the latest updates on videos, dynamics, and articles. Fetch user pβ¦
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by 222wcnm Bilistalkermcp.
search_userskeyword`, `limit
get_user_snapshotuser_id_or_username`, `video_limit`, `dynamic_limit`, `article_limit` (0 skips a section)
get_user_infouser_id_or_username
get_user_videosuser_id_or_username`, `page`, `limit
search_user_videosuser_id_or_username`, `keyword`, `page`, `limit
get_video_detailbvid`, `fetch_subtitles` (default: `false`), `subtitle_mode` (`smart`/`full`/`minimal`), `subtitle_lang` (default: `auto`), `subtitle_max_chars
BiliStalkerMCP is a Bilibili MCP server and command-line tool built on Model Context Protocol (MCP), designed for AI agents that need to analyze a specific Bilibili user or creator.
It is optimized for workflows that start from a target uid or username, then retrieve that user's profile, videos, dynamics, articles, subtitles, and followings with structured tools.
If you are searching for a Bilibili MCP server, a Bilibili Model Context Protocol server, or an MCP server for tracking and analyzing a specific Bilibili user, this repository is designed for that use case.
English | δΈζθ―΄ζ
Copy and send the following to Claude Code, Codex, or other AI agents:
Configuration paths and syntax may vary across different clients.
Then replace /path/to/BiliStalkerMCP below with your actual absolute path:
Prefer
uv run --directory ...for faster local updates when PyPI release propagation is delayed. You can still useuvx bili-stalker-mcpfor quick one-off usage.
Auth: Provide
SESSDATAdirectly, or put it inBILI_COOKIE_FILE. Obtain it from Browser DevTools (F12) > Application > Cookies >.bilibili.com.
From this checkout, use the CLI to query any of the 12 tools without configuring an MCP client or starting a persistent server:
tools lists names and descriptions; tools TOOL returns the full MCP schema,
including required arguments, defaults, and limits. call TOOL accepts the same
names and JSON arguments as the MCP tools. IDs declared as strings in the schema
must remain quoted, including numeric UIDs and long article/dynamic IDs.
For larger arguments or to avoid shell quoting issues, read a UTF-8 JSON file or pipe a JSON object through stdin:
Set the environment variables below in the calling shell, for example
$env:BILI_COOKIE_FILE = 'D:\BiliStalkerSecrets\bili-cookie.txt' in PowerShell.
An MCP client's env configuration is not automatically inherited by a separate
terminal. The CLI uses the same credential, refresh, proxy, and rate-limit behavior
as MCP. Help, version, and tool discovery do not require login credentials.
If the checkout already has a .env file, load it explicitly for the command;
neither the CLI nor a plain uv run automatically loads it:
Successful queries write one UTF-8 JSON value to stdout; logs and errors go to
stderr. Redirect stdout to save a result. Exit codes are 0 for success, 1 for
query/configuration failures, 2 for invalid commands or arguments, and 130 for
interruption. Query failures end with a JSON error object on stderr; risk-control
errors retain code and retry_after. A snapshot can succeed with incomplete
sections: inspect its errors field before interpreting it.
uv run python -m bili_stalker_mcp ... accepts the same arguments. With an
installed package, use bili-stalker-mcp ... directly. Running without a subcommand
still starts the MCP stdio server; bili-stalker-mcp serve makes that explicit.
| Key | Req | Description |
|---|---|---|
SESSDATA | Conditional | Bilibili session token; required unless BILI_COOKIE_FILE provides it. |
BILI_JCT | No | CSRF protection token. |
BUVID3 | No | Hardware fingerprint (reduces rate-limiting risk). |
BILI_COOKIE_FILE | No | Path to a plain Cookie file. |
BILI_REFRESH_TOKEN_FILE | No | Path to the separate refresh-token file; never set the token through an environment variable. |
BILI_ENABLE_COOKIE_REFRESH | No | true enables safe automatic refresh; default: false. |
BILI_COOKIE_REFRESH_CHECK_INTERVAL_SECONDS | No | Refresh-check interval; default: 21600, minimum: 60. |
BILI_PROXY | No | Route all upstream requests (bilibili_api and the built-in HTTP clients) through this proxy. Recommended when the system proxy is not picked up automatically or DNS resolution for Bilibili hosts is unstable. If the proxy is unreachable at startup, the server falls back to direct connections and logs a warning. |
BILI_REQUEST_JITTER_MODE | No | Upstream jitter behavior: adaptive (default; sleeps only without a configured login or after recent 412/429/403), always, never. |
BILI_REQUEST_JITTER_MIN_MS / BILI_REQUEST_JITTER_MAX_MS | No | Jitter sleep range; default: 200β1200. |
BILI_REQUEST_JITTER_BUDGET_MS | No | Total jitter sleep allowed per tool call; default: 500. |
BILI_RISK_PRESSURE_WINDOW_SECONDS | No | How long a 412/429/403 keeps adaptive jitter engaged; default: 300. |
BILI_LOG_LEVEL | No | DEBUG, INFO (Default), WARNING. |
BILI_TIMEZONE | No | Output time zone for formatted timestamps (default: Asia/Shanghai). |
Automatic refresh is disabled by default. Enable it only when the Cookie file and
refresh-token file are existing, readable, writable regular files. The Cookie file
may contain only ordinary Cookie values (SESSDATA, bili_jct, buvid3,
buvid4, and DedeUserID); the refresh token belongs only in its own file.
When refresh is enabled, do not set SESSDATA, BILI_JCT, or DEDEUSERID in
the environment: those rotating values must come from the Cookie file so a restart
cannot reload stale credentials. BUVID3 and BUVID4 may still be provided through
the environment. Refresh checks are rate-limited, and concurrent MCP calls or server
processes sharing these files use one refresh lock. Pending confirmation is recovered
before another refresh. The .bili-cookie-refresh.lock sidecar may remain on disk
between runs.
For a quicker initial setup, copy the complete Cookie header value from a Bilibili
browser request and ac_time_value from Local Storage, then run:
For a PyPI-only invocation without cloning this repository:
The script hides both pasted values, refuses directories inside the repository and
existing credential files, and prints only a non-secret MCP env block. Do not
paste an entire cURL command: paste only the value after its cookie: header.
All verification commands use mocks and do not require Bilibili credentials:
Factual signals from GitHub, npm, and our automated checks β not a rating.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/222wcnm-bilistalkermcp)<a href="https://allmcps.com/mcp/222wcnm-bilistalkermcp"><img src="https://allmcps.com/api/badge/222wcnm-bilistalkermcp?style=directory" alt="222wcnm Bilistalkermcp on AllMCPs" /></a>