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.

Description and use

The author built BookDNA, a book recommender that validates suggestions against Open Library, and deployed it as an MCP server. Two bugs were found during testing: image redirects from archive.org were blocked, and a shared rate limit was caused by a proxy rewriting the client header. Fixes added archive.org to the image whitelist and corrected header handling.

Problem

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.

Outcome

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.

Workflow

  • 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.

Evidence

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.

Source

Bug 1: only one cover showed up

Source

Bug 2: everyone shared one rate limit

Source

  • Record date: 2026-10-15T00:42:10.969Z