This is a Bilibili video search server based on the Model Context Protocol (MCP). The server provides a simple API interface that allows users to search for video content on Bilibili. It includes LangChain usage examples and test scripts.
- LangChain example code referenced from mcp-langchain-ts-client
- Bilibili video search
- Support for paginated queries
- Returns video information (title, author, view count, duration, etc.)
- Standardized interface based on the MCP protocol
- Node.js >= 20.12.0
If you want to run the LangChain example, please configure the LLM model first by modifying 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 address
},
});
bun:
```bash
bun i
bun index.ts
# Test script
bun test.js
# MCP Inspector
bun run inspector
# Run LangChain example
bun build:bun
bun example.ts
npm:
npm i
npm run start
# Test script
npm run test
# MCP Inspector
npm run inspector
# Run LangChain example
npm run build
node dist/example.js