On-Demand-Books

io.github.gmlewis由 GitHub 账号 gmlewis 发布v0.2.0更新于 Oct 27, 2026

Find personalized puzzle books by first name from a 100,000+ title Shopify catalog.

已验证Streamable HTTP可网页运行网页搜索与抓取商业与电商

概览

AI 生成的概览

按名字在十万余种 Shopify 个性化益智书目录中检索,返回购买链接、封面图和 ISBN。

可以做什么
  • 按收礼人名字搜索个性化益智书,区分完全匹配与相近名字
  • 在拼写不确定时推荐可用的名字,可按前缀筛选
  • 根据商品 handle 重新解析单本书的购买链接、封面图和 ISBN
  • 为每本匹配的书返回直接的 Shopify 购买链接、封面图和 ISBN
适用场景
适合在挑选个性化礼物(例如给孩子的生日礼物)时使用,用户希望得到印有特定名字的益智书。可帮助手确认某名字是否有货、给出替代名字,并提供直接购买链接。
运行要求
需要远程 Streamable HTTP 端点;未声明需要安装、账号、API 密钥或环境变量。客户端需支持 Streamable HTTP 传输。
安装前请注意
结果指向第三方 Shopify 商店,助手只提供购买链接,不代为完成购买。搜索词(名字)会发送到该服务器及其上游搜索 API。未声明任何身份验证,应视为公开端点。

安装

在 SourceWeft 中

  1. 打开 控制台中的 On-Demand-Books,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.gmlewis%2Fon-demand-books/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "on-demand-books": {
      "type": "http",
      "url": "https://on-demand-books-dq2yvpdh.fermyon.app/"
    }
  }
}

README

on-demand-books MCP Server

An MCP (Model Context Protocol) server that helps AI agents find the perfect personalized puzzle book gift from a catalog of 100,853 customized books available on the On-Demand-Books Shopify store.

Add this server to any MCP-compatible AI agent (Claude Desktop, opencode, etc.) and your agent will be able to search for books by the recipient's first name and hand the buyer a direct Shopify purchase link.

Demo

[on-demand-books MCP demo]

Tools provided

ToolPurpose
search_booksSearch the 100k+ personalized catalog by first name. Returns up to 9 matching books (mazes, name-sudokus, word searches across 3 difficulty levels) with direct Shopify purchase URLs, cover images, and ISBNs. Distinguishes exact matches from similar-name matches.
suggest_namesSuggest popular first names for which books are available, optionally filtered by a prefix. Use when a buyer is unsure of a spelling or wants gift-recipient ideas.
get_bookRe-resolve a single book's Shopify purchase URL from its product handle (as returned by search_books).

Live endpoint

https://on-demand-books-dq2yvpdh.fermyon.app/

Hosted on Fermyon Cloud as a Spin + WebAssembly component built with the wasmcp toolkit.

Add to your MCP client

Claude Desktop / Claude Code (claude_desktop_config.json)

json
{  "mcpServers": {    "on-demand-books": {      "url": "https://on-demand-books-dq2yvpdh.fermyon.app/"    }  }}

opencode (opencode.json)

json
{  "mcp": {    "on-demand-books": {      "type": "http",      "url": "https://on-demand-books-dq2yvpdh.fermyon.app/"    }  }}

Other MCP clients

Point any MCP client that supports the Streamable HTTP transport at the live endpoint above. The server follows the MCP 2025-11-25 spec.

Example agent usage

User: I need a birthday gift for my niece Susan. She likes puzzles.

Agent calls search_books({ "name": "Susan" }) and replies:

Great news — there are 9 personalized puzzle books for Susan, including "Fun Mazes for Susan — Easy to Medium" and "Fun Name Sudokus for Susan — Hard to Insane". Here's a direct link to the first one: https://on-demand-books.com/products/vz5ygw — add it to your cart and check out on Shopify.

Build & run locally

bash
make setup  # Install wasm32-wasip2 targetmake build  # Output: target/wasm32-wasip2/release/on_demand_books.wasmwasmcp compose server target/wasm32-wasip2/release/on_demand_books.wasm -o server.wasm --forcespin up --listen 127.0.0.1:8765   # http://127.0.0.1:8765/

Smoke test with curl:

bash
curl -X POST http://127.0.0.1:8765 -H 'content-type: application/json' \  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"curl","version":"1"}}}'
curl -X POST http://127.0.0.1:8765 -H 'content-type: application/json' \  -d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'
curl -X POST http://127.0.0.1:8765 -H 'content-type: application/json' \  -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"search_books","arguments":{"name":"susan"}}}'

Deploy

bash
spin deploy

Implementation

This component uses the capability pattern from wasmcp, implementing just two methods from the tools-capability interface:

  • list_tools() — declares the three tools above.
  • call_tool() — dispatches to the right tool handler and returns the result.

The wasmcp compose CLI wraps the component with the tools-middleware that handles MCP protocol translation, request delegation, and response formatting.

Outbound HTTP to the search API uses the WASI HTTP outgoing-handler interface (not raw sockets) so the component runs correctly on Fermyon Cloud.

See src/lib.rs for the full implementation.

Architecture

MCP client (Claude / opencode / ...)        │  HTTPS (MCP Streamable HTTP transport)        ▼Fermyon Cloud  →  server.wasm  (composed by wasmcp)        │        ├─ transport.wasm        (HTTP transport, MCP framing)        ├─ tools_middleware.wasm (MCP protocol → tool dispatch)        └─ on_demand_books.wasm  ← THIS COMPONENT                │                │  WASI HTTP outgoing-handler                ▼        https://on-demand-books-com-kzfxdscz.fermyon.app/search/{name}                │                ▼  returns book metadata        https://on-demand-books.com/products/{handle}  (Shopify store)

来源:README.md,提交 a557047

工具

3

search_books

On-Demand-Books: Search Personalized Books

Search for personalized puzzle books by first name. Returns matching books with direct Shopify purchase links, cover images, and ISBNs. A typical exact match returns 9 books across 3 puzzle types (mazes, name-sudokus, word searches) and 3 difficulty levels. When no exact match exists, returns similarly-named books. Use this whenever a user is shopping for a personalized gift and knows the recipient's first name.

输入参数name必填utm_source

suggest_names

On-Demand-Books: Suggest Available Names

Suggest first names for which personalized puzzle books are likely available. Use this when a user is unsure of a spelling, wants gift-recipient ideas, or only has part of a name. Returns popular available names, optionally filtered by a case-insensitive prefix. To confirm a specific name has matching books, follow up with `search_books`.

输入参数limitprefix

get_book

On-Demand-Books: Get Book by Handle

Re-resolve a single book's purchase URL, cover image, and ISBN from its Shopify product handle. Use this to refresh or re-reference a book across turns without re-running the full name search.

输入参数handle必填utm_source

版本历史

1
  1. v0.2.0最新Sep 16, 2026

评分

已满足适用检查项的 100%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分