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 分