Fanar

Official registry Media and design

Fanar (QCRI) for MCP: cited Islamic Q&A, Qur'an and hadith checks, Arabic translation and speech

Install

Add this to your client's MCP configuration (Claude Desktop: claude_desktop_config.json; Cursor: .cursor/mcp.json; VS Code and others use the same "mcpServers" shape).

PYPI package fanar-mcp
Claude Code
claude mcp add fanar -e 'FANAR_API_KEY=<your fanar_api_key>' -- uvx fanar-mcp==0.1.1
JSON configuration (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "fanar": {
            "command": "uvx",
            "args": [
                "fanar-mcp==0.1.1"
            ],
            "env": {
                "FANAR_API_KEY": "<your fanar_api_key>"
            }
        }
    }
}

Environment variables

  • FANAR_API_KEY required secret Your Fanar API key, requested at https://api.fanar.qa/request

Documentation

From the project's README on GitHub, refreshed weekly. Links open on GitHub.

Contents
  1. fanar-mcp
  2. Tools
  3. Get a key
  4. Install and configure
  5. Responsible use
  6. Development
  7. License

fanar-mcp

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.

Tools

ToolWhat it doesFanar modelDefault limit per key
fanar_list_modelsModels your key may call. Start here: entitlements differ per key
fanar_chatChat in Arabic (MSA and dialects) or English, optional step-by-step thinkingFanar-C-2-27B, Fanar50 a minute
fanar_islamic_qaIslamic Q&A with references; madhab and source filters on Sadiq-2Fanar-Sadiq, Fanar-Sadiq-250 a minute
fanar_validate_quotationsFinds and verifies Qur'an and hadith quotations in any textFanar-Sadiq-2200 a minute
fanar_deep_research, fanar_deep_research_resultStructured, cited research report on an Islamic topic (minutes)Fanar-Sadiq-220 a day
fanar_translateArabic-English translation, including classical textsFanar-3.0-Shaheen-Translate20 a day
fanar_text_to_speechArabic or English speech in ten voices; Qur'an reciters on Sadiq-TTSFanar-Aura-TTS-220 a day
fanar_transcribeArabic (with dialects) or English speech to text; long-form optionFanar-Aura-STT-1, STT-LF-120 a day, 10 long-form
fanar_generate_imageCulturally aware image generationFanar-Oryx-IG-220 a day
fanar_moderateSafety and cultural-awareness scores for a prompt and responseFanar-Guard-250 a minute
fanar_poemArabic poetry in the classical traditionFanar-Diwan50 a minute

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).

Get a key

Request API access at https://api.fanar.qa/request. Fanar deactivates keys after 90 days without use.

Install and configure

Requires Python 3.10 or later.

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).

Responsible use

  • Answers from fanar_islamic_qa are cited answers, not fatwas. Show the references, note differences between schools, and refer binding questions to a qualified scholar or Shariah board.
  • A quotation that fanar_validate_quotations leaves untagged was not verified. Treat it as unverified.
  • Your use of the API is governed by Fanar's own terms. Read them before using Fanar in a commercial product.
  • The server never logs or returns your API key.

Development

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.

Frequently asked questions

What is Fanar?

Fanar (QCRI) for MCP: cited Islamic Q&A, Qur'an and hadith checks, Arabic translation and speech

How do I install Fanar?

It runs on your machine. In Claude Code: claude mcp add fanar -e 'FANAR_API_KEY=<your fanar_api_key>' -- uvx fanar-mcp==0.1.1. For other clients, paste the JSON configuration from this page into their MCP settings.

Does Fanar need an API key?

Yes. It expects FANAR_API_KEY, which you set in its configuration.

Is Fanar open source?

Yes. Its code is on GitHub under the Apache-2.0 license.

Who maintains Fanar?

It is published by Blade-Labs. AI.tn lists it but does not maintain or endorse it.

From the official MCP Registry. Listing is not an endorsement: review a server's code and permissions before giving it access to your data.