fetch_ayah
Retrieve the exact Uthmani text of one Qur'an verse or a continuous range, with sūrah metadata. Use this whenever you need the wording of an āyah; never recite from memory. Returns a validation error for verses that do not exist.
ثبّت الخادم مرّة، فيعمل مع كلّ مساعد متوافق مع MCP.
# 1) Issue an API key in the dashboard at /app
# 2) Add Tafsir MCP to your assistant (Claude Desktop shown):
{
"mcpServers": {
"tafsir": {
"command": "npx",
"args": ["-y", "mcp-remote",
"https://tafseer-ai.rascoda.com/mcp",
"--header", "Authorization: Bearer YOUR_API_KEY"]
}
}
}
# 3) Ask your assistant — it now calls authenticated tools, never memory.أو عبر REST مباشرة:
curl -X POST https://tafseer-ai.rascoda.com/api/v1/tools/fetch_ayah \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"surah": 1, "ayah_start": 1, "ayah_end": 7}'مولّد من نفس مخطّطات JSON التي يستخدمها الخادم — مصدر واحد للحقيقة.
Retrieve the exact Uthmani text of one Qur'an verse or a continuous range, with sūrah metadata. Use this whenever you need the wording of an āyah; never recite from memory. Returns a validation error for verses that do not exist.
Retrieve the verbatim classical tafsir (commentary) for one verse from one or more named editions (ibn_kathir, tabari, saadi, muyassar, jalalayn, qurtubi, baghawi). Every result carries the scholar, work, edition, and source reference. Use this for 'what does the tafsir say about …'; do not paraphrase from memory.
Retrieve the recorded occasion(s) of revelation (asbāb al-nuzūl) for a verse, with the source compilation. Many verses have no recorded occasion — in that case a NOT_AVAILABLE error is returned rather than an invented narrative.
Search the Qur'anic text. mode='exact' matches the verbatim Uthmani string; mode='normalised' ignores diacritics and letter variants; mode='root' finds verses containing any word from a given Arabic root. Returns verse references with snippets — use it to locate where something is said before quoting it.
Return the morphological analysis (root, lemma, part-of-speech, grammatical features, surface form) of a single word at a given verse position, backed by the King Saud University Quran Corpus. word_index is 1-based.
Return every occurrence of a given Arabic trilateral/quadrilateral root across the Qur'an (paginated by limit/offset), with the surface form at each position. Matching is diacritic- and hamza-insensitive. Use it to study a root's usage.
كلّ شيء مفتوح المصدر. شغّل نسختك بأمر واحد.
git clone https://github.com/rascoda/tafsir-mcp && cd tafsir-mcp
cp .env.example .env
uv venv && uv pip install -e ".[dev]"
tafsir-ingest all # build the authentic corpus (~1 min)
tafsir-mcp --transport http # serve /mcp + /api + dashboard
# or the whole stack with Docker:
docker compose -f deploy/docker-compose.yml upكلّ طبعة: مصدرها، عالِمها، رخصتها.
| العمل | المؤلّف | النوع | الرخصة |
|---|---|---|---|
| أسباب نزول القرآن (Asbāb al-Nuzūl) | علي بن أحمد الواحدي(ت 468هـ) | asbab | Public Domain (classical) |
| Quranic Arabic Corpus — Morphology v0.4 | Quranic Arabic Corpus (Kais Dukes) — KSU | morphology | GNU GPL / see source |
| معالم التنزيل | الحسين بن مسعود البغوي(ت 516هـ) | tafsir | Public Domain (classical) |
| تفسير القرآن العظيم | إسماعيل بن عمر بن كثير الدمشقي(ت 774هـ) | tafsir | Public Domain (classical) |
| تفسير الجلالين | جلال الدين المحلّي وجلال الدين السيوطي(ت 911هـ) | tafsir | Public Domain (classical) |
| التفسير الميسر | نخبة من العلماء — مجمع الملك فهد | tafsir | King Fahd Complex (free distribution) |
| الجامع لأحكام القرآن | محمد بن أحمد القرطبي(ت 671هـ) | tafsir | Public Domain (classical) |
| تيسير الكريم الرحمن في تفسير كلام المنان | عبد الرحمن بن ناصر السعدي(ت 1376هـ) | tafsir | Public Domain (classical) |
| جامع البيان عن تأويل آي القرآن | محمد بن جرير الطبري(ت 310هـ) | tafsir | Public Domain (classical) |