iranketab-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@iranketab-mcp which translation of Crime and Punishment is best rated and in stock?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
iranketab-mcp
Read-only MCP server for iranketab.ir: search books, compare translations and editions, prices in Toman, stock, ratings and reader comments. No key needed.
Modelled on digikala-mcp. Not affiliated with iranketab.
Connect
Hosted endpoint (Streamable HTTP, stateless, no key): https://iranketab-mcp.vercel.app/mcp
{ "mcpServers": { "iranketab": { "url": "https://iranketab-mcp.vercel.app/mcp" } } }claude mcp add --transport http iranketab https://iranketab-mcp.vercel.app/mcpLocal (stdio). This is faster from inside Iran, because the hosted copy runs in Frankfurt and fetches from iranketab take 2-10 s there on a cache miss:
npm install && npm run build
claude mcp add iranketab -- node "$PWD/dist/index.js"Then ask: "which translation of Crime and Punishment is best rated and in stock?", "cheapest White Nights that isn't abridged", "what did Soroush Habibi translate?", "bestsellers in Russian literature".
Related MCP server: kvartirabooks-mcp
Tools
Tool | What it answers |
| Title / author / keyword to works (no prices on search cards) |
| Name to id for a person (author or translator), publisher, or category |
| One work: description, tags, vote-weighted rating, editions summary (cheapest available, most rated, price range) |
| Every edition: translator, publisher, price, discount, stock, delivery, rating, ISBN, format, pages, year, print run. Filter by translator/publisher, sort by price/rating/newest/print run |
| Reader comments, 20 per page, each tagged with the edition it was left on |
| iranketab's related shelf |
| A category's editions with prices (sort newest / best_selling / most_liked) |
| Everything an author wrote or a translator translated |
| A publisher's catalogue |
All tools carry readOnlyHint. Every book_* tool accepts a work id or an edition id.
How it works
agent --stdio or POST /mcp--> iranketab-mcp --HTTPS, 1 req / 500ms--> www.iranketab.irsrc/server.ts defines the tools once. src/index.ts serves them over stdio, and src/web.ts serves them as a web-standard Request -> Response handler (stateless Streamable HTTP with JSON responses, CORS, and /health). On Vercel, api/mcp.ts and api/health.ts wrap that handler. The functions run in fra1 (Frankfurt), the region closest to Iran.
iranketab has no public API. Two sources are used:
HTML pages, parsed with
node-html-parser:/result/{term}?t=کتاب&s=Nfor search/book/{id}for a book (one work, N editions asdiv#p-{editionId}plus a details popup)
The site's own ListView JSON:
/comment/listfor comments/tag/filter,/profile/filter,/brand/filterfor listings
Details that matter:
Prices are Toman on the page and in listing JSON. The JSON-LD
Offeris Rial (IRR) and is not used.The JSON-LD rating belongs to a single edition (White Nights: 3.5 from 27 votes, while its most-read edition has 4.17 from 163). The work rating here is the vote-weighted mean across editions, and edition ratings from under 3 votes are reported as
null.Stock has three states:
in_stock(iranketab's warehouse),publisher_stock(ordered from the publisher, slower) andout_of_stock.Listing entries are editions.
/book/{editionId}redirects to the work.Unknown book ids return HTTP 200 with an empty page (a soft 404). This is detected as "no JSON-LD and no editions".
Parse JSON-LD with
rawText, nottext:textdecodes
into control characters thatJSON.parserejects.Hosting outside Iran is slow on a cache miss. iranketab serves foreign visitors through Cloudflare, not ArvanCloud. Measured from Vercel
fra1: a book page takes about 2 s uncached and a search about 10 s. Cloudflare Workers in Paris took 7-12 s. Cached calls take about 0.5 s.Politeness:
requests are serialised 500ms apart
failures are retried with jittered backoff (up to 3 tries, honouring
retry-after)responses are cached for 30 minutes, so details → editions → comments on one book costs one page fetch
Deploy
npx vercel deploy # preview
npx vercel deploy --prod # productionvercel.json pins the region, caps functions at 120 s, and maps /mcp and /health to api/. The Hobby plan is enough: CPU is billed only while it is active, and the up-to-10 s upstream waits don't count.
Develop
npm test # offline parser tests against saved pages in test/fixtures
npm run smoke # live end-to-end: spawns the server, calls all 9 tools
MCP_URL=https://iranketab-mcp.vercel.app/mcp npm run smoke # same, against a deployment
npm run serve # the HTTP handler locally on http://localhost:3000/mcp
npm run dev # stdio server from sourceWhen the site changes markup, npm run smoke goes red. Re-save a fixture and npm test shows which field broke.
Available Tools
9 toolsbook_commentsReader commentsARead-onlyIdempotent
Reader comments on a book, newest first, 20 per page. Each comment names the edition (publisher) it was left on, so opinions about a specific translation can be told apart. Pass edition_id to keep only comments on that edition (filters the fetched page).
Inputs: id (required), page, edition_id.
book_detailsBook detailsARead-onlyIdempotent
Everything about one book (work): description, highlights, categories, a vote-weighted rating across all editions, and an editions summary - how many translations/publishers exist, how many are buyable, the cheapest available and the most-rated edition - plus a compact list of editions. Use book_editions for full per-edition data and filters.
Inputs: id (required), editions_limit, include_description.
book_editionsCompare editions and translationsARead-onlyIdempotent
All editions of one book with full data per edition: translators and publisher (with ids), price and discount in Toman, stock state, earliest delivery, rating, ISBN, format (قطع), cover (نوع جلد), pages, publication year and print run (سری چاپ - a high number means a long-lived, popular edition). Answers 'which translation is best / cheapest / available?'.
Inputs: id (required), sort, limit, publisher, +2 more.
browse_tagBrowse a categoryARead-onlyIdempotent
Books in one iranketab category/genre/list (e.g. 152 = Russian literature, 328 = bestsellers). Tag ids come from book_details tags or find_author_publisher_or_tag. Entries are editions with price in Toman and discount. no_current_offer: true usually means out of stock - confirm with book_editions.
Inputs: tag_id (required), page, sort, limit.
find_author_publisher_or_tagFind author, translator, publisher or categoryARead-onlyIdempotent
Resolve a name to its iranketab id: kind=person for authors AND translators, kind=publisher for publishers, kind=tag for categories/genres (e.g. ادبیات روسیه, فلسفی). Feed the id into person_books, publisher_books or browse_tag.
Inputs: kind (required), query (required), limit.
person_booksBooks by an author or translatorARead-onlyIdempotent
Every edition an author wrote OR a translator translated (iranketab keeps both as one profile). Entries are editions with price in Toman and discount. no_current_offer: true usually means out of stock - confirm with book_editions.
Inputs: person_id (required), page, sort, limit.
publisher_booksBooks by a publisherARead-onlyIdempotent
The catalogue of one publisher (انتشارات). Entries are editions with price in Toman and discount. no_current_offer: true usually means out of stock - confirm with book_editions.
Inputs: publisher_id (required), page, sort, limit.
search_booksSearch booksARead-onlyIdempotent
Search iranketab.ir for books by title, author or keyword (Persian or English). Returns works with their author line and the edition ids the search matched. Search cards carry no price - call book_details for prices, translators and stock. The site caps search at 100 hits.
Inputs: query (required), sort, limit.
similar_booksSimilar booksARead-onlyIdempotent
Books iranketab recommends alongside a given book (its own 'related' shelf).
Inputs: id (required), limit.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool targets a distinct entity or action: search, name resolution, book-level details, edition-level data, comments, related books, and tag/person/publisher listings. The only potentially adjacent pair is book_details and book_editions, but their descriptions clearly separate summary-level from per-edition data.
Names are uniformly lowercase snake_case and mostly resource-focused (book_details, book_editions, person_books, publisher_books). A few action-led names like search_books, browse_tag, and find_author_publisher_or_tag break the strict noun-first pattern, but the inconsistency is minor and does not hurt readability.
Nine tools is an appropriate size for a bookstore catalogue server: search, discovery, and entity-specific lookups are each represented without redundant clutter. It stays comfortably within the ideal 3-15 tool range.
The tool surface covers the main discovery workflow: search and tag/person/publisher browsing, book-level details, edition comparison, and comments. Minor gaps exist, such as no search pagination, no direct list of all tags, and no separate author/publisher profile info, but agents can work around them.
Maintenance
Related MCP Connectors
Read-only search and retrieval of published books, articles and authors, with public catalog links.
Search books and authors, fetch editions, browse subjects, and resolve cover images.
Search a catalog of 1.7 million books and find books by mood, vibe, pace or genre. Read-only.
Search Chinese books with Douban ratings, AI book guides and curated toplists. Free, no API key.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables read-only search and retrieval of the public Reknihy.cz book catalog, including filtering, sorting, ISBN lookup, category browsing, and access to product details such as price, availability, and images.4ISC
- AlicenseAqualityCmaintenanceEnables searching and retrieving book details from the Kvartirabooks store/library catalog, including availability for purchase or borrowing.2MIT
- AlicenseBqualityBmaintenanceEnables AI agents to compare prices across Iranian online and in-person shops, inspect each seller's offer with warranty and installment details, review roughly a year of price history, score deals, and find the cheapest shop for a whole basket. It is read-only, requires no account or API key, and runs locally for Claude, Cursor or Copilot.26209 PyPI1MIT
- AlicenseAqualityBmaintenanceEnables AI agents to search and browse an Iranian online pharmacy's catalog read-only, covering prices per variant, ingredients, dosage, warnings, user questions and reviews, product comparisons and alternatives, plus health magazine articles. No API key or account is required.122MIT