Bilibili MCP server

Bilibili MCP: your AI searches videos and reads danmaku, subtitles and comments without a login

Add the URL to Claude, Cursor or ChatGPT and your agent can search Bilibili videos by views, upload date or saves, read play, danmaku, coin and favorite counts, pull three kinds of text (the subtitle transcript, the danmaku and the comment section), and check an uploader's followers and uploads. EveryInfra runs the server: no Bilibili account, cookies, QR-code scan or local browser.

14
Bilibili capabilities
24
tools
110
platforms
MCP server URL
https://api.everyinfra.com/mcp

In mainland China, use this URL: https://api-cn.everyinfra.com/mcp

Your agent's first call: the most-viewed Python tutorials

everyinfra_call_api
{
  "platform": "bilibili",
  "action": "search",
  "params": {
    "keyword": "Python 教程",
    "sort": "most_viewed"
  }
}

Each url is a video link with its BV ID, ready for video, subtitles, danmaku and comments; author_id is the uploader's numeric mid for profile and user_posts.

14 Bilibili capabilities, from videos and danmaku to uploaders

everyinfra_list_capabilities lists the parameters of every row below, and your agent calls one with everyinfra_call_api, platform set to bilibili and action set to the first column. Beyond videos, comments, danmaku and subtitles there are popular videos, general search, uploader search, a video's parts, following and follower counts, and short-link resolving.

actionCapabilityPrice
searchSearch$0.56 per 1,000 requests
profileDetails$0.56 per 1,000 requests
user_postsPosts by user$0.56 per 1,000 requests
videoVideo details$0.56 per 1,000 requests
commentsComments$0.56 per 1,000 requests
danmakuOn-screen video comments$0.56 per 1,000 requests
subtitlesSubtitles$0.79 per 1,000 requests
popularPopular$0.81 per 1,000 requests
user_searchAccount search$0.56 per 1,000 requests
general_searchGeneral search$0.79 per 1,000 requests
comment_repliesComment replies$0.56 per 1,000 requests
video_partsVideo parts$0.56 per 1,000 requests
followersFollowers$0.56 per 1,000 requests
resolve_linksLink recognition$0.56 per 1,000 requests

How one keyword leads to danmaku, comments and the uploader

The BV link from search opens the next steps: video and subtitles read the video itself, danmaku and comments read the audience, and author_id goes to profile and user_posts.

  1. Find videos with search

    search

    keyword is a video title or topic, not an uploader's nickname. sort takes relevance, newest, most_viewed, most_commented or most_liked, and most_liked actually ranks by saves, not likes. since and until filter by upload date in Beijing time. You get 20 by default, up to 50, each with plays, danmaku, likes, saves, comments and length.

  2. Read the video with video and subtitles

    videosubtitles

    video returns the title, tags and uploader with view_count, danmaku_count, coin_count, favorite_count, share_count and other counts; the description and category are sometimes missing. subtitles returns the full speech transcript with timed segments, so your agent can quote the uploader at a given moment.

  3. Read the audience with danmaku and comments

    danmakucomments

    danmaku reads the scrolling comments on the first part, 50 by default and up to 200, each with video_time_seconds for when it appears and sent_at for when it was sent. comments reads the comment section: without page_token you get up to 10; to page, send an empty page_token first, then pass back the token each page returns, up to 20 per page. Hand busy comments to comment_replies.

  4. Check the uploader with profile and user_posts

    profileuser_posts

    user_id is the uploader's numeric mid, the digits after space.bilibili.com/; don't use a nickname, BV ID or the whole profile link. profile returns followers, level, verification, the is_vip flag and likes received; user_posts lists uploads, 20 by default and up to 50.

Then ask for what you need

The agent checks the capability catalog first, then picks a tool and its parameters. Each example links to the matching API page, so you can review the parameters and fields first.

  1. Find the most-viewed Python tutorials on Bilibili and list the title, uploader and views.

    Tool used: everyinfra_call_apiBilibili · Search

  2. How many plays, danmaku, coins and favorites does this Bilibili video have?

    Tool used: everyinfra_call_apiBilibili · Video details

  3. Read the danmaku on this video and find the moments viewers react to most.

    Tool used: everyinfra_call_apiBilibili · On-screen video comments

  4. Pull the comments on this Bilibili video and sum up the questions people ask most.

    Tool used: everyinfra_call_apiBilibili · Comments

Add it to your client

Enter https://api.everyinfra.com/mcp in your client's remote MCP settings and add the header Authorization: Bearer with your API key. The same address has 24 tools: everyinfra_call_api for Bilibili, plus search, CAPTCHA solving, AI and account tools.

mcp.json
{
  "mcpServers": {
    "everyinfra": {
      "url": "https://api.everyinfra.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

Keep the API key in your client's secret or environment settings, and never commit it to a repository.

Step-by-step setup for Claude, Cursor and other clients, plus every tool

Frequently asked questions

Does Bilibili have an official API?

Yes, the Bilibili Open Platform, but you have to register and pass identity verification first, its data interfaces serve upload management and read only the authorizing uploader's own videos, and calls go through OAuth. There is no interface there for other uploaders' public videos, danmaku or comments. The Bilibili MCP reads public content with no registration or authorization.

Which parts of Bilibili can my agent read?

14 capabilities: video search, general search, uploader search, popular videos, video details and parts, subtitle transcripts, danmaku, comments and replies, uploader profiles, uploads, following and follower counts, and short-link resolving. Read-only: it never sends danmaku, comments or coins.

Will I have to sign in with a Bilibili account?

No. All you need is your EveryInfra API key: no Bilibili account, cookies or QR-code scan, and no script on your machine.

How are Bilibili calls priced?

Bilibili capabilities are priced at from $0.56 per 1,000 requests. When search or comments is paged, each page is one call. MCP access itself is free, as is everyinfra_list_capabilities, and an empty, failed or invalid call is never billed.

What is the setup in Claude or Cursor?

Add https://api.everyinfra.com/mcp and the Authorization header in the remote MCP settings of Claude or Cursor; setup for ChatGPT, Claude Code and Codex is on the remote MCP overview. Then ask it to find the most-viewed Python tutorials and see where the danmaku says viewers get stuck, and the agent will call search and then danmaku.

Where do people usually go wrong with Bilibili?

Comments, danmaku and subtitles are three different texts: comments is the comment section, danmaku is the text that scrolls over playback (first part only), and subtitles is the speech transcript. most_liked in sort ranks by saves, not likes. When you pass since or until, sort can only be relevance, newest, most_viewed or most_liked.

Hand your agent Bilibili danmaku and comments

Sign up, create an API key in the console, and add it to the configuration above to start calling these tools from your chat.

Start for freeView pricing

Google Analytics needs consent. Privacy