Skip to main content
Glama

Madeenan: Quran and Hadith API clients and MCP server

Open-source clients for the Madeenan Quran and Hadith API. Search Quran, Hadith, Tafsir and dua sources, read exact references, check where a quote comes from, and get answers that cite their sources.

The search, ranking and source data run on the hosted Madeenan API. This repository contains the client libraries and the MCP server that call it.

Package

Path

Install

TypeScript SDK @madeenan/sdk

packages/sdk

see packages/sdk/README.md

React components @madeenan/react

packages/react

see packages/react/README.md

React Native components @madeenan/react-native

packages/react-native

see packages/react-native/README.md

Python SDK madeenan-sdk

packages/python

see packages/python/README.md

MCP server madeenan-mcp

apps/mcp

see apps/mcp/README.md

Quick example (TypeScript)

import { createMadeenanClient } from "@madeenan/sdk";

const madeenan = createMadeenanClient({ apiKey: process.env.MADEENAN_API_KEY });

const search = await madeenan.search({
  q: "patience and prayer",
  indexes: ["quran", "hadith"],
});

for (const result of search.results.quran ?? []) {
  console.log(result.ref, result.excerpt ?? result.translation);
}

Keep the API key on your server. Do not put it in code that runs in a browser.

Related MCP server: hadith-mcp

MCP tools

The MCP server lets Claude, Cursor and other MCP clients look up sources instead of answering from memory:

  • search_islamic_sources: search Quran, Hadith, Tafsir and dua records.

  • lookup_quran_reference: read a verse, chapter or passage.

  • lookup_hadith_reference: read a Hadith with its recorded grade.

  • lookup_dua: read a dua or adhkar item.

  • find_quote_source: find where a wording appears. A match does not prove authorship.

  • create_evidence_bundle and review_evidence_claim: collect sources for a claim and prepare a checklist. They do not verify a claim or its meaning.

The API contract the SDKs are tested against is in contracts/public-openapi.json.

License

MIT. See LICENSE.

Available Tools

7 tools
create_evidence_bundleB

Create a compact bundle of search results and requested source lookups.

This is an evidence collection helper. It does not decide a religious ruling.

Inputs: query (required), limit, indexes, references. Returns: object

find_quote_sourceB

Find wording matches for a quote. A match does not prove authorship or meaning.

Inputs: quote (required), indexes. Returns: object

lookup_duaC

Read one dua or adhkar item by collection slug and item ID.

Inputs: item_id (required), collection_slug (required). Returns: object

lookup_hadith_referenceA

Read one Hadith by collection slug and number, including grade metadata.

Inputs: hadith_number (required), collection_slug (required). Returns: object

lookup_quran_referenceA

Read one Quran verse, chapter, or bounded passage by reference.

Use ``2:255`` for one verse, ``2`` for a chapter, or ``2`` with start and
end ayah values for a passage. The returned text is a source lookup only.

Inputs: reference (required), end_ayah, start_ayah. Returns: object

review_evidence_claimA

Review whether supplied evidence is relevant to a claim without verifying truth.

This tool performs a basic evidence checklist. It does not certify a claim, issue a fatwa, or verify religious meaning. Include source references in the evidence list and ask a qualified scholar for interpretation.

Inputs: claim (required), evidence (required). Returns: object

search_islamic_sourcesC

Search Quran, Hadith, Tafsir, and dua sources. Returns source text and citation fields.

Inputs: query (required), limit, indexes, hadith_grade. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 7 tools

    Disambiguation4/5

    The three lookup tools are cleanly separated by source type (dua, Quran, Hadith), and the evidence bundle/review pair serves clearly different roles (assembly vs. checklist review). The main overlap is between search_islamic_sources and find_quote_source, which both take text and return source matches; the descriptions hint at the difference (query search vs. quote wording match) but an agent could still pick the wrong one.

    Naming Consistency5/5

    Every tool follows a snake_case verb_noun pattern (lookup_*, find_*, search_*, create_*, review_*), with nouns that map to the resource being touched. No mixing of conventions or vague single-word names.

    Tool Count5/5

    Seven tools is well within the ideal range and each one earns its place: three source lookups, one cross-source search, one quote matcher, and two evidence-workflow helpers. Nothing looks like filler or a near-duplicate.

    Completeness4/5

    The surface covers the core lifecycle of source lookup (dua, Quran, Hadith, plus tafsir via search) and adds an evidence collection/review workflow, which is coherent for the stated purpose. Gaps remain: there is no tool to enumerate valid collection slugs or available sources, and tafsir has no direct reference lookup, so an agent must guess slugs or go through generic search.

    Maintenance

    ActivityMaintained
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Read-only MCP server for finding Discord messages. It enables searching guild messages, locating messages from jump URLs, and reading context around results.
      7
      1
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server for retrieving hadith text and metadata from auditable sources, providing exact references, Arabic text, English translations, and source-attributed grading.
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server to search and retrieve passages from a corpus of 7,872 classical Islamic books via the Sahifah API, with full citations and mu'tabar filtering.
      21 npm
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      An MCP server that enables searching and researching Hadith through Dorar.net inside Claude Desktop, providing authentic search results, grading, and commentary.
      7
      MIT