Skip to main content
Glama
README.md
# Quran Gate MCP server and open dataset

An [MCP](https://modelcontextprotocol.io) server that gives AI assistants Quran reading
plans and reference data: a khatam planner, surah and juz facts, Ramadan dates, and du'a
and dhikr with their sources. The same data is published here as JSON under
[CC BY 4.0](DATA-LICENSE.md).

Made by [Quran Gate](https://qurangate.app), the app that keeps distracting apps locked
until you have read a few verses of the Quran.

It runs locally over stdio, needs no API key and makes no network calls.

## Tools

| Tool | What it does | Example prompt |
| --- | --- | --- |
| `khatam_plan` | Pages per day, juz per week and finish date for a complete reading of the 604-page Madinah Mushaf, from a number of days or a daily page count. Optional day-by-day page schedule. | "Plan a khatam for Ramadan starting 8 Feb 2027." |
| `surah_info` | Names, meaning, Meccan or Medinan, ayah count, juz, pages, reading time, a short summary, and hadith references for virtues where a sourced narration exists. Takes a number or any common spelling. | "Tell me about Surah Mulk." |
| `juz_info` | Where a juz starts and ends, ayah count, pages, surahs and reading time. Can also say which juz a verse is in. | "Which juz is Ayat al-Kursi in?" |
| `ramadan_dates` | Days until Ramadan, first fast, first taraweeh, last ten nights, 27th night and Eid al-Fitr, with linked reading plans. | "How many days until Ramadan?" |
| `dua_dhikr` | Search du'a and dhikr by topic or id. Every entry has its source (Quran, or hadith collection and number) and grade. | "Is there a dua for anxiety?" |

Every result includes a link to the matching page on qurangate.app and an attribution line.

The five datasets are also exposed as MCP resources at `quran-gate://data/<name>.json`.

### No Quran text

The server and dataset never contain Quran text or translations. Tools return references
(such as `2:201`) and links where the full text can be read. Du'as that are verses of the
Quran are returned the same way.

## Install

Requires Node.js 18 or later.

### Claude Code

```bash
claude mcp add quran-gate -- npx -y quran-gate-mcp
```

### Claude Desktop

Open Settings, then Developer, then Edit Config, and add this to
`claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "quran-gate": {
      "command": "npx",
      "args": ["-y", "quran-gate-mcp"]
    }
  }
}
```

Restart Claude Desktop.

### Cursor

Add this to `~/.cursor/mcp.json` (all projects) or `.cursor/mcp.json` (one project):

```json
{
  "mcpServers": {
    "quran-gate": {
      "command": "npx",
      "args": ["-y", "quran-gate-mcp"]
    }
  }
}
```

### Other MCP clients

Run `npx -y quran-gate-mcp` as a stdio server.

## Open dataset

| File | Contents |
| --- | --- |
| [`data/surahs.json`](data/surahs.json) | 114 surahs: names, meaning, revelation place, ayah count, juz and page span, reading time, EN and AR summary, sourced virtues, links |
| [`data/juz.json`](data/juz.json) | 30 juz: first and last ayah, ayah count, pages, surahs, reading time, links |
| [`data/ramadan.json`](data/ramadan.json) | Ramadan 1448 (2027) key dates and the 1449 (2028) estimate |
| [`data/remembrance.json`](data/remembrance.json) | 53 du'a and dhikr entries with source, grade, transliteration and meaning (verse references only for Quran du'as) |
| [`data/khatam.json`](data/khatam.json) | 30, 60 and 365-day khatam schedules with a page range for each day |

Each file starts with its licence, attribution and notes.

### Please credit Quran Gate

The data is free to use, including commercially, under CC BY 4.0. Credit
**"Quran Gate (https://qurangate.app)"** on your credits page or in your README, for example:

```
Data: Quran Gate (https://qurangate.app), CC BY 4.0
```

### Notes on accuracy

- Pages and juz follow the standard 604-page Madinah Mushaf.
- Hadith references carry collection and number. Popular virtues resting on weak
  narrations are labelled weak rather than repeated. The references are awaiting a
  scholarly review; report any error in an issue.
- Ramadan dates are astronomical and can move by a day with local moon sighting.

## Development

```bash
npm install
npm run build
npm test
```

`npm test` builds the server, starts it over stdio with the official MCP client and calls
every tool.

The dataset is generated from the Quran Gate website source with `npm run build:data`.
This needs the website repository (private) checked out next to this one, at
`../Quran Gate Website/quran-gate`, or `QURAN_GATE_SITE` pointing at its `quran-gate/`
folder. The generator fails if a summary starts quoting verse text.

## Licence

Code: [MIT](LICENSE). Data in `data/`: [CC BY 4.0](DATA-LICENSE.md).