MCPcopy Index your code
hub / github.com/34892002/bilibili-mcp-js

github.com/34892002/bilibili-mcp-js @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
36 symbols 95 edges 10 files 2 documented · 6%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Bilibili MCP

English 中文文档 日本語

概要

これは Model Context Protocol (MCP) に基づいた Bilibili 動画検索サーバーです。このサーバーはシンプルな API インターフェースを提供し、ユーザーが Bilibili の動画コンテンツを検索できるようにします。LangChain の使用例とテストスクリプトが含まれています。

謝辞

特徴

  • Bilibili動画コンテンツ概要リストの検索
  • Bilibiliホットコンテンツの取得(総合ホット、必見、ランキング、音楽チャート)
  • Bilibili動画詳細情報の取得(BV番号またはAV番号をサポート)
  • UP主情報の取得(基本情報、フォロワー数、フォロー数など)
  • 番組タイムライン(時間範囲内のアニメ放送情報)

システム要件

  • Node.js >= 20.12.0

AIツール設定

Traeを例として

npm package

HQHCが公開したnpmパッケージに感謝

{
  "mcpServers": {
    "bilibili-search": {
    "command": "npx",
    "args": ["bilibili-mcp-js"],
    "description": "Bilibili動画検索用MCPサービス。AIアプリケーションでBilibiliの動画コンテンツを検索できます。"
    }
  }
}

ローカルコンパイル使用

使用前にコンパイルが必要です。 まず npm run build を実行し、次にビルド後の dist フォルダのパスに変更してください。"args": ["d:\your-path\bilibili-mcp-js\dist\index.js"]

{
  "mcpServers": {
    "bilibili-search": {
      "command": "node",
      "args": ["d:\\your-path\\bilibili-mcp-js\\dist\\index.js"],
      "description": "Bilibili動画検索用MCPサービス。AIアプリケーションでBilibiliの動画コンテンツを検索できます。"
    }
  }
}

クイックスタート

LangChain の例を実行する場合は、まず LLM モデルを設定し、.\example.ts ファイルを修正してください。

const llm = new ChatOpenAI({
  modelName: "gpt-4o-mini",
  temperature: 0,
  openAIApiKey: "your_api_key", // あなたのモデルの API キーに置き換えてください
  configuration: {
    baseURL: "https://www.api.com/v1", // あなたのモデルの API アドレスに置き換えてください
  },
});

bun:

# 依存関係をインストール
bun i
# stdio モード
bun index.ts
# streamable http モード
TRANSPORT=remote bun index.ts
TRANSPORT=remote PORT=8888 bun index.ts
# テストスクリプト
bun test.js
# MCP Inspector
bun run inspector
# LangChain の例を実行
bun build:bun
bun example.ts

npm:

# 依存関係をインストール
npm i
# stdio モード
npm run start
# streamable http モード
TRANSPORT=remote npm run start
TRANSPORT=remote PORT=8888 npm run start
# テストスクリプト
npm run test
# MCP Inspector
npm run inspector
# LangChain の例を実行
npm run build
node dist/example.js

スクリーンショット

Extension points exported contracts — how you extend this code

BilibiliSearchResult (Interface)
(no doc)
index.ts

Core symbols most depended-on inside this repo

fixUrl
called by 11
src/index.ts
getBilibiliCookies
called by 7
src/index.ts
formatDate
called by 4
index.ts
formatDuration
called by 3
index.ts
cleanTitle
called by 2
index.ts
sendNextTest
called by 2
test/hot.js
getVideoDetail
called by 2
src/index.ts
getUserInfo
called by 2
src/index.ts

Shape

Function 19
Method 12
Class 4
Interface 1

Languages

TypeScript100%

Modules by API surface

index.ts13 symbols
src/index.ts11 symbols
mcp-langchain-ts-client/index.ts7 symbols
test/video.js1 symbols
test/user_videos.js1 symbols
test/user.js1 symbols
test/timeline.js1 symbols
test/hot.js1 symbols

For agents

$ claude mcp add bilibili-mcp-js \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page