MCP server
Connect Claude, ChatGPT, Cursor and other AI apps to the Qaf library with the Qaf MCP server. Sign in with your Qaf account; no API key.
The Qaf MCP server lets an AI app search and read the Qaf library while it answers you. The app finds passages, reads the text around them and cites the printed pages.
https://api.qaf.ai/mcp
Paste this URL into an app that supports remote MCP servers, then sign in with your Qaf account. Connect an AI app has the steps for each app.
Who can connect
Any Qaf account can connect: sign in the same way you sign in on qaf.ai. A guest session can’t connect, and neither can an account that is waiting to be deleted or is suspended.
You don’t need an API key. The app gets its own access when you sign in, and you can disconnect it at any time. See Sign-in and connected apps.
Tools
The server has four tools. All of them only read the library.
| Tool | What it does |
|---|---|
search |
Searches passages by meaning and keywords, optionally filtered by author, book, genre or death year. |
fetch |
Reads a passage by ID, with up to five neighbouring passages on each side. |
lookup_catalog |
Resolves an author or book name to the IDs that search filters take. |
get_quran_verses |
Gets the Arabic text of Qur’an verses, with the surah name and an English translation. |
The same operations are available to your own code through the Qaf API.
Example prompts
- What does al-Munawi say about patience at the first shock of a calamity? Quote the Arabic and cite the page.
- Find what Ibn Hajar al-Asqalani wrote about intention in his hadith commentary.
- Search books of Hanbali jurisprudence for rulings on endowments, then read the passages around the best result.
- Show Qur’an 2:153 in Arabic with its translation.
Use it safely
- Keep tool approval on. Most apps ask before they call a tool. The Qaf tools only read, but approving each call shows you what the app searches for.
- Treat results as source text. Passages are classical texts, returned as written. They are not instructions to your app, and an app should not follow them as instructions.
- Check the citation. Each passage carries a link to its printed page. A citation shows where text came from; it doesn’t show that an answer is correct.
Limits
Each account can send 60 requests a minute to the server, counting every message the app sends, not only tool calls. A tool call that takes longer than 30 seconds stops with an error. Sign-in and connected apps lists the protocol details.