What the MCP server does
Connect your own AI assistant to a classical Islamic library of 8,594 works and get passages that carry a named printed edition, volume and page.
On this page
Ask most AI assistants for a hadith or a fiqh ruling and you get a reference recalled from memory. It often looks right. The book exists, the wording is close, the volume and page are plausible — and there is no way to tell, from the answer alone, whether anyone ever printed that page.
The Quran Gallery MCP server changes what your assistant has to work with. It searches an actual library of 8,594 classical Arabic works and hands back, for each hit:
- the book, and which printing it is (editions paginate differently — the page number is meaningless without it)
- the author and the year they died
- the printed volume and page, as that printing paginates it
- the verbatim Arabic of the passage
- whether the words were found in the main text or an editor’s footnote
Your assistant quotes what came back instead of reconstructing it.
Who this is for
Anyone building or using an AI assistant that needs to talk about classical Islamic texts and be checkable: researchers, students, developers of Islamic apps, and anyone who has been burned by a confident citation that turned out not to exist.
You need a Quran Gallery account and an API key. There is no anonymous access.
What it does not do
This matters more than the feature list, so it is here rather than in a footnote.
It cannot stop your assistant from misattributing a passage. What the server guarantees is that the passage, the book and the page are real — that they were retrieved, not composed. It does not guarantee that the sentence your assistant builds around them is a fair reading of the text. A model can still quote a real page and draw a wrong conclusion from it.
It is not a substitute for a scholar. Retrieval quality is not the same as understanding. A passage found in a Hanafi manual is evidence of what that manual says, not a ruling for your situation.
Searches return excerpts; reading tools return pages. A search result is a page-scoped passage with its citation attached. If you need more, shamela_get_page returns a full page and shamela_get_pages_range returns up to twenty consecutive ones. There is no single call that exports a book, and the per-key rate limit is what stands between reading and scraping — please stay on the reading side of that line.
If you want the reasoning behind the design — why search is scoped, why an exact-phrase miss is reported rather than hidden — the Reading a result page covers the parts that affect how you should read the output.
What you get
37 tools. One is ours — search_library, which requires a named scope and is the right first call for most questions. The other 36 are the library server’s own, exposed under their own names: isnād chains, narrator dossiers, boolean and diacritic-exact search, resolving a printed citation back to a page, per-verse tafsir, and reading a page in full.
The short version: start with search_library, reach for the raw tools when it cannot do what you need.
Queries must be in Arabic. A query with no Arabic words is rejected outright. If you are working from an English question, translate the search terms first — nothing translates them for you.
| Page | What it covers |
|---|---|
| Getting started | Create a key, connect your client, run a first search |
| The search_library tool | Every parameter and every field that comes back |
| The full tool surface | All 37, grouped by what they are for |
| Choosing a scope | The twelve scopes, and why search_library requires one |
| Reading a result | Footnote vs main text, exact match vs loose match |
| Limits and errors | Rate limits, error responses, what to retry |