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

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

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