Madeenan Quran and Hadith Sources

com.madeenanPublished by madeenan.comv0.1.0Updated Nov 14, 2026

Read-only search and lookups for Quran, Hadith, Tafsir, and dua sources, with citation fields.

Overview

AI-generated overview

Read-only MCP server that lets an assistant search and look up Quran, Hadith, Tafsir and dua sources with citation fields.

What you can do
  • Search Quran, Hadith, Tafsir and dua source records and get source text with citations
  • Read a specific Quran verse, chapter or bounded passage by reference
  • Read a Hadith by collection slug and number, including grade metadata
  • Read a dua or adhkar item by collection slug and item ID
  • Find wording matches for a quote, without proving authorship
  • Assemble evidence bundles and run a basic evidence checklist for a claim
When to use it
Useful when you want an assistant to retrieve and cite Islamic source texts during research or writing, and to keep quotations tied to references. It is a retrieval helper, not a source of rulings or interpretation.
Requirements
Local Python 3.11+ process, typically run with uvx from the madeenan-mcp package or installed in a virtual environment. Network access to the Madeenan API; optional MADEENAN_API_KEY, plus optional MADEENAN_API_BASE_URL and MADEENAN_TIMEOUT settings. Desktop MCP host only.
Before you install
The API key is read from the process environment and should go in the host's secret settings, not tool arguments; some hosts store env values as plain text in local config files. Public requests without a key can hit service limits. Results are retrieval only: the server does not verify meaning, certify claims or issue rulings. If run over HTTP, it has no built-in client authentication, so do not expose it publicly without an authenticated gateway.

Installation

In SourceWeft

  1. Open Madeenan Quran and Hadith Sources in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

Madeenan MCP server

Read-only MCP server for the Madeenan Quran and Hadith API. It gives Claude Desktop, Cursor, and other MCP hosts tools to search Quran, Hadith, Tafsir, and dua sources, read exact references, and collect evidence with citations. Docs: madeenan.com/docs/mcp.

The server retrieves source records and prepares evidence bundles. It does not issue religious rulings or verify the meaning of a claim.

Install

The server needs Python 3.11 or later. With uv, run the published package without a separate install step:

shell
uvx madeenan-mcp --check-config

Or install it into a virtual environment:

shell
python3 -m venv .venv. .venv/bin/activatepython -m pip install madeenan-mcp

The official packages are madeenan-mcp and madeenan-sdk. Their PyPI project links point to madeenan.com.

Install from a checkout

To work on the server, install both local packages from the repository:

shell
cd /path/to/madeenan/apps/mcppython3 -m venv .venv. .venv/bin/activatepython -m pip install -e ../../packages/pythonpython -m pip install -e '.[dev]'

Keep the virtual environment active when you run madeenan-mcp from a terminal.

Check settings and configure a host

Run the local check before you add the server to a host:

shell
madeenan-mcp --check-config

This command checks the API URL, timeout, HTTP bind port, and transport host and origin lists. It prints safe JSON and exits. It does not start the MCP server or contact the Madeenan API. The output reports whether an API key is set. It never prints the key. An invalid setting returns an error object and exit code 2.

For a client that uses the Claude Desktop or Cursor mcpServers JSON format, print a ready-to-copy stdio entry:

shell
madeenan-mcp --print-config

With uvx, the stdio entry is:

json
{  "mcpServers": {    "madeenan": {      "command": "uvx",      "args": ["madeenan-mcp", "--transport", "stdio"]    }  }}

For an installed package, --print-config uses the absolute path of the installed madeenan-mcp command. Neither form contains environment values or secrets. Add its mcpServers.madeenan entry to the host's existing config. Keep any other server entries in that file. This output is not a universal host format. For example, VS Code uses servers and sets type to stdio; Claude Code uses its claude mcp add command. See the MCP Python SDK host guide for current examples for each client.

The generated entry does not set MADEENAN_API_KEY. The server reads the key from its process environment. A shell variable reaches a host only when that host inherits the shell environment. A desktop app started from the Dock or Start menu may not inherit it. Set the key in the host's server environment settings or secret store. Some hosts save env values as plain text in a local config file. Protect that file and do not commit it. Never pass the key as an MCP tool argument.

Settings

The server reads these environment variables:

