douban-mcp
Provides tools to search and retrieve information about books, movies, TV shows, and group topics from Douban, including details, reviews, and browsing capabilities.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@douban-mcp search for the movie Inception"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
豆瓣 MCP 服务器
一个基于 Model Context Protocol (MCP) 的豆瓣数据服务,提供图书、电影、电视剧和小组话题相关查询能力,适合接入 Claude Desktop、Cherry Studio、5ire、MCP Inspector 等支持 stdio 的 MCP 客户端。
项目定位
本项目面向“工具调用”场景,而不是完整的豆瓣网页封装。当前重点是提供以下几类能力:
图书搜索与图书长评列表
电影 / 电视剧搜索
电影 / 电视剧详情
电影 / 电视剧长评列表
豆瓣小组话题列表与话题详情
在本地默认浏览器中打开豆瓣图书页面
Related MCP server: mcp-server-weread
工具总览
当前服务实际注册的 MCP tools 如下:
Tool | 说明 |
| 按关键词或 ISBN 搜索图书 |
| 获取图书长评列表 |
| 搜索电影或电视剧 |
| 获取电影详情 |
| 获取电视剧详情 |
| 获取电影长评列表 |
| 获取电视剧长评列表 |
| 在默认浏览器打开图书详情页 |
| 获取小组话题列表 |
| 获取小组话题详情 |
工具说明
search-book
按关键词或 ISBN 搜索图书。q 和 isbn 至少需要提供一个。
参数:
参数 | 类型 | 必填 | 说明 |
|
| 否 | 图书搜索关键词,例如 |
|
| 否 | ISBN 编号,例如 |
返回特点:
返回 Markdown 表格
包含出版时间、书名、作者、评分、豆瓣 ID、ISBN
list-book-reviews
获取指定图书的长评列表。
参数:
参数 | 类型 | 必填 | 说明 |
|
| 是 | 豆瓣图书 ID |
返回特点:
返回 Markdown 表格
包含标题、评分、摘要、评论 ID
search-movie
搜索电影或电视剧。结果中会同时返回结构化文本摘要和完整 raw_json,便于 LLM 二次解析。
参数:
参数 | 类型 | 必填 | 说明 |
|
| 是 | 电影或电视剧关键词,例如 |
返回特点:
每个结果包含
title、type、year、rating、subtitle、id、uri末尾附带
raw_json搜索结果可能同时包含电影和电视剧
get-movie-detail
获取电影详情。
参数:
参数 | 类型 | 必填 | 说明 |
|
| 是 | 豆瓣电影 ID,例如 |
返回特点:
返回结构化文本
包含标题、原名、年份、类型、评分、类型标签、国家/地区、语言、上映日期、片长、导演、演员、别名、简介
末尾附带完整
raw_json
get-tv-detail
获取电视剧详情。
参数:
参数 | 类型 | 必填 | 说明 |
|
| 是 | 豆瓣电视剧 ID,例如 |
返回特点:
输出结构与
get-movie-detail一致末尾附带完整
raw_json
list-movie-reviews
获取电影长评列表。
参数:
参数 | 类型 | 必填 | 说明 |
|
| 是 | 豆瓣电影 ID |
返回特点:
返回 Markdown 表格
包含标题、评分、摘要、评论 ID
list-tv-reviews
获取电视剧长评列表。
参数:
参数 | 类型 | 必填 | 说明 |
|
| 是 | 豆瓣电视剧 ID |
返回特点:
返回 Markdown 表格
包含标题、评分、摘要、评论 ID
browse
在本机默认浏览器中打开图书详情页。
参数:
参数 | 类型 | 必填 | 说明 |
|
| 是 | 豆瓣图书 ID |
说明:
这是本地动作,不返回网页内容
适合在桌面环境中配合 MCP 客户端使用
list-group-topics
获取豆瓣小组话题列表,支持按小组、标签、日期过滤。
参数:
参数 | 类型 | 必填 | 说明 |
|
| 否 | 豆瓣小组 ID,默认值为 |
|
| 否 | 标签过滤,例如 |
|
| 否 | 起始日期,格式 |
返回特点:
返回话题列表
适合配合
get-group-topic-detail继续获取单个话题正文
get-group-topic-detail
获取单个豆瓣小组话题详情。
参数:
参数 | 类型 | 必填 | 说明 |
|
| 是 | 豆瓣话题 ID |
返回特点:
返回话题详细内容
包含正文、摘要及相关元数据
输出格式说明
为了兼顾“人读”和“模型读”,当前工具输出主要分为两类:
表格型输出:主要用于评论列表和图书搜索,适合直接展示
结构化文本输出:主要用于电影 / 电视剧搜索与详情,字段稳定,并保留
raw_json
如果你在上层 Agent 中需要更可靠地抽取字段,优先使用带 raw_json 的工具输出。
使用要求
运行环境
Node.js 18+
支持 stdio 的 MCP 客户端
能访问豆瓣接口的网络环境
Cookie
部分接口依赖豆瓣 Cookie。未提供有效 Cookie 时,部分请求可能失败、返回不完整,或触发风控。
当前通过环境变量 COOKIE 注入,例如:
export COOKIE='bid=...; ck=...; dbcl2=...; frodotk_db=...;'接入示例
Claude Desktop / 通用 MCP 配置
{
"mcpServers": {
"douban-mcp": {
"command": "node",
"args": [
"/absolute/path/to/douban-mcp/dist/index.js"
],
"env": {
"COOKIE": "bid=...;ck=...;dbcl2=...;frodotk_db=..."
}
}
}
}本地开发
npm install
npm run build
npm start常用命令:
命令 | 说明 |
| 编译 TypeScript 并生成 |
| 监听编译 |
| 启动 MCP 服务 |
测试说明
仓库当前包含一个基于 MCP 客户端直连的集成测试脚本:
node tests/mcp-tools.mjs注意:
package.json里仍保留了npm test -> jest当前仓库未看到对应的 Jest 测试配置,实际验证建议优先运行上面的集成脚本
已知限制
豆瓣接口并非公开稳定官方 MCP 接口,返回结构可能变化
依赖 Cookie 和当前可用网络环境
browse需要桌面环境,不适合纯无头服务器README 中列出的能力以当前代码为准,若接口升级请同步更新文档
依赖
参考资料
License
MIT
Available Tools
10 toolsbrowseB
open default browser and browse douban book detail
Inputs: id (required).
get-group-topic-detailD
get group topic detail
Inputs: id (required).
get-movie-detailD
get movie detail
Inputs: id (required).
get-tv-detailD
get tv detail
Inputs: id (required).
list-book-reviewsD
list book reviews
Inputs: id (required).
list-group-topicsC
list group topics
Inputs: id, tags, from_date.
list-movie-reviewsC
list movie reviews
Inputs: id (required).
list-tv-reviewsC
list tv reviews
Inputs: id (required).
search-bookA
search books from douban, either by ISBN or by query
Inputs: q, isbn.
search-movieB
search movies or tvs from douban by query
Inputs: q (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool targets a distinct resource and action: books, movies, TV, or group topics. Even though search-movie covers both movies and TV, the separate detail tools clarify the scope. No two tools appear to do the same thing.
Most tools follow a consistent verb_noun pattern with hyphen-separated words (search-*, list-*, get-*). The exception is 'browse', which is a bare verb without a named resource, and search-movie implies only movies though it also covers TV. Overall, the pattern is readable and mostly uniform.
With 10 tools, the count is well within the typical range for a domain-specific server. It covers multiple resource types without being bloated, and each tool serves a clear purpose.
The set covers search, list, and detail operations for movies/TV and group topics, but lacks a dedicated get-book-detail tool; instead, 'browse' opens a browser, which is a workaround. There are also no mutation operations, but that may be acceptable for a public data server. Missing a get-book-detail is a notable gap.
Maintenance
Related MCP Connectors
MCP server for real-time Chinese internet hot-search and trending boards across major platforms.
MCP server aggregating hot-search boards from 8 Chinese platforms (Weibo, Zhihu, Bilibili, Douyin).
MCP server for Chinese dictionary lookup: character definitions, pinyin, stroke order and word
MCP server for China Railway 12306 ticket availability: schedules and seats by Chinese station name.
Related MCP Servers
- AlicenseCqualityDmaintenanceEnables interaction with Douban content including searching and reviewing books, movies, TV shows, and browsing group discussions. Supports searching by ISBN or keywords, retrieving reviews, and managing group topics with filtering capabilities.87 npm13MIT
- FlicenseAqualityDmaintenanceAn MCP server enabling LLMs to access WeChat Reading bookshelf, notes, highlights, and reviews via tools like get_bookshelf, search_books, and get_book_notes_and_highlights.4174 npm169-
- AlicenseAqualityBmaintenanceMCP server and CLI for accessing Douban movie and book data, including search, details, reviews, charts, and user collections. Supports read-only and write operations (mark movies/books) when authenticated.11249 npm17MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for querying the availability and status of movie resource sites, including online/offline status, response times, and search functionality.4MIT