https://github.com/34892002/bilibili-mcp-js
https://github.com/34892002/bilibili-mcp-js
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/34892002/bilibili-mcp-js
- Owner: 34892002
- Created: 2025-03-24T10:27:50.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2025-03-25T10:57:47.000Z (about 1 month ago)
- Last Synced: 2025-03-25T11:36:13.022Z (about 1 month ago)
- Language: JavaScript
- Size: 17.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-mcp-zh - 34892002/bilibili-mcp-js
- awesome-mcp-servers - Bilibili MCP Searcher - Searches Bilibili videos via a Model Context Protocol (MCP) API, providing video metadata and supporting pagination (Table of Contents / Other Tools and Integrations)
- awesome-mcp-servers - @34892002/bilibili-mcp-js - Bilibiliコンテンツの検索をサポートするMCPサーバー。LangChain連携のサンプルとテストスクリプトを提供。 (サーバー実装 / 📂 <a name="browser-automation"></a>ブラウザ自動化)
README
# Bilibili MCP
[](README-en.md)
[](README.md)
[](README-ja.md)## 简介
这是一个基于 Model Context Protocol (MCP) 的 B站视频搜索服务器。该服务器提供了简单的 API 接口,允许用户搜索 B站 的视频内容。提供LangChain调用示例、测试脚本。## 鸣谢
- LangChain 示例代码参考自 [mcp-langchain-ts-client](https://github.com/isaacwasserman/mcp-langchain-ts-client)## 功能特点
- B站视频搜索
- 支持分页查询
- 返回视频信息(标题、作者、播放量、时长等)
- 基于 MCP 协议的标准化接口## 系统要求
- Node.js >= 20.12.0## 快速开始
> 如果要运行langchain例子,请先配置llm模型,修改.\example.ts文件。
```javascript
const llm = new ChatOpenAI({
modelName: "gpt-4o-mini",
temperature: 0,
openAIApiKey: "your_api_key", // 替换成你模型的密钥
configuration: {
baseURL: "https://www.api.com/v1", // 替换成你模型的API地址
},
});
```bun:
```bash
bun i
bun index.ts
# 测试脚本
bun test.js
# MCP Inspector
bun run inspector
# 运行langchain例子
bun build:bun
bun example.ts
```npm:
```bash
npm i
npm run start
# 测试脚本
npm run test
# MCP Inspector
npm run inspector
# 运行langchain例子
npm run build
node dist/example.js
```## 截图