VariableDefaultUse
MADEENAN_API_KEYNot setOptional for current public source tools. Search access can have service limits.
MADEENAN_API_BASE_URLhttps://api.madeenan.comMadeenan API URL. It must use HTTP or HTTPS and must not include credentials, query values, or a fragment.
MADEENAN_TIMEOUT30API timeout in seconds. It must be greater than 0 and no more than 300.
MADEENAN_MCP_HOST127.0.0.1HTTP bind address.
MADEENAN_MCP_PORT8000HTTP bind port from 1 to 65535.
MADEENAN_MCP_ALLOWED_HOSTSDerived for local useJSON list of allowed HTTP Host values.
MADEENAN_MCP_ALLOWED_ORIGINSNoneJSON list of allowed browser origins.

The FASTMCP_TRANSPORT_SECURITY__ALLOWED_HOSTS and FASTMCP_TRANSPORT_SECURITY__ALLOWED_ORIGINS variables also set the host and origin lists. Each list must be JSON. For example:

shell
export FASTMCP_TRANSPORT_SECURITY__ALLOWED_HOSTS='["mcp.example.com:*"]'export FASTMCP_TRANSPORT_SECURITY__ALLOWED_ORIGINS='["https://mcp.example.com"]'

The Madeenan API key is optional for source lookups and search. The server does not expose the SDK's chat operation. The service can still limit public requests.

Run the server

For a local host, select stdio:

shell
madeenan-mcp --transport stdio

The command waits for the MCP host. It can remain silent while it waits. MCP messages use stdout, so do not add print calls to server startup code. Use stderr for logs.

For a local HTTP process, use Streamable HTTP:

shell
madeenan-mcp --transport streamable-http

The default MCP endpoint is /mcp. GET /health returns liveness and safe configuration status. An ASGI server can use madeenan_mcp.server:app:

shell
uvicorn madeenan_mcp.server:app --host 127.0.0.1 --port 8000

The server has no built-in client authentication for HTTP. DNS rebinding host and origin allowlists do not authenticate users. Do not expose the endpoint to a public network by itself. Put it behind a gateway that enforces client authentication and TLS, or keep it on a trusted local network.

For a container, build from the repository root:

shell
docker build -f apps/mcp/Dockerfile -t madeenan-mcp .docker run --rm -p 8000:8000 madeenan-mcp

The container listens on 0.0.0.0:8000. Protect the endpoint with an authenticated gateway before you expose it outside a trusted network. Pass secrets through your deployment's secret settings. Do not add them to the image or commit them.

Tools

  • search_islamic_sources: search source records.
  • lookup_quran_reference: read a verse, chapter, or bounded passage.
  • lookup_hadith_reference: read a Hadith and its grade metadata.
  • lookup_dua: read a dua or adhkar item.
  • find_quote_source: find wording matches. A match does not prove authorship.
  • create_evidence_bundle: collect search results and requested source lookups.
  • review_evidence_claim: prepare an evidence checklist. It does not verify a claim or its meaning.

The server also provides config://status and source_review_prompt.

Troubleshoot

  • If --check-config returns ok: false, fix the setting named in its message, then run the check again.
  • If a host cannot find the command, activate the venv before opening the host, or use the absolute command path from --print-config.
  • If the host shows no tools, restart it after you change its config. Check the host's server log for startup errors.
  • If a tool call fails, check the API URL and network access. Public search can also reach service limits. The API key is not a tool argument.
  • If a remote HTTP host cannot connect, check the bind address, port, host list, origin list, and gateway. Allowlist entries do not provide client authentication.
  • If you run stdio by itself, it waits for an MCP host. Silence is expected. Press Ctrl+C to stop the process.

License

MIT.

Source: apps/mcp/README.md at commit 04cf7ae

Tools

7

search_islamic_sources

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

Parameterslimitqueryrequiredindexeshadith_grade

lookup_quran_reference

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.

Parametersend_ayahreferencerequiredstart_ayah

lookup_hadith_reference

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

Parametershadith_numberrequiredcollection_slugrequired

lookup_dua

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

Parametersitem_idrequiredcollection_slugrequired

find_quote_source

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

Parametersquoterequiredindexes

create_evidence_bundle

Create a compact bundle of search results and requested source lookups. This is an evidence collection helper. It does not decide a religious ruling.

Parameterslimitqueryrequiredindexesreferences

review_evidence_claim

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.

Parametersclaimrequiredevidencerequired

Version history

1
  1. v0.1.0LatestNov 14, 2026

Score

90% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts
  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts