Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

bilibili-mcp-js

MCP.Pizza Chef: 34892002

bilibili-mcp-js is a Model Context Protocol (MCP) server that enables searching Bilibili video content through a standardized API. It supports paginated queries and returns detailed video metadata such as title, author, views, and duration. Designed for Node.js environments, it integrates easily with AI applications and LangChain workflows, providing a seamless way to access Bilibili's video data programmatically.

Use This MCP server To

Search Bilibili videos by keywords with pagination support Retrieve detailed video metadata for AI content generation Integrate Bilibili video search into chatbot or assistant workflows Use in LangChain pipelines for multimedia content retrieval Build custom video recommendation systems using Bilibili data

README

Bilibili MCP

English 中文文档 日本語

简介

这是一个基于 Model Context Protocol (MCP) 的 B站视频搜索服务器。该服务器提供了简单的 API 接口,允许用户搜索 B站 的视频内容。提供LangChain调用示例、测试脚本。

鸣谢

功能特点

  • B站视频搜索
  • 支持分页查询
  • 返回视频信息(标题、作者、播放量、时长等)
  • 基于 MCP 协议的标准化接口

系统要求

  • Node.js >= 20.12.0

npm package

感谢HQHC发布的npm包

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

快速开始

如果要运行langchain例子,请先配置llm模型,修改.\example.ts文件。

const llm = new ChatOpenAI({
  modelName: "gpt-4o-mini",
  temperature: 0,
  openAIApiKey: "your_api_key", // 替换成你模型的密钥
  configuration: {
    baseURL: "https://www.api.com/v1", // 替换成你模型的API地址
  },
});

bun:

bun i
bun index.ts
# 测试脚本
bun test.js
# MCP Inspector
bun run inspector
# 运行langchain例子
bun build:bun
bun example.ts

npm:

npm i
npm run start
# 测试脚本
npm run test
# MCP Inspector
npm run inspector
# 运行langchain例子
npm run build
node dist/example.js

截图

bilibili-mcp-js FAQ

How do I install bilibili-mcp-js?
Install via npm using 'npx bilibili-mcp' with Node.js version 20.12.0 or higher.
Can I use bilibili-mcp-js with LangChain?
Yes, it includes LangChain example scripts for easy integration.
What video information does bilibili-mcp-js return?
It returns video title, author, play count, duration, and other metadata.
Does bilibili-mcp-js support pagination?
Yes, it supports paginated queries to navigate through search results.
Is bilibili-mcp-js limited to any specific LLM providers?
No, it is model-agnostic and can be used with OpenAI, Claude, Gemini, and others.
What are the system requirements for running bilibili-mcp-js?
Requires Node.js version 20.12.0 or higher.
How do I configure the LLM model for examples?
Modify the example.ts file to set your LLM model and API key accordingly.
Is the API interface standardized?
Yes, it follows the MCP protocol for consistent and secure interaction.