Search / com.qurangallery/mcp
Quran Gallery MCP
R0· no sign-inClassical Islamic library (Shamela, 8,594 books): verbatim Arabic cited by volume and page. No key.
v0.3.0 · active · website · descriptor JSON · versions
Search / com.qurangallery/mcp
R0· no sign-inClassical Islamic library (Shamela, 8,594 books): verbatim Arabic cited by volume and page. No key.
v0.3.0 · active · website · descriptor JSON · versions
{
"mcpServers": {
"qurangallery": {
"type": "http",
"url": "https://qurangallery.com/mcp/shamela",
"headers": {
"Authorization": "Bearer ${api_key}"
}
}
}
}claude mcp add --transport http qurangallery https://qurangallery.com/mcp/shamela --header "Authorization: Bearer ${api_key}"[mcp_servers.qurangallery]
url = "https://qurangallery.com/mcp/shamela"
bearer_token_env_var = "api_key"
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"qurangallery": {
"type": "remote",
"url": "https://qurangallery.com/mcp/shamela",
"enabled": true,
"headers": {
"Authorization": "Bearer {env:api_key}"
}
}
}
}{
"mcpServers": {
"qurangallery": {
"type": "http",
"url": "https://qurangallery.com/mcp/shamela",
"headers": {
"Authorization": "Bearer ${api_key}"
}
}
},
"deeplink": "cursor://anysphere.cursor-deeplink/mcp/install?name=qurangallery&config=eyJ0eXBlIjoiaHR0cCIsInVybCI6Imh0dHBzOi8vcXVyYW5nYWxsZXJ5LmNvbS9tY3Avc2hhbWVsYSIsImhlYWRlcnMiOnsiQXV0aG9yaXphdGlvbiI6IkJlYXJlciAke2FwaV9rZXl9In19"
}{
"servers": {
"qurangallery": {
"type": "http",
"url": "https://qurangallery.com/mcp/shamela",
"headers": {
"Authorization": "Bearer ${api_key}"
}
}
}
}{
"mcpServers": {
"qurangallery": {
"httpUrl": "https://qurangallery.com/mcp/shamela",
"headers": {
"Authorization": "Bearer ${api_key}"
}
}
}
}extensions:
"qurangallery":
enabled: true
name: "qurangallery"
type: streamable_http
uri: "https://qurangallery.com/mcp/shamela"
headers:
"Authorization": "Bearer ${api_key}"
timeout: 300
Placeholders to fill from your own secret store: ${api_key}. The registry never accepts secret values.
protocol.modernsupports 2026-07-28 (server/discover)protocol.statelessanswers without a sessionprotocol.transportstreamable HTTPprotocol.list_ttltool list is cacheable (ttlMs 300000)auth.prm, auth.as_metadata, auth.cimdno remote uses OAuthauth.secret_in_urlno templated URLtools.descriptionsevery tool has a descriptiontools.description_length4 tools have descriptions over 1,024 characters, which crowds the contexttools.schemasevery tool has an object input schematools.annotations14 of 14 tools declare readOnlyHint or destructiveHinttools.directory_hintsevery tool declares readOnlyHint, destructiveHint, idempotentHint and openWorldHinttools.token_costabout 20,035 tokens to load every tooltools.api_dumptools are not a one-to-one API dumpstability.changes, stability.rug_pulltool history recorded for 4 of the 7 days neededdeps.known_vulns, deps.mcp_sdk_version, deps.resolvableno npm or PyPI packageshamela_get_isnadremovedإسناد الصفحة وطرقه The isnād chain(s) printed on one page, resolved from Shamela's narrator ids to names and death years, plus the other routes (طرق) of the same ḥadīth in the other indexed books. This is the pivot from a search hit to who transmitted it: run shamela_search_pages, then pass a (book_id, page_id) here. A page can carry several chains, and `variants` follows Shamela's ḥadīth key outward — counting the routes is how you judge whether a report rests on one thread (غريب) or many (مشهور). Chains run ASCENDING: first link is the Companion, last is the collector; each link heard from the one before. Only ten ḥadīth books are indexed for isnād, so most pages return no_isnad_indexed:true — and `no_isnad_reason` then says WHICH kind of nothing it is: 'no_marker_on_page' (the page carries no isnād marker at all, read from its own service annotations) or 'marked_but_unindexed' (it does carry one, but this book is outside the ten). A page_id the book does not have is now an error rather than a third silent nothing. Pair a narrator id from the chain with shamela_get_narrator to see whether the critics accepted them.
shamela_get_narratorremovedترجمة الراوي The full dossier on one narrator: name and lineage, death year, ṭabaqa (generation per Taqrīb al-Tahdhīb), Ibn Ḥajar's and al-Dhahabī's grades, kunya/nasab/cities/relations, and — the heart of it — al-jarḥ wa-l-taʿdīl: the critics' verdicts, grouped by critic, each quoted verbatim WITH the book and volume/page it came from (e.g. «تهذيب التهذيب (1/ 101)»). Critics are PAGED (`limit`, default 10, and `offset`), because a heavily-documented narrator has dozens — al-Zuhrī has 56 critics and 184 verdicts — and the response reports `total_critics`/`total_verdicts` plus a cursor so you can tell a page from the whole file and reach the rest. 15,160 of the 18,989 narrators carry verdicts, from 2,821 named critics. Also returns hadith_notes (فوائد) on audition, irsāl and implicit tawthīq — the evidence for whether a chain is connected. With include_network (default true) it adds the transmission network computed live from the isnād index: how many chains name this narrator, in which of the ten indexed books, and their most frequent teachers (narrates_from) and students (narrates_to) with counts. Quote the verdicts as the critics worded them; do NOT synthesize a grade the register does not state. Get the id from shamela_search_narrators.
shamela_search_narratorsremovedبحث في رجال الأسانيد Find a ḥadīth narrator (راوٍ) by name in Shamela's rijāl register — 18,989 narrators with death years 2-774 AH. This is the entry point for ʿilm al-rijāl: every other narrator/isnād tool takes the `narrator_id` this returns. The query is folded the same way page search folds Arabic, so «شعبه» finds «شعبة» and tashkeel is ignored; tokens are ANDed and match anywhere in the short name, the full lineage, or the shuhra / laqab / kunya / nisba — so «الزهري» and «الأعمش», which are how these men are actually cited, now find them. Results are ordered by how much the register documents a man (the size of his jarḥ-wa-taʿdīl dossier), death year breaking ties: the narrator an isnād would actually name comes ahead of an obscure namesake. Names are common in this corpus — always check the death year and grade before deciding which «محمد بن إسماعيل» you have. Examples: shamela_search_narrators({query:'شعبة بن الحجاج'}), shamela_search_narrators({query:'الزهري'}).
shamela_briefremovedبيان قدرات الخادم ومزالق البحث Capability handshake + operating brief for programmatic callers. Call this FIRST, before sending any argument you are not certain this build accepts. Returns `capabilities[]` — the arguments and response fields this server supports — plus `server_version`, `limits`, and `traps[]`. Every tool input here is strict, so sending an unknown argument (e.g. `shape`, `response_format:'none'`) to a server that predates it is a HARD validation error that fails the whole call, not a silently ignored field; and `tools/list` cannot help, because it proves a tool exists without saying which arguments it takes. Gate each new argument on its capability string. `traps[]` is the operating half: each entry pairs a way a search result misleads with the exact RESPONSE FIELD that proves it fired (`relaxed_min_match`, `zero_hit_terms`, `paging_ceiling`, `coverage.sample_is_complete`, `scope_resolution.dropped`, `madhab_source`, `probes[].qualifiers`, …), so a caller checks the envelope instead of trusting prose. `brief_hash` covers every other field: cache the brief and re-fetch only when it changes. Pure text and constants — no library access, so it answers even when the Shamela install is missing. Examples: shamela_brief({}), shamela_brief({response_format:'json'}).
shamela_list_tafsirs_for_ayaremovedتغطية تفاسير آية Per-aya tafsir coverage report: cross-references the user's DOWNLOADED tafsir shelves (categories 3 AND 4 — tafsir spans both) against the curated service/tafseer.db index and reports an honest tri-state per book. status='indexed_covers' — the index maps this aya to a page in this book (page_id + printed page included); 'indexed_no_entry_for_this_aya' — the book participates in the index but has no entry for this aya; 'not_indexed_coverage_unknown' — the book is absent from the curated index, so coverage CANNOT be determined (explicitly NOT evidence the book lacks commentary on the verse). Index hits outside categories 3/4 (e.g. mawsuʿat) are included and marked in_tafsir_categories:false. Pass either aya_id (1..6236) OR surah+aya. Returns totals per status and a note about the curated-index limitation. Never text-searches; navigate unknown-status books via shamela_get_toc. Examples: shamela_list_tafsirs_for_aya({surah:2, aya:255}), shamela_list_tafsirs_for_aya({aya_id:262}).
shamela_get_books_for_hadithremovedكتب تتضمَّن حديثًا Given a Shamela hadith key (numeric identifier shared by all collections that record the same hadith), list every book that cites it. Uses Shamela's pre-built service/hadeeth.db join. By default filters to downloaded books only. Each result has book_id, book_name, author_name, page_id, downloaded flag. Pair with shamela_get_page to read the cited page. Useful for cross-collection hadith research (Bukhari + Muslim + Sunan + Musnad references for the same hadith).
shamela_get_ayaremovedجلب آية Fetch Qur'anic verses by aya_id (1..6236, cumulative across surahs) OR by surah (1..114) + aya (1..N), optionally a run of them with `count`. Returns each verse in three renderings: body (Egyptian إملائي, Hafs from Asim — the searchable form), amiri (Othmani Amiri rendering for display), majma (KFQPC Mushaf rendering). Also returns surah_ayat, the surah's total verse count, so you can ask for the rest without guessing. Pass either aya_id alone OR both surah and aya. Examples: shamela_get_aya({aya_id:1}) → al-Fatiha verse 1 (basmala); shamela_get_aya({surah:55, aya:1}) → Ar-Rahman verse 1; shamela_get_aya({surah:112, aya:1, count:4}) → all of al-Ikhlas in one call; shamela_get_aya({surah:2, aya:285, count:2}) → the last two verses of al-Baqara.
shamela_search_quranremovedبحث في القرآن Search the Qur'an (6,236 verses, Hafs from Asim, Egyptian إملائي orthography) via the pre-built aya/ Lucene index. Ships zero-config — works on a fresh Shamela install. Returns aya_id (1..6236), surah, surah_name, aya, body (full verse text), and a snippet with <mark>...</mark> around matches. A single-word query is also searched as its ال-stripped stem and that stem's prefixed forms, which widens it: «الملك» returns 60 verses where the word as typed accounts for 28. The widening is reported — `stem_expanded_to` names the forms searched, `query_form_hits` counts the verses matching your word or its prefixed forms, and each hit's `matched_form` says which form it came in on, so a verse that only rode the stem (مَٰلِكِ in 1:4) is identifiable rather than presented as your word. Pair with shamela_get_aya to fetch a single verse with the Othmani Amiri rendering, or with shamela_get_tafseer_of_aya to find tafsir books that comment on a matching verse.
shamela_list_categoriesremovedقائمة التصنيفات List all 41 categories in Shamela's catalog. Categories are flat (no parent_id, no transitive expansion). Each entry has category_id, category_name, and book_count (total books in catalog under that category). Use category_id values with scope.category_ids in search_pages / search_books to narrow searches. Set include_counts=false to skip the book counts (slightly faster but counts are cached so cost is negligible). Each entry also reports downloaded_count (books in that category present on THIS machine), and downloaded_only=true lists only categories where the user has downloads — useful because Shamela is a 41-category library and tafsir alone spans categories 3 (التفسير), 4 (علوم القرآن وأصول التفسير), and 5 (التجويد والقراءات).
shamela_search_booksremovedبحث في فهرس الكتب Search Shamela's catalog of ~8,500 books by name, author, bibliography text, OR the editorial description of what the book is about (1,729 entries carry one, averaging ~1,500 characters). That last field is what finds a book by SUBJECT rather than title: «الرجز» matches 0 titles and 2 descriptions. Each hit reports `matched_in`: 'bibliography' (title/author/publication line) or 'description'. Pre-built index — works even before any books are downloaded. scope.book_ids is not accepted (the catalog IS the universe); use scope.author_ids, category_ids, period_*, downloaded_only. Returns paginated results with book name, author, category, book_date, downloaded flag, and a snippet showing the matched text. Examples: shamela_search_books({query:'الأصول'}), shamela_search_books({query:'فقه', scope:{category_ids:[17], downloaded_only:true}}).
Showing the latest 10. Full history: list_changes · trend: quality JSON.
Checks run on what our credential-free, read-only probes observe; tools are never called and no code audit is performed. How it is computed.
+dns-namespace +website +reachable +uptime-100% +updated-3d-ago -no-repository
Derived from observable signals (official registry feed and our own credential-free probes); no code audit performed. How it is computed.
| remote | auth | reachable | uptime 30d | p50 | protocol | last ok |
|---|---|---|---|---|---|---|
https://qurangallery.com/mcp/shamela streamable-http | none | yes | 100% | 316 ms | 2026-07-28, 2025-11-25, 2025-06-18 | 2026-10-19 |
fetchread-only | Read one library page whole by the id `search` returned: main text, then its footnotes under their own label (the editor's words, never the author's), with book, author, printed volume/page, edition data and the shamela.ws link. Use shamela_read instead to read one body part at a time (unit "page"), a run of pages (unit "range") or a whole chapter (unit "section"), and shamela_cite (mode "printed_page") to turn a printed volume and page into ids. Not a search. Long pages are cut at 4 body parts of about 4,000 characters (2 without an API key): metadata.complete false, ending with the shamela_read call that continues it. A malformed id, or a page the library does not hold, returns a tool error. |
searchread-only | Search the whole classical Islamic library (8,594 works, no scope) and get up to 10 pages as {id, title, url}; pass an id to `fetch` to read the page. This is the generic one-argument entry (the standard search/fetch pair); the scoped tools answer research questions better. Use shamela_search_library for a hadith, tafsir or fiqh question: unscoped ranking is by term frequency, so a poetry anthology can outrank Sahih al-Bukhari. Use shamela_search (match "words", "phrase", "near", "exact" or "boolean") to pin books, categories or a madhhab, match an exact or diacritized phrase, or page further; use shamela_cite (mode "printed_page") for printed-page citations. Exact phrase first; only when it finds nothing are the words matched separately. Title flags: [footnote match] = only an editor's footnote; [token match] = words occur apart; [near match] = only some words or their roots. Empty results mean no page carries the words. A query without Arabic words returns a tool error. |
shamela_citeread-only | Citations. mode=citation (default): build one for a book, optionally a page and quoted text — Shamela's copy format, short inline, full with death year, or BibTeX/RIS. Call it whenever you attribute a quote; it needs only the catalogue, plus the installed text for a page's printed number. Read page_resolved, components.auto_numbered and notes[] before presenting. mode=printed_page: map a printed citation («vol. 4, p. 405») to the page_ids carrying it — no arithmetic relates the two, and one printed page often spans several ids: read them all, in order, with shamela_read(unit='page'). Resolve the work with shamela_find(kind='work') first; holding a page_id already, skip this. Failures come back as `status`; citable:false = Shamela's own numbering. Error: BOOK_NOT_FOUND. |
shamela_findread-only | Catalogue lookup — which books, headings, authors and shelves exist, not page text. `kind`: - book (default): titles, authors, publication lines, subject descriptions → book_ids, installed or not. no_title_match: not proof the book is held. downloaded:false → another edition (shamela_get_details(kind='book') same_group) or catalogue metadata only. - heading: chapter/section headings, i.e. where books treat a topic; open with shamela_read(unit='section', book_id, title_id). No hits = no heading carries the words: drop words or use shamela_search(match='words'). - author: names and biographies → author_id, Hijri death year, book count; no scope. Empty is not absence: retry kunya, nisba or shuhra (ابن قدامة / الموفق / المقدسي). - category: the 41 flat shelves with catalogue and installed counts → scope.category_ids. A subject spans ids (Qur'anic studies 3 tafsir, 4 Qur'anic sciences/usul al-tafsir, 5 tajwid/qira'at; fiqh 14–17 by madhab): pass all that apply. downloaded_only:true when choosing shelves to search or read. - work: verify a cited title (optional author, edition); refuses rather than guesses; catalogue only, text need not be installed. - name: fuzzy best guess over book/author names, for an id; always answers, so never use it to verify a citation. - period: books by Hijri window, bounds ANDed (scope.period_* on searches unions them). Rules: a parameter of another kind is refused; book/heading/author/period page with limit/offset until has_more is false. Instead: page text → shamela_search; a printed page → shamela_cite(mode='printed_page'); one book's headings → shamela_read(unit='toc'). |
shamela_get_briefread-only | Return this server's machine-readable capability handshake: capabilities, numeric limits, retired tool names with their replacements, and traps (ways a result misleads, each with the response field that proves it fired). Call it first from a programmatic client: inputs are strict, so an argument an older build lacks (e.g. `shape`, response_format:'none') is a hard validation error that fails the whole call, and tools/list cannot reveal argument support — gate each new argument on its capability string. Cache by brief_hash and re-fetch only when it changes. Constants only: needs no library access and does not fail. Example: {} or {response_format:'json'}. |
shamela_get_detailsread-only | Catalogue record for one book (kind=book, default) or one author (kind=author), installed or not. - book: authors, category, type, printed-edition flag, whether the text is installed here, the scanned printing and the other editions of the same work (same_group). When a reader tool says BOOK_NOT_DOWNLOADED, pick an installed entry from same_group or answer from this record. Read book_date, edition, editor and publisher per their field notes: never supply a missing one. - author: name, Hijri death year (null = unknown or living) and every catalogued book they wrote or co-wrote, each flagged installed or not. Volumes → shamela_read(unit='parts'); a book by title or subject → shamela_find(kind='book'). Errors: BOOK_NOT_FOUND, AUTHOR_NOT_FOUND. |
shamela_lookup_hadithread-only | Hadith. mode=search (default): find a hadith by its wording and trace its takhrij — searches the hadith shelves (Sunnah collections, commentaries, takhrij, hadith sciences) in matn and footnotes, reads hadith keys off the matching pages and lists every collection indexing the same hadith. No offset; if the full text matches nothing, one word is dropped and named in `relaxed`. Takhrij covers only key_index_books, so few rows is not proof of a weak or rare hadith. mode=sources: every book recording one hadith_key, with its page_id, one row per book in index order. A downloaded:false book is catalogued but not installed: use another edition (shamela_get_details(kind='book') same_group). Narrator chains → shamela_lookup_rijal(mode='isnad_search'); general text → shamela_search(match='words'). |
shamela_lookup_quranread-only | Qur'an text. mode=search (default): find verses by Arabic words, typed in إملائي spelling or pasted in Uthmani rasm; words ANDed, results in mushaf order (aya_id 1–6236), not relevance. Zero hits usually means a misspelling: drop a word or use options.wildcards. mode=aya: fetch verses you can already cite, by aya_id OR surah + aya (never both or neither: BAD_ARG); `count` gives a run that continues across surahs and stops at the last verse. Each verse in three renderings (body = the spelling search matches, amiri for display). AYA_NOT_FOUND names the valid range. Commentary → shamela_lookup_tafsir; the words inside books → shamela_search(match='words'). |
shamela_lookup_rijalread-only | Hadith narrators and isnad chains, from Shamela's rijal register and isnad index. `mode`: - narrators (default): a narrator by name → narrator_id, most-documented first, then earliest death year. Names collide: confirm the death year before using an id. - narrator: one dossier by narrator_id — lineage, death year, tabaqa, Ibn Hajar's and al-Dhahabi's grades, critics' jarh wa-ta'dil verdicts verbatim with source (the only paged part), hadith_notes on audition and irsal; include_network adds isnad-index counts per book and top teachers/students. Quote verdicts as worded; never synthesize a grade. - isnad_search: chains by the narrators in them — `contains` (anywhere) or `transmission` [teacher_id, student_id] pairs that must be adjacent (direct audition, the stronger test) — each hit with book, page, hadeeth_key and the chain. - isnad: the chain(s) printed on one page (book_id/page_id from a search hit) with names and death years, plus the same hadith's other routes — one thread or many. Rules: a parameter of another mode is refused. Chains run ascending (Companion first, collector last). Only ten hadith books are isnad-indexed (see scope_book_ids): an empty isnad_search means no such chain in those ten, not in all literature; most pages answer no_isnad_indexed:true with a no_isnad_reason, not an error. Errors: RIJAL_UNAVAILABLE (register not installed), NARRATOR_NOT_FOUND (search the name again), BOOK_NOT_FOUND, PAGE_NOT_FOUND, BOOK_NOT_DOWNLOADED (try shamela_get_details(kind='book') same_group). Instead: book authors → shamela_find(kind='author'); a hadith by its text → shamela_lookup_hadith(mode='search'). |
shamela_lookup_tafsirread-only | Tafsir on one verse (aya_id OR surah + aya, else BAD_ARG). mode=coverage (default): which tafsir books cover it, fetching no text — shelves 3 (tafsir) and 4 (Qur'anic sciences; not 5, tajwid and qira'at) crossed with Shamela's curated tafsir index, plus index hits from other shelves (in_tafsir_categories:false). Status per book: indexed_covers (with page_id), indexed_no_entry_for_this_aya, or not_indexed_coverage_unknown — NOT evidence the book is silent. mode=texts: the commentary from several books in one call, each attributed (book, author, death year, printed page), read only from pages the index maps to the verse, never a text-search guess. Each source's `note` names the next call when its text continues. Example: {surah:2, aya:255, book_ids:[1503, 639]}. |
shamela_readread-only | Read an installed book's text and structure by internal ids. `unit`: - page (default): one page_id → body (author's matn), foot (editor's footnotes), printed page label, prev/next page ids, enclosing headings. - range: up to 20 consecutive pages from start_page_id, each with text, footnotes, printed page — to read on past a hit or through a span. - section: one chapter by title_id with its sub-headings, up to the next heading outside it. - toc: headings with their title_ids; top level by default, parent_id/depth expand, containing_page_id gives the chain enclosing a page. - parts: volumes — part label, page count, first/last page_id. - services: what one page cites (aya ids, hadith keys, isnad markers, as stored) → shamela_lookup_quran(mode='aya'), shamela_lookup_hadith(mode='sources'), shamela_lookup_rijal(mode='isnad'). Rules: a parameter of another unit is refused. page_id is not the printed page and ids have gaps: step with prev_page_id/next_page_id, not ±1; for a printed «vol./page» call shamela_cite(mode='printed_page') first. A size budget cuts long text: follow body_has_more (body_part+1) or next_start_page_id. Errors: PAGE_NOT_FOUND (also a range start past the end), TITLE_NOT_FOUND, BOOK_NOT_FOUND, BOOK_NOT_DOWNLOADED (catalogued, not installed: use an installed edition from shamela_get_details(kind='book') same_group). Instead: a heading by its words → shamela_find(kind='heading'); books of untitled «فصل» headings → shamela_search(match='words') scoped to the book; any catalogued book's metadata → shamela_get_details(kind='book'). |
shamela_searchread-only | Full-text search inside the pages (matn and footnotes) of installed books. `match` picks how the query is read: - words (default): every word required, ranked by relevance; options add morphology, wildcards, chronological sort. An all-words miss retries with fewer words (relaxed_min_match). - phrase: the words consecutively (a quotation). near: all words within `distance`, any order. Both verified in the full page text. - exact: diacritics, hamza/alef forms or digit systems kept distinct («أحمد» not «احمد», «عِلْم» not «عَلَم», ٢٥٥ not 255); set at least one `preserve` flag. - boolean: every all_of term, one or more any_of, no none_of (الوقف with المسجد or المقبرة, without البيع); one query over the whole index, so total_hits is exact and exclusion exhaustive. - batch: 1–24 scoped `queries` run at once, merged and deduped by page (probe_ids); no paging, cut at max_total_passages. Rules: a parameter of another match value is refused. Page with limit/offset until has_more is false. scope.madhab drops books of unknown school: omit it for comparative questions; set scope.citable_only before quoting a page number. Follow-up rounds: exclude_pages / exclude_work_group_ids keep out pages already used and other printings of the same work. EMPTY_SCOPE: the scope matched no book. Instead: chapter headings → shamela_find(kind='heading'); titles → shamela_find(kind='book'); verses → shamela_lookup_quran(mode='search'); a hadith's wording → shamela_lookup_hadith(mode='search'). Example: {query:'استصناع', scope:{category_ids:[17]}}. |
shamela_search_libraryread-only | Search one named shelf of the classical Islamic library (8,594 works) for quotable passages: verbatim Arabic with book, author, printed volume/page, edition and a shamela.ws link. The default first search for hadith, tafsir, fiqh or creed. Not for isnads, narrators or diacritic-exact wording. Use shamela_search (match "words") to pin books or categories or to page past 10 results, shamela_read (unit "page") to read a whole page. Scope is one shelf per call; call again with another shelf to widen. Ranking: exact phrase first, then all the words; a madhhab scope asks that school's own books first; main text before footnote. relaxedToTokens and note flag a weaker match; no passages means absent from that scope, not from the library. A non-Arabic query or unknown scope returns a tool error naming the fix. |
shamela_survey_topicread-only | Count how much the library holds on a term and where: the exact matching-page total plus its distribution by category, Hijri century, book and author (top 15 each). Statistics only, never passages — use shamela_search(match='words') instead to retrieve and read the pages. Run it before searching to size a topic and pick scope.category_ids (map by_category names to ids with shamela_find(kind='category')). mode 'literal' (default, 6–9 ms) counts the word as written; 'morphological' counts every derived form of its root (seconds) and is often far broader. coverage_capped:true means the breakdown is a top-5,000 sample whose counts are floors; total_hits stays exact. No match = total_hits 0; EMPTY_SCOPE when scope matches no book. Example: {term:'الاستصناع', scope:{category_ids:[14,15,16,17]}}; {term:'التيمم', scope:{citable_only:true}}. |
Schemas: list_tools.
{
"name": "com.qurangallery/mcp",
"title": "Quran Gallery MCP",
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
"remotes": [
{
"url": "https://qurangallery.com/mcp/shamela",
"type": "streamable-http",
"headers": [
{
"name": "Authorization",
"value": "Bearer {api_key}",
"isSecret": true,
"variables": {
"api_key": {
"isSecret": true,
"description": "Optional Quran Gallery API key (starts with qg_sk_).",
"placeholder": "qg_sk_..."
}
},
"description": "Optional. Free Quran Gallery API key as a bearer token: 60 tool calls a minute with no daily cap, instead of the keyless 10 a minute and 200 a day. Create one at https://accounts.qurangallery.com/developers. Omit the header to use the server with no account."
}
]
}
],
"version": "0.3.0",
"websiteUrl": "https://qurangallery.com/mcp",
"description": "Classical Islamic library (Shamela, 8,594 books): verbatim Arabic cited by volume and page. No key."
}