Lewati ke konten

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, 14 read-only tools, printed-page citations.

Halaman ini belum diterjemahkan — menampilkan versi bahasa Inggris.

Di halaman ini

Yes. Quran Gallery runs a hosted MCP server over the Maktabah al-Shamela (المكتبة الشاملة) library. Its address is:

https://qurangallery.com/mcp/shamela

This address is the endpoint for clients. The page https://qurangallery.com/mcp is the human page about it, not an endpoint, so do not paste that one into a client.

Paste the endpoint URL into any client that accepts a remote MCP server (ChatGPT, Claude, Claude Code, Gemini CLI, Cursor, VS Code, GitHub Copilot, or your own code). There is nothing to install, no account to create and no key to request.

At a glance

QuestionAnswer
Where does it run?Hosted by Quran Gallery. Nothing installs on your machine and the Shamela desktop application is not needed.
TransportStreamable HTTP, POST only. It is not an SSE endpoint and not a stdio program.
Account or key?None to start. An optional free key (qg_sk_…) sent as Authorization: Bearer … raises the limits. There is no OAuth sign-in.
What is in it?8,594 works by 3,188 authors in 41 categories, from Maktabah al-Shamela.
Tools14, all read-only, the same for every client: three curated ones (shamela_search_library, plus search and fetch, a quick generic entry) and 11 shamela_* library tools.
LimitsWithout a key: 10 tool calls a minute and 200 a day per IP address. With a free key: 60 a minute. See Limits and errors.
What a hit containsVerbatim Arabic, the book, the author and death year, the printed volume and page, the edition, editor and publisher when the library records them, whether the words are in the main text or an editor’s footnote, and a link to the page on shamela.ws.
Open source?No. The server’s source code is not published. The public repository qurangallery/kb-mcp holds documentation only. Tools, parameters and behaviour are documented in these pages.
AffiliationRun by Quran Gallery. It is not operated by shamela.ws; each hit links back to the page there so you can check it.

What makes it different from reading Shamela yourself

Maktabah al-Shamela is a library of text. An assistant that retrieves from it without further structure can return the right words with the wrong provenance: a footnote presented as the author’s sentence, an automatic page number presented as the printed one, a page from one printing cited against another.

The server returns those facts as separate fields, so the assistant does not have to guess them:

  • printedPage is the volume and page as the printing paginates them, for example 1/ 6 for page 6 of volume 1.
  • matchedIn says whether your words were found in the body (the author’s text, the matn) or in a footnote (the editor’s or commentator’s words).
  • edition, editor and publisher appear when the library records them, and are left out when it does not. Nothing is filled in.
  • sourceUrl is the page on shamela.ws, so a reader can open the same page.

See Reading a result for how to read those fields and Edition metadata for what the library does and does not store.

A first request, end to end

This is one real request. It asks the hadith collections for a famous hadith:

curl -s https://qurangallery.com/mcp/shamela 
  -H 'Content-Type: application/json' 
  -H 'Accept: application/json, text/event-stream' 
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"shamela_search_library","arguments":{"query":"إنما الأعمال بالنيات","scope":"hadith-primary"}}}'

The result has five passages: three exact-phrase hits and two looser matches in Sunan al-Nasa’i. One is Sahih al-Bukhari, edition ط السلطانية, printed page 1/ 6, found in the main text, with the source page at https://shamela.ws/book/1681/10. Another is Sunan Abi Dawud (ed. al-Arna’ut), printed page 3/ 526, flagged footnote: the words there are an editor’s note quoting a commentator, not Abu Dawud’s own text.

What it covers

The 41 categories include the Quran and its sciences, tafsir, hadith and its sciences, fiqh across the four schools and comparative fiqh, creed (ʿaqīda), Arabic language, history, biography and more. Twelve ready-made search scopes cover 7,084 of those works for the common questions, such as hadith-primary (eight collections pinned to named printings), tafsir-canonical or fiqh-hanafi (Choosing a scope). The other 1,510 works are reachable through the raw shamela_* tools.

Search queries must be in Arabic. shamela_search_library and search reject a query with no Arabic words, with a message that tells the assistant to translate it first.

What it will not do

  • It does not grade hadith and gives no rulings. It finds and cites texts. Any grading you see in a result is quoted from the book and attributed to whoever wrote it.
  • It cannot make an assistant read a passage fairly. The passage, book and page come from the library, not from the model. The sentence the assistant builds around them is still the assistant’s.
  • It is not a book download. Searches return excerpts and reading tools return pages; the rate limits are what keep it a research tool.
PageUse it for
Getting startedConnecting ChatGPT, Claude, Cursor, VS Code or Gemini CLI
Connect any MCP clientSDKs, mcp-remote, curl, MCP Inspector
Islamic MCP servers comparedHow this server differs from the other servers people ask about
Verify a quotation against the printed pageChecking a citation an AI gave you
Search the main text or the footnotesFiltering by layer
Frequently asked questionsKeys, limits, tool count, the other things named Quran Gallery
Edit halaman ini di GitHub