Model Context Protocol (MCP) server that exposes a searchable Bilibili video API with pagination and LangChain integration.
https://github.com/34892002/bilibili-mcp-jsYour AI agents can now search and retrieve video content from Bilibili - China's largest video platform with over 300 million active users. This MCP server bridges the gap between LLM applications and Bilibili's vast content ecosystem.
Building applications that understand Chinese digital culture? Analyzing video trends across different markets? You've hit a wall when it comes to accessing Bilibili data programmatically. Most developers end up scraping or building custom integrations that break frequently.
This MCP server solves that by providing a standardized interface to Bilibili's video search, metadata, and user data - complete with proper authentication handling and rate limiting built in.
Immediate Video Search: Query Bilibili's entire catalog with searchVideos("机器学习") and get structured results with titles, covers, view counts, and direct links. No more manual browsing or unreliable scrapers.
Rich Video Metadata: Pull complete video details including duration, tags, publish dates, and creator information through getVideoDetail(). Perfect for content analysis or building recommendation systems.
Live Barrage Data: Access real-time viewer comments (danmaku) with getDanmaku() - unique to Chinese video platforms and crucial for understanding audience engagement.
Smart Pagination: Built-in pagination handling means you can process large result sets without hitting API limits or overwhelming your application.
Content Research Agents: Build AI assistants that can research Chinese tech trends by searching for specific topics and analyzing video metadata patterns.
// Agent searches for AI-related content and analyzes engagement
const videos = await searchVideos("人工智能 2024", 1);
const details = await Promise.all(
videos.slice(0,10).map(v => getVideoDetail(v.aid))
);
// Now analyze which AI topics get the most engagement
Cross-Platform Content Analysis: Compare video performance across YouTube and Bilibili by feeding both data sources into your analysis pipeline.
Educational Content Curation: Create systems that automatically discover and categorize educational videos in Chinese, complete with engagement metrics and creator profiles.
Trend Detection Systems: Monitor emerging topics in Chinese digital culture by analyzing video titles, tags, and publication patterns over time.
Drop it into your MCP-compatible setup in under 5 minutes:
{
"mcpServers": {
"bilibili-search": {
"command": "npx",
"args": ["bilibili-mcp"],
"description": "Access Bilibili video search and metadata"
}
}
}
For authenticated features (user profiles, interactions), just set your Bilibili session cookies as environment variables. The server handles all the auth complexity and rate limiting automatically.
Works immediately with Claude, ChatGPT, and any MCP-compatible application. The LangChain integration example gets you started with agent workflows that can search, analyze, and report on Bilibili content.
This isn't a quick hack - it's a production-ready server with proper error handling, retry logic, and clean TypeScript interfaces. The 100+ GitHub stars and active maintenance show it's already being used in real applications.
Authentication works seamlessly with Bilibili's cookie system, and the server gracefully handles rate limits with automatic backoff. You get reliable access to a platform that serves over 15 billion hours of video content monthly.
Perfect for AI applications targeting Chinese markets, cross-cultural content analysis, or any system that needs real-time access to one of the world's largest video platforms.