Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

I turned my book recommender into an AI app in a day. Here are the two bugs that taught me the most.

说明与用途

作者构建了 BookDNA,验证书籍推荐并部署为 MCP 服务器。测试中发现两处错误:archive.org 的图片重定向被阻止,代理重写客户端头导致共享速率限制。通过添加 archive.org 到图片白名单并修正头部处理解决了问题。

问题

Build an AI‑enabled book recommender that returns real books and displays them in a chat widget, while ensuring image loading and per‑user rate limits work correctly.

结果

BookDNA now operates as a fully functional MCP app that reliably displays book covers and enforces per‑user rate limits, demonstrating the importance of handling image redirects and proxy‑modified headers in deployed AI services.

工作流

  • 1. Built BookDNA to read book DNA and recommend books, validating each suggestion against Open Library.
  • 2. Exposed four MCP tools: search_book, get_book_dna, recommend, recommend_by_tropes.
  • 3. Deployed the MCP server on Manufact Cloud using mcp-use.
  • 4. Tested the app in Manufact’s Inspector chat with a GPT model, confirming basic functionality.
  • 5. Encountered Bug 1: only one cover displayed due to MCP widget image‑loading policy blocking redirects from archive.org.
  • 6. Fixed Bug 1 by adding archive.org to allowed image sources and implementing a fallback card for failed images.
  • 7. Encountered Bug 2: shared rate limit because the platform’s proxy rewrote the user‑identifying header.
  • 8. Fixed Bug 2 by adjusting header handling to read the correct client IP.
  • 9. Documented lessons and kept a friction log during development.

证据

The recommend tools return a small app that appears right inside the chat: a parchment shelf of book covers, each with a one-line reason it was picked.

来源

Bug 1: only one cover showed up

来源

Bug 2: everyone shared one rate limit

来源

  • 记录日期: 2026-10-15T00:42:10.969Z