Madeenan Quran and Hadith Sources

com.madeenan由 madeenan.com 發布v0.1.0更新於 Nov 14, 2026

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

概覽

AI 產生的概覽

唯讀 MCP 伺服器,讓助理檢索古蘭經、聖訓、經註與祈禱詞來源,並回傳引用欄位。

可以做什麼
  • 檢索古蘭經、聖訓、經註與祈禱詞來源紀錄,回傳原文與引用資訊
  • 依參照讀取單節經文、整章或有範圍的經文段落
  • 依合集代稱與編號讀取聖訓,含等級中繼資料
  • 依合集代稱與項目 ID 讀取祈禱詞或讚念項目
  • 為一段引文尋找措辭相符的內容,但不證明出處
  • 整理證據包,並對主張執行基本證據檢核清單
適用情境
適合在研究或寫作時讓助理調閱並引用伊斯蘭教原始文獻,並讓引文與出處保持對應。它是檢索輔助工具,不提供教法裁決或釋義。
執行需求
本機 Python 3.11 以上程序,通常以 uvx 執行 madeenan-mcp 套件,或安裝到虛擬環境。需要連線至 Madeenan API 的網路;可選用 MADEENAN_API_KEY,以及可選的 MADEENAN_API_BASE_URL 與 MADEENAN_TIMEOUT 設定。僅支援桌面 MCP 主機。
安裝前請注意
API 金鑰從程序環境讀取,應放在主機的密鑰設定中,不要當成工具參數傳入;部分主機會以明文把環境變數值存在本機設定檔。未帶金鑰的公開請求可能觸及服務用量上限。結果僅為檢索內容:伺服器不驗證含義、不認證主張,也不發布裁決。若以 HTTP 方式執行,它沒有內建用戶端驗證,未經具驗證機制的閘道不要對外公開。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Madeenan Quran and Hadith Sources,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

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.

來源:apps/mcp/README.md,提交 04cf7ae

工具

7

search_islamic_sources

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

輸入參數limitquery必填indexeshadith_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.

輸入參數end_ayahreference必填start_ayah

lookup_hadith_reference

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

輸入參數hadith_number必填collection_slug必填

lookup_dua

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

輸入參數item_id必填collection_slug必填

find_quote_source

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

輸入參數quote必填indexes

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.

輸入參數limitquery必填indexesreferences

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.

輸入參數claim必填evidence必填

版本歷史

1
  1. v0.1.0最新Nov 14, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分