Book Database MCP Server
Enables querying a curated book database using MCP tools to retrieve basic or detailed book information by ISBN or title, including batch lookups.
README
Book Database MCP Server
[!NOTE] This is a small MCP (Model Context Protocol) demo server used during the GitHub Copilot Agents and MCP training sessions. It used by a demo explained in the copilot-agent-and-mcp repository.
Functional
Book Database MCP Server exposes a simple set of tools that let an MCP-capable agent or client query a curated book database. Key features:
- Retrieve a book's basic information (ISBN, title, author) by title.
- Retrieve detailed book information (summary, date, author) by ISBN.
- Batch queries: request multiple books by a list of titles or ISBNs.
- Uses small JSON files as the backing dataset (easy to read and modify for demos).
Technical
- Runtime: Node.js (TypeScript source in
src/). - Protocol: Model Context Protocol (MCP) using
@modelcontextprotocol/sdk. - Transport: Standard I/O transport (
StdioServerTransport) — this server communicates over stdio. - Validation: Input schemas are validated with
zodfor each tool. - Data:
src/data/books.json(basic list) andsrc/data/books-details.json(summaries and dates). - Tools implemented in
src/index.ts:get-book-by-isbn— takesisbn: string(10 chars)get-book-by-title— takestitle: stringget-books-by-titles— takestitles: string[]get-books-by-isbn-list— takesisbnList: string[](10-char items)
Setup
Prerequisites: Node.js (18+ recommended) and npm.
- Clone the repository and enter the demo folder:
git clone <repo-url>
cd <repo-root>
- Install dependencies:
npm install
- Build the TypeScript sources:
npm run build
The build produces build/index.js and the build folder is listed in package.json files.
Run
Start the MCP server (it runs on stdio and writes a startup log to stderr):
node build/index.js
When running successfully you should see an informational message on stderr similar to:
Book database MCP Server running on stdio
You don't need to start the server manually during the demo as it will be started by the MCP server configuration in the webapp demo repository.
Usage examples
The server exposes the tool names listed above. Example calls (conceptual):
-
Get details by ISBN:
- Tool:
get-book-by-isbn - Input:
{ "isbn": "0451524935" }# returns details for "1984"
- Tool:
-
Get basic info by title:
- Tool:
get-book-by-title - Input:
{ "title": "The Hobbit" }
- Tool:
-
Batch lookup by titles:
- Tool:
get-books-by-titles - Input:
{ "titles": ["1984", "Brave New World"] }
- Tool:
Data
The datasets are small JSON files in src/data/ so you can easily tweak entries during a workshop:
src/data/books.json— array of simple book objects (ISBN, title, author)src/data/books-details.json— object with abooksarray containing summaries and dates
Notes
- This project is intentionally small and focused on demonstrating how to serve tools over MCP.
- If you want to interactively test tools locally, write a tiny Node client that uses
StdioClientTransportfrom@modelcontextprotocol/sdkand spawn this server as a child process so their stdio streams are connected.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。