Skip to content

L-Chris/bilibili-mcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bilibili MCP Server

English | 中文

This MCP server provides functionality to search and interact with Bilibili (a Chinese video sharing platform) content including videos, subtitles, and video information.

Features

  • Search Bilibili videos by keywords
  • Get video subtitles (AI-generated)
  • View video information and details
  • Generate AI subtitles for media files using Bcut API

Components

Tools

  • search_video

    • Search videos from Bilibili
    • Input:
      • keyword (string): Search keyword
      • page (int, optional): Page number, defaults to 1
      • page_size (int, optional): Results per page, defaults to 20
  • get_video_subtitle

    • Get subtitles from a Bilibili video
    • Input:
      • bvid (string): Bilibili video ID (BV format)
  • get_video_info

    • Get detailed information about a Bilibili video
    • Input:
      • bvid (string): Bilibili video ID (BV format)
  • get_media_subtitle

    • Get AI-generated Chinese subtitles for media files using Bcut API
    • Input:
      • url (string): Media file URL

Getting started

  1. Clone the repository
  2. Install dependencies: pip install -r requirements.txt
  3. Set up environment variables (get from bilibili website's cookies):
    • sessdata: Bilibili SESSDATA
    • bili_jct: Bilibili bili_jct
    • buvid3: Bilibili buvid3
  4. Start the server: python server.py

Usage with Desktop App

To integrate this server with a desktop app, add the following to your app's server configuration:

{
  "mcpServers": {
    "bilibili-mcp": {
      "command": "python",
      "args": [
        "{ABSOLUTE PATH TO FILE HERE}/server.py"
      ],
      "env": {
        "sessdata": "your-bilibili-sessdata",
        "bili_jct": "your-bilibili-bili_jct",
        "buvid3": "your-bilibili-buvid3"
      }
    }
  }
}

Development

  • Install dependencies: pip install -r requirements.txt
  • Start the server: python server.py

Dependencies

Resources

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages