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 分