Skip to content
Developers
Esc
↑↓navigate↵open⌘Jpreview
On this page

Qaf developer docs

Search and read classical Islamic books from an AI app or your own code, with the Qaf MCP server and the Qaf API.

The Qaf library holds more than 8,000 books of Qur’an exegesis, hadith, jurisprudence, theology, history and language, in Arabic.

Connect an AI app

Paste the server URL into an AI app that supports MCP, then sign in with your Qaf account. You don’t need an API key.

https://api.qaf.ai/mcp

Setup steps for Claude, ChatGPT, Claude Code, Codex, Cursor and VS Code.

Call the API

Create an API key, then search the library from your own code.

curl https://api.qaf.ai/v1/search \
  -H "Authorization: Bearer $QAF_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "الصبر عند المصيبة"}'

Get an API key or follow the quickstart.

What you can do

The MCP server and the API run the same operations on the same library, and return the same passages.

Task MCP tool API endpoint
Search passages by meaning and keywords search POST /v1/search
Read a passage and the passages around it fetch GET /v1/passages/{id}
Look up an author or book by name lookup_catalog GET /v1/catalog/lookup
Get Qur’an verses with their surah get_quran_verses GET /v1/quran/verses

Before you build