bookshelf

bookshelf

Enables managing a personal bookshelf (CRUD, reading status, tags) and searching/importing Douban book metadata through MCP tools for AI clients like Claude and Cursor.

Category
Visit Server

README

Bookshelf

个人书架应用:书籍管理 + 豆瓣元数据抓取 + MCP 服务。

  • 前端:React 18 + Vite(纯静态)
  • 后端:Fastify 单进程(REST API + MCP + 静态托管)
  • 数据库:better-sqlite3 + Drizzle(迁移内联在代码中)
  • 元数据:cheerio 抓取豆瓣读书

功能

  • 书籍增删改查、阅读状态(想读/未读/在读/已读)、标签分类、置顶
  • 豆瓣元数据搜索与一键导入(封面、作者、简介、ISBN、评分等)
  • 书架筛选(按状态 / 标签 / 关键词)
  • MCP 服务:10 个工具(豆瓣搜索、增删改查、标签),可供 Claude / Cursor 等客户端调用

快速开始

pnpm install
pnpm dev        # 并行启动 server(:3000) 和 web(:5173)
  • 前端:http://localhost:5173(/api/covers 代理到 3000)
  • 后端:http://localhost:3000(REST /api/*、MCP /mcp、封面 /covers/*

常用命令

pnpm build      # 构建全部 workspace
pnpm typecheck  # 全包类型检查
pnpm --filter @bookshelf/server mcp:test   # MCP 端到端测试

MCP 接入

将以下配置加入 MCP 客户端(如 Claude Desktop / Cursor):

{
  "mcpServers": {
    "bookshelf": {
      "url": "http://localhost:3000/mcp"
    }
  }
}

部署(Docker)

# 构建并推送镜像(交叉编译到 amd64)
docker buildx build --platform linux/amd64 -t lijf0406/bookshelf:latest . --push

# 服务器端(需预建 external 网络 web-network)
docker compose pull && docker compose up -d

数据目录由 BOOKSHELF_DATA_DIR 控制(默认 data/),内含 bookshelf.dbcovers/logs/。日志按天轮转,保留天数由 BOOKSHELF_LOG_DAYS 控制(默认 14)。

项目结构

职责
apps/web React 18 + Vite 前端
apps/server Fastify:REST API + MCP + 静态服务
packages/shared 纯类型 / 常量
packages/db better-sqlite3 + Drizzle,迁移内联
packages/douban cheerio 抓取豆瓣元数据

协议

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured