Back to MCP Catalog

Bilibili Video Search MCP Server

SearchTypeScript
Search for videos on Bilibili and retrieve detailed video information
Available Tools

search_videos

Search for videos on Bilibili with pagination support

querypagepageSize

Bilibili Video Search is a Model Context Protocol (MCP) server that enables AI applications to search for videos on Bilibili, China's popular video sharing platform. The server provides a standardized API interface that returns comprehensive video information including titles, authors, view counts, and durations. With pagination support, it allows for efficient exploration of Bilibili's vast content library.

Installation

You can install the Bilibili Video Search MCP server using npm:

{
  "mcpServers": {
    "bilibili-search": {
      "command": "npx",
      "args": ["bilibili-mcp"],
      "description": "B站视频搜索 MCP 服务,可以在AI应用中搜索B站视频内容。"
    }
  }
}

Manual Installation

If you prefer to install from source:

  1. Clone the repository:

    git clone https://github.com/34892002/bilibili-mcp-js.git
    cd bilibili-mcp-js
    
  2. Install dependencies using either npm or bun:

    # Using npm
    npm install
    
    # Using bun
    bun install
    
  3. Start the server:

    # Using npm
    npm run start
    
    # Using bun
    bun index.ts
    

Testing

You can test the server using the provided test script:

# Using npm
npm run test

# Using bun
bun test.js

Using with LangChain

The repository includes a LangChain example. To run it:

  1. Configure your LLM model by editing the example.ts file:

    const llm = new ChatOpenAI({
      modelName: "gpt-4o-mini",
      temperature: 0,
      openAIApiKey: "your_api_key", // Replace with your model's API key
      configuration: {
        baseURL: "https://www.api.com/v1", // Replace with your model's API URL
      },
    });
    
  2. Build and run the example:

    # Using npm
    npm run build
    node dist/example.js
    
    # Using bun
    bun build:bun
    bun example.ts
    

MCP Inspector

You can use the MCP Inspector to explore the API:

# Using npm
npm run inspector

# Using bun
bun run inspector

System Requirements

  • Node.js >= 20.12.0

Related MCPs

SearXNG
SearchTypeScript

Web search capabilities through SearXNG API integration

Hacker News
SearchPython

Access and search Hacker News content programmatically

Web Search
SearchJavaScript

Free Google search integration with no API keys required

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.