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.
On this page
No account, no sign-in, no key. Cursor reads MCP servers from mcp.json.
Steps
- Open
~/.cursor/mcp.json(all projects) or.cursor/mcp.jsonin a project (that project only). Create the file if it does not exist. - Add the server:
{
"mcpServers": {
"quran-gallery": { "url": "https://qurangallery.com/mcp/shamela" }
}
}- Save. Cursor lists MCP servers on its Customize page;
quran-galleryshould show as enabled with its tools. - Open a chat in Agent mode and ask a question that needs a text (below).
The /mcp page also has a one-click install button for Cursor.
First prompt to try
Find the hadith «إنما الأعمال بالنيات» in the primary collections and tell me which book, edition, volume and page it is printed on. Quote the Arabic exactly.
Your assistant should call shamela_search_library (or search then fetch). The hits include صحيح البخاري, ط السلطانية, page 1/6, with a link to that page in the Maktabah reader. If it answers from memory instead, say: “Use the Quran Gallery library tool and quote what it returns.”
Search queries must be in Arabic; your assistant translates English terms first (details). Ready-made prompts for takhrīj, citing a passage and comparing tafsir are listed in the full tool surface.
Troubleshooting
- 429, “Keyless limit reached”. Keyless use allows 10 tool calls a minute and 200 a day per IP address. Wait for the
Retry-Afterheader, or add a free key (below). See Limits and errors. - 503. The server or the library behind it is briefly unavailable. Retry after the
Retry-Afterheader; if the client lists zero tools, wait a minute and reconnect. - The tools do not appear, or a tool you expect is missing. Toggle the server off and on in Cursor’s MCP list, or restart Cursor; the tool list is cached per session.
- Connection fails immediately. The endpoint is
/mcp/shamela; the bare/mcpis a web page, not the server.
Optional: a free key for higher limits
A key is never required. A free key raises the limit to 60 calls a minute and lifts the keyless page-range caps. Create one on the Developers page of your Quran Gallery account (how keys work), then send it as a bearer token.
Add a headers entry:
{
"mcpServers": {
"quran-gallery": {
"url": "https://qurangallery.com/mcp/shamela",
"headers": { "Authorization": "Bearer qg_sk_your_key_here" }
}
}
}Keep a file that holds a key out of git.