Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

A FastMCP-based tool that fetches Bilibili's trending videos and exposes them via a standard MCP interface.

README.md

下面是为你的 bilibili-mcp 工具生成的 README.md 示例:

---

📺 bilibili-mcp

一个用于获取 B 站热榜的 MCP 工具,基于 FastMCP 和 B 站公开接口。你可以通过注册到 Cursor 或其他 MCP 客户端,实时调用热门视频数据。

🚀 快速开始

1. 安装依赖

确保使用 Python ≥ 3.12,并安装以下依赖项:

pip install httpx "mcp[cli]>=1.6.0"

2. 项目结构示例

你的主代码文件可以是 bilibili_mcp.py,项目结构如下:

bilibili_mcp/
├── bilibili_mcp.py
├── pyproject.toml
└── README.md

3. 启动 MCP Server

使用 uv 运行工具:

uv tool run bilibili-mcp

或通过配置文件引用:

"bilibili-j": {
  "command": "uv",
  "args": [
    "tool",
    "run",
    "bilibili-mcp"
  ]
}

4. 注册工具

FastMCP 会自动暴露一个名为 get_popular 的工具:

📦 get_popular(top_k: int = 3)

获取 B 站热榜视频信息,返回最多 top_k 个条目(最大 10 条)。

返回示例:
[
  {
    "title": "“战火啊,能不能在黎明前停歇一次”",
    "link": "https://b23.tv/BV1...z",
    "desc": "喜欢的朋友可以点赞投币关注一下哦,你的支持是我最大的动力!!",
    "view": 1234567,
    "like": 98765
  },
  ...
]

🛠 技术说明

  • 使用 httpx 实现异步请求
  • 通过 FastMCP 注册为标准 MCP 工具
  • 支持通过 stdio 与 MCP 客户端通信(例如 Cursor)

📌 注意事项

  • 仅用于学习与研究,B 站接口为公开接口,使用时请避免过于频繁访问。
  • 默认 User-Agent"qwq",可根据实际情况更改为更合理的字符串。

📄 License

MIT License.

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Browser & Scraping servers.