MCP for developers
Connect your own AI assistant to the classical Islamic library and get answers that cite a real printed edition, volume and page.
30 pages
MCP server for Islamic texts: what it does
A free MCP server at https://qurangallery.com/mcp/shamela over 8,594 classical Arabic books: verbatim passages with edition, volume, page, Maktabah link.
Is there an MCP server for Maktabah al-Shamela?
Yes. Quran Gallery runs a hosted MCP server at qurangallery.com/mcp/shamela over 8,594 Shamela books: no key, 15 read-only tools, printed-page citations.
Islamic MCP servers compared: Shamela, hadith and Quran
Islamic MCP servers compared, dated: Quran Gallery, Shamela Link, official Shamela, alhoqbani, Makteb, Moheet, turath.io. Account, corpus, source, page.
Connect an AI to the Shamela library: getting started
Add the Quran Gallery MCP server to ChatGPT, Claude, Cursor, VS Code or Gemini CLI by URL. No account or key needed. Run your first cited search.
Connect ChatGPT to the Shamela library
Add the Quran Gallery MCP server to ChatGPT step by step, with screenshots: one URL, No authentication, then search 8,594 classical Arabic books.
Connect Claude to the Islamic library (MCP)
Add the Quran Gallery MCP server to Claude (claude.ai and Desktop) as a custom connector, with screenshots. No account or key, 8,594 Arabic works.
Add the Islamic library MCP server to Claude Code
One command adds the Quran Gallery MCP server to Claude Code: classical Arabic books, printed-page citations, no account and no key.
Connect Cursor to the Islamic texts MCP server
Add the Quran Gallery MCP server to Cursor through mcp.json: search classical Arabic books with printed-page citations, no key needed.
Add the Islamic library MCP server to VS Code
Add the Quran Gallery MCP server to VS Code with mcp.json, no key needed, and search classical Arabic books with printed-page citations in chat.
Connect Gemini CLI to the Islamic texts MCP server
Add the Quran Gallery MCP server to Gemini CLI with one command or settings.json: classical Arabic books, printed-page citations, no key needed.
Use the Islamic library MCP server with GitHub Copilot
Give GitHub Copilot agent mode in VS Code the Quran Gallery MCP server: classical Arabic books with printed-page citations, no account or key.
Connect any MCP client to the Shamela library
Connect the Shamela MCP server (Streamable HTTP, no key) from the TypeScript SDK, mcp-remote, MCP Inspector, curl or Python; avoid three setup traps.
MCP API key and bearer token setup for each client
Get a free Quran Gallery key and send it as a bearer token from Claude Code, Cursor, VS Code, Gemini CLI or mcp-remote, then test it with one curl call.
shamela_search_library: search Arabic books with citations
Parameters and result fields of shamela_search_library, the MCP tool that returns verbatim Arabic passages with edition, page and a Maktabah link.
MCP tools for classical Arabic books: the full list
The 15 read-only tools of the Quran Gallery MCP server, plus 3 prompts and a resource: search, reading, citations, isnad, narrators, tafsir, catalogue.
Use the Shamela MCP server from Python, LangChain and agents
Call the Quran Gallery MCP server from Python with langchain-mcp-adapters and LlamaIndex, pass a key, and print volume, page and matchedIn per passage.
Hosted MCP server or your own RAG or OpenITI corpus?
Qdrant, pgvector or web search instead of a hosted MCP server? What a self-built RAG over classical books must do, what hosted returns, when to build.
Choose a Shamela MCP scope: one book or all
shamela_search_library names one of twelve shelves. What each contains, what they leave out, and why scoping matters even where it is optional.
Why scope matters: one search on one shelf and on all
One Arabic query run in three scopes and across the whole library, with real results, plus the twelve scopes and an example question for each.
How to read a Shamela MCP search result
Two fields decide what a result actually proves: whether the words were in the main text or a footnote, and whether the exact phrase was found.
Verify an AI-quoted passage against the printed page
Check an AI-given quotation, volume and page against the Shamela library: resolve the edition and printed page, read it, tell main text from footnote.
Grounding rules: citing classical Islamic texts with MCP
The citation contract for answers built on the Quran Gallery MCP server: quote only tool results, separate matn from footnote, never invent edition data.
Search the main text or the footnotes of a Shamela book
Tell an author's main text from an editor's footnote in Shamela MCP results: the matchedIn field, search_in, body or footnote-only search, citable_only.
Hadith takhrij with MCP: find a hadith across collections
Locate a hadith in the primary collections with its isnad and printed page using the Quran Gallery MCP tools and the takhrij_hadith prompt. No grading.
How Arabic search behaves in Shamela MCP
What the Shamela MCP search ignores and keeps: diacritics, hamza, ta marbuta, exact search, root expansion, wildcards, boolean queries, empty results.
Edition, editor and publisher in Shamela MCP results
What the Shamela library records about an edition (edition, editor, publisher), what it never stores (city, edition number), and how to pick a printing.
Ten test cases for the Shamela MCP server, with real results
Ten calls to run on the Quran Gallery Shamela MCP server: a found hadith, a footnote, a wrong scope, a quote not found, and errors, with real output.
MCP prompts and custom instructions for cited answers
The three ready-made prompts and the grounding-rules resource of the Quran Gallery MCP server, a system prompt for cited answers, and how to load them.
MCP rate limits and error codes
Keyless limits of 10 requests a minute and 200 a day per IP, 60 a minute with a free key, and the 401, 403, 429 and 503 errors you can get.
Quran Gallery Shamela MCP: frequently asked questions
Answers about the Quran Gallery MCP server for Maktabah al-Shamela: no key, 15 tools, 8,594 books, limits, closed source, printed page, footnotes.