Model Context Protocol

Hadith + AI —
grounded, not guesswork.

An MCP server that serves canonical hadith text —Arabic & English —to AI assistants so they cite from real data instead of quoting from memory.

Why ground hadith?

Without grounding
  • Paraphrased narrations from training data
  • Hallucinated or wrong hadith numbers
  • Mixed-up collections and narrators
  • No way to verify what the AI said
With hadith-mcp
  • Exact Arabic & English text from the corpus
  • Correct collection slug, book, and hadith number
  • Cross-collection references & provenance tags
  • Semantic + keyword search over 50 000+ narrations

How It Works

  1. 1
    You ask the AI about hadith.

    A narration lookup, a thematic search, a cross-reference check — anything.

  2. 2
    The AI calls hadith-mcp.

    It retrieves verified text, narrators, and metadata from a normalized database derived from the hadith-json dataset (sourced from Sunnah.com).

  3. 3
    The response is grounded.

    The AI cites exact collection names, hadith numbers, Arabic text, and English translations — backed by the data it fetched, not model memory.

Available Tools

The MCP server exposes five tools. The AI picks the right one based on what you ask.

fetch_grounding_rules

Returns citation guidance and limitations once per session. Re-calls get a short repeat unless force_full=True.

list_collections

Lists every collection: slug, English & Arabic names, and hadith counts.

fetch_hadith

Fetch by global hadith_id or by collection + hadith_number. Supports ranges like "1-5" and optional cross-references.

search_hadith

Semantic (embeddings, default), keyword (SQL substring), or both. Falls back to keyword on rate limits or quota errors.

fetch_cross_references

Algorithmic similarity matches across collections for a given hadith — useful for mutaba'ah-style exploration.

Setup

Checking server…
https://hadith-mcp.org

Connect this server to any AI client that supports MCP. One-time setup, then it just works.

Claude (Web & Desktop)

Requires a Claude subscription (Pro, Team, or Enterprise).

1
Open Connectors

Go to SettingsConnectorsCustomize panel.

2
Add custom connector

Click the + button, then select Add custom connector.

3
Configure
Name hadith
URL https://hadith-mcp.org
4
Allow all tools

Open the connector and set every tool to Always allow. They're all read-only.

5
Use it

Open a new chat, enable the hadith connector, and ask your question. Look for tool-call indicators in the response.

ChatGPT (Web, Desktop & Mobile)

Requires a ChatGPT subscription. Set up on Web or Desktop once and it syncs to Mobile.

1
Open app settings

Go to SettingsAppsAdvanced at the bottom.

2
Enable developer mode

Turn on Developer mode. A Create app button appears in the top-right.

3
Create the app
Name hadith
URL https://hadith-mcp.org
Auth none
4
Use it

Invoke with @hadith in any chat. Look for Called tool indicators in the response.

Cursor

Add the remote MCP server in Cursor's settings.

1
Open MCP settings

Go to SettingsMCPAdd new MCP server.

2
Configure
Type streamable-http
URL https://hadith-mcp.org
3
Use it

The hadith tools are now available. Ask about hadith and the agent will call the server automatically.

Other MCP Clients

Any MCP-compatible client can connect. Use the server name hadith, point it at the URL, and keep transport on streamable-http.

1
At a glance
Name hadith
URL https://hadith-mcp.org
Transport streamable-http
2
JSON connection object
{
  "name": "hadith",
  "url": "https://hadith-mcp.org",
  "transport": "streamable-http"
}
3
Claude Desktop config file

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "hadith": {
      "url": "https://hadith-mcp.org",
      "transport": "streamable-http"
    }
  }
}

Grounding & Limitations

Source of truth

All text comes from hadith.db, built from the community hadith-json dataset (Sunnah.com). Prefer tool output over model paraphrase.

Citations

Always cite with collection slug and id_in_book. Never invent numbering.

Cross-references

Algorithmic matches (embedding similarity + narrator hints) — not a substitute for classical mutaba'ah scholarship.

Provenance tags

Labels like muttafaq_alayh or corroborated are heuristic pipeline tags, not theological rulings.

Arabic / English

English translations may be incomplete. Arabic strings are authoritative for the stored row.

Search limits

Semantic search uses OpenAI embeddings. Keyword search is SQL substring. Neither ranks by scholarly importance.

Important — Please Read

This tool retrieves hadith text from a database. It is not a scholar, a mufti, or a substitute for qualified Islamic scholarship. AI can still misinterpret context, conflate narrations, or present text without the nuance that trained scholars provide.

Do not blindly trust any AI output on religious matters — whether from this tool or any other. Always verify hadith citations against recognized scholarly sources. Consult qualified scholars for matters of fiqh, aqeedah, and religious practice.

Cross-references and provenance tags in this tool are algorithmic approximations, not the product of classical hadith criticism (ilm al-rijal). They may contain errors. The grading, authenticity, and contextual application of hadith require expertise that no software can replace.