MCP server for Fanar, QCRI's Arabic-centric AI platform: chat, cited Islamic Q&A, Qur'an and hadith quotation checks, deep research, translation, speech and images.
A Model Context Protocol server for Fanar, the Arabic-centric generative AI platform built by QCRI at Hamad Bin Khalifa University. It gives any MCP client (Claude Desktop, Claude Code, Cursor, and other agent harnesses) Fanar's chat models, cited Islamic question answering, Qur'an and hadith quotation checks, deep research, Arabic-English translation, Arabic speech in both directions, and image generation.
Built for the Islamic finance community first: ask a fiqh question and get the sources, check every quotation in a draft before it is published, and translate classical Arabic texts.
Independent open-source project by Blade Labs. Not affiliated with or endorsed by QCRI or HBKU. Status: alpha.
Limits are Fanar's published defaults; every result carries the remaining quota Fanar reports. A tool that needs a model your key lacks returns a clear error with the link to request access.
Prompts: islamic_finance_question (answer with sources and checked quotations) and verify_islamic_quotations (check a text before publishing).
Request API access at https://api.fanar.qa/request. Fanar deactivates keys after 90 days without use.
pip install fanar-mcp # or run it without installing: uvx fanar-mcp uvx --from git+https://github.com/Blade-Labs/fanar-mcp fanar-mcp # straight from GitHub Claude Desktop (claude_desktop_config.json):
{ "mcpServers": { "fanar": { "command": "uvx", "args": ["fanar-mcp"], "env": { "FANAR_API_KEY": "your-key" } } } } Claude Code:
claude mcp add fanar -e FANAR_API_KEY=your-key -- uvx fanar-mcp Cursor and other clients take the same command (uvx fanar-mcp) and the FANAR_API_KEY variable. For a shared server, run fanar-mcp --transport streamable-http --port 8765.
Environment variables: FANAR_API_KEY (required), FANAR_BASE_URL (default https://api.fanar.qa/v1), FANAR_MCP_OUTPUT_DIR (where audio and images are saved; default ~/fanar-mcp-output).
pip install -e ".[test]" pytest # offline tests, no network or key needed FANAR_API_KEY=... python scripts/smoke.py # live check through a real MCP client License Apache-2.0. See LICENSE.
All 2 files in this release have provenance metadata.
arabic fanar islamic-finance llm mcp model-context-protocol qcri
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
All 2 files in this release have been uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.




