bilibili-mcp

bilibili-mcp

A MCP tool to fetch Bilibili hot list videos, supporting configurable top-K results via async HTTP requests.

Category
Visit Server

README

下面是为你的 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.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured