{"slug": "muslim-prayer-reminder-mcp-astronomical-prayer-calculation-engine", "title": "Muslim Prayer Reminder MCP: Astronomical prayer calculation engine", "summary": "Smart Creations released Muslim Prayer Reminder MCP v1.0.1, a production-ready astronomical prayer calculation and proactive notification engine built on Cloudflare Workers for AI models, coding agents, and developer environments. Lead maintainer Tareq Naji's project supports Cloudflare Workers, Node.js 22/24 on Ubuntu and Windows, and all Model Context Protocol clients, and is installable via npx or a hosted endpoint at muslim-prayer-mcp.najetareqz.workers.dev/mcp. The server exposes a private /analytics dashboard backed by a SQLite Durable Object (AnalyticsDO) that tracks DAU, WAU, MAU, retention, weekly cohorts, tool usage, errors, client mix, countries, languages, and calculation authority, with a verified segment limited to OpenAI's published egress IPs.", "body_md": "**Production-ready astronomical prayer calculation and proactive notification engine on Cloudflare Workers for AI models, coding agents, and developer environments.**\n\n[**Documentation**](https://tareq7.github.io/muslim-prayer-mcp/) •\n  [**Live Demo (1080p)**](https://tareq7.github.io/muslim-prayer-mcp/demo.mp4) •\n  [**Quick Start**](#-quick-start) •\n  [**Tools Catalog**](#-mcp-tools-catalog) •\n  [**Theological Rigor**](#-astronomical--theological-rigor) •\n  **Security Policy**\n\n**Project Status**: 🟢 **Actively Maintained (v1.0.1)**\n\n**Published by**: [** Smart Creations**](https://github.com/Smart-Creations) (OpenAI Org: `org-deULP4GGInsTcWmuaHWp3lxy`) • **Lead Maintainer**: **Tareq Naji**\n\nSupported across Cloudflare Workers, Node.js 22/24 (Ubuntu & Windows), and all Model Context Protocol (MCP) clients.\n\nAdd to your Claude Desktop or Cursor MCP configuration:\n\n```\n{\n  \"mcpServers\": {\n    \"muslim-prayer\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"muslim-prayer-mcp\"]\n    }\n  }\n}\n{\n  \"mcpServers\": {\n    \"muslim-prayer\": {\n      \"url\": \"https://muslim-prayer-mcp.najetareqz.workers.dev/mcp\"\n    }\n  }\n}\n```\n\n`/analytics` is a private dashboard backed by a SQLite Durable Object (`AnalyticsDO`). It tracks active users (DAU, WAU, MAU), new vs returning users, retention, weekly cohorts, tool usage and health, errors, client mix, countries, languages, usage by local hour, and the calculation authority used.\n\n- **Protect it:** set a Worker secret named`ANALYTICS_TOKEN` (Cloudflare dashboard, Worker, Settings, Variables and Secrets). Open`/analytics` and enter any username with the token as the password.`/api/analytics` also accepts`Authorization: Bearer <token>` .\n- **Data model:** one row per call, keyed by a salted hash of OpenAI's`_meta[\"openai/subject\"]` . Calls are written atomically, so counts do not drift under concurrent traffic.\n- **Verified segment:** limits every chart to requests from OpenAI's published egress IPs, which filters out your own test calls. Refresh the bundled list with`node scripts/update-openai-egress.mjs` .\n- **Limits:** installs that never call a tool, and users whose host sends no subject ID, cannot be counted.\n\nWatch the Muslim Prayer Reminder MCP in action inside ChatGPT, Claude, and Cursor:\n\n*👉 [**Click here to watch the full 1080p demo video (MP4)**](https://tareq7.github.io/muslim-prayer-mcp/demo.mp4)*\n\n```\nflowchart TD\n    subgraph ClientLayer [\"AI Clients & Environments\"]\n        Cursor[\"Cursor IDE\"]\n        Claude[\"Claude Desktop / Web\"]\n        ChatGPT[\"ChatGPT Apps Directory\"]\n        Agent[\"Autonomous AI Agent\"]\n    end\n\n    subgraph TransportLayer [\"Model Context Protocol\"]\n        HTTP[\"Streamable HTTP /mcp\"]\n        Stdio[\"Stdio Transport CLI\"]\n    end\n\n    subgraph ResolverLayer [\"Layered Location Resolver\"]\n        Explicit[\"User coordinates + timezone or supported city\"] --> Truncate[\"2-Decimal Sanitizer ~1.1km\"]\n        UserPref[\"Stored KV Preferences\"] --> Resolver[\"Location Normalizer\"]\n        Headers[\"Verified end-user location headers\"] --> Resolver\n        Resolver --> Missing[\"No usable user location: location_required\"]\n        Truncate --> Resolver\n    end\n\n    GeoIP[\"Cloudflare network metadata\"] --> Analytics[\"Operational analytics only\"]\n\n    subgraph EngineLayer [\"In-Isolate Solar Calculation Engine\"]\n        Resolver --> Authority[\"Authority Selector\"]\n        Authority --> AdhanEngine[\"Astronomical Solar Solver\"]\n        AdhanEngine --> FiqhRules[\"Fiqh Clamping 48° & Madhab Calibration\"]\n        FiqhRules --> DueLogic[\"Prayer Window & Due Evaluator\"]\n    end\n\n    subgraph OutputLayer [\"Formatted Payloads & Disclosures\"]\n        DueLogic --> MCPResponse[\"JSON-RPC Structured Output\"]\n        MCPResponse --> DisclosureNotice[\"Mandatory Theological Notice\"]\n        DisclosureNotice --> Middleware[\"Deterministic Host Middleware\"]\n        Middleware --> FinalOutput[\"Appended AI Response: 🕌 It is time for Maghrib prayer\"]\n    end\n\n    ClientLayer --> TransportLayer\n    TransportLayer --> ResolverLayer\n```\n\nThe server exposes 5 finely-tuned tools conforming to the latest Model Context Protocol standard with full Zod output contracts:\n\n| Tool Name | Operation Mode | Open World | Description | \n|---|---|---|---|\n| **`get_prayer_status`** | Temporary state write | Safe | Checks if an obligatory prayer is currently due. Returns active prayer, countdown, calculation authority, and selection justification. | \n| **`get_today_prayer_times`** | Read-Only | Safe | Computes today's full timetable (Fajr, Sunrise, Dhuhr, Asr, Maghrib, Isha) in UTC and localized string format. | \n| **`get_next_prayer`** | Read-Only | Safe | Returns the immediate upcoming prayer, exact scheduled timestamp, countdown minutes, and regional authority. | \n| **`configure_prayer_preferences`** | Overwrites saved settings ( `destructiveHint: true` ) | Safe | Updates supplied preferences; switching fixed location can clear the previous location and timezone. Previous values are not retained for undo. | \n| **`get_prayer_preferences`** | Read-Only | Safe | Reads saved public preference settings. | \n\nPrayer calculations use astronomical models and configured regional methods; high-latitude substitutes and geographic heuristics are disclosed:\n\n| Sovereign Authority | Jurisdiction | Fajr Angle | Isha Angle / Interval | Default Asr Madhab | \n|---|---|---|---|---|\n| **Umm al-Qura University** | Saudi Arabia | 18.5° | +90 min | Shafi / Standard | \n| **Egyptian General Survey** | Egypt, Palestine, Levant | 19.5° | 17.5° | Shafi *(configured Palestinian service offsets applied)* | \n| **Diyanet İşleri Başkanlığı** | Turkey, Balkans, Central Asia | 18.0° | 17.0° | Hanafi (Double shadow ratio) | \n| **Univ. of Islamic Sciences, Karachi** | Pakistan, India, Bangladesh | 18.0° | 18.0° | Hanafi (Double shadow ratio) | \n| **ISNA** | United States, Canada | 15.0° | 15.0° | Shafi / Standard | \n| **Muslim World League (MWL)** | Europe, Global Fallback | 18.0° | 17.0° | Shafi / Standard | \n| **Configured Singapore method** | Malaysia, Singapore, Indonesia | 20.0° | 18.0° | Shafi / Standard | \n\nIn latitudes above 48° North or South where twilight persists throughout the night in summer, the engine automatically engages fiqh-compliant clamping (**Middle of the Night** & **One-Seventh Rule**), preventing computational errors or impossible timetables.\n\nConnect Muslim Prayer Reminder to any AI agent harness, developer IDE, or container runtime:\n\n| Environment / Harness | Protocol Mode | Quick Command / Deeplink | \n|---|---|---|\n| **Cursor IDE** | Remote HTTP |  | \n| **Claude Code** | Native Plugin | `/plugin marketplace add tareq7/muslim-prayer-mcp` | \n| **Codex** | Native Plugin | `codex plugin marketplace add tareq7/muslim-prayer-mcp` | \n| **GitHub Copilot CLI** | Copilot Plugin | `copilot plugin marketplace add tareq7/muslim-prayer-mcp` | \n| **Claude Desktop** | Stdio CLI | `npx -y muslim-prayer-mcp` via`claude_desktop_config.json` | \n| **VS Code & Cline** | Local NPX | `npx -y muslim-prayer-mcp` via`.vscode/mcp.json` | \n| **Windsurf & Devin** | Remote HTTP | Remote URL to `mcp_config.json` | \n| **Gemini CLI** | Native Extension | `gemini mcp add --transport http muslim-prayer https://muslim-prayer-mcp.najetareqz.workers.dev/mcp` | \n| **Pi Agent Harness** | Git Extension | `pi install git:github.com/tareq7/muslim-prayer-mcp` | \n| **OpenCode** | Agent Plugin | Auto-loaded via `opencode.json` &`AGENTS.md` | \n| **Docker Container** | Container | `docker build -t muslim-prayer-mcp .` then`docker run --rm -i muslim-prayer-mcp` (stdio) | \n\nRun inside your Claude Code session:\n\n```\n/plugin marketplace add tareq7/muslim-prayer-mcp\n/plugin install muslim-prayer-mcp@muslim-prayer-mcp\n```\n\n*(Note: Send as two separate prompts). In the **Claude Code Desktop app**, click the **+** button next to the prompt box ➔ **Plugins** ➔ **Add plugin** to browse and install from the marketplace.*\n\nRun in your terminal:\n\n```\ncodex plugin marketplace add tareq7/muslim-prayer-mcp\ncodex plugin add muslim-prayer-mcp@muslim-prayer-mcp\n```\n\n*Run `codex` and open `/hooks` (or start a new thread). This also activates the plugin in the Codex Desktop app upon restart.*\n\nIn your terminal:\n\n```\ncopilot plugin marketplace add tareq7/muslim-prayer-mcp\ncopilot plugin install muslim-prayer-mcp@muslim-prayer-mcp\n```\n\nOr inside an interactive Copilot CLI session:\n\n```\n/plugin marketplace add tareq7/muslim-prayer-mcp\n/plugin install muslim-prayer-mcp@muslim-prayer-mcp\n```\n\nClick to install with one click:\n\nOr manually add to `.cursor/mcp.json`:\n\n```\n{\n  \"mcpServers\": {\n    \"muslim-prayer\": {\n      \"url\": \"https://muslim-prayer-mcp.najetareqz.workers.dev/mcp\"\n    }\n  }\n}\n```\n\nAdd to your `claude_desktop_config.json`:\n\n```\n{\n  \"mcpServers\": {\n    \"muslim-prayer\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"muslim-prayer-mcp\"]\n    }\n  }\n}\n```\n\nAdd this to `.vscode/mcp.json` using [VS Code's `servers` format](https://code.visualstudio.com/docs/agent-customization/mcp-servers):\n\n```\n{\n  \"servers\": {\n    \"muslim-prayer\": {\n      \"type\": \"stdio\",\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"muslim-prayer-mcp\"]\n    }\n  }\n}\n```\n\nCline settings use the `mcpServers` format shown in Quick Start.\n\nAdd to `mcp_config.json`:\n\n```\n{\n  \"mcpServers\": {\n    \"muslim-prayer\": {\n      \"url\": \"https://muslim-prayer-mcp.najetareqz.workers.dev/mcp\"\n    }\n  }\n}\n```\n\nConnect directly using the live edge endpoint:\n\n```\ngemini mcp add --transport http muslim-prayer https://muslim-prayer-mcp.najetareqz.workers.dev/mcp\npi install git:github.com/tareq7/muslim-prayer-mcp\n```\n\nAdd to your `opencode.json`:\n\n```\n{\n  \"$schema\": \"https://opencode.ai/config.json\",\n  \"mcp\": {\n    \"muslim-prayer\": {\n      \"type\": \"remote\",\n      \"url\": \"https://muslim-prayer-mcp.najetareqz.workers.dev/mcp\"\n    }\n  }\n}\n```\n\n*OpenCode automatically loads this repository's [`AGENTS.md`](https://github.com/tareq7/muslim-prayer-mcp/blob/main/AGENTS.md) and [` skills/muslim-prayer-mcp/SKILL.md`](https://github.com/tareq7/muslim-prayer-mcp/blob/main/skills/muslim-prayer-mcp/SKILL.md).*\n\n```\ndocker build -t muslim-prayer-mcp .\ndocker run --rm -i muslim-prayer-mcp\n```\n\nFor platforms building autonomous AI agents (Next.js, LangChain, Vercel AI SDK), the included middleware deterministically appends prayer notices to AI responses without hallucination:\n\n``` js\nimport { PrayerReminderMiddleware } from 'muslim-prayer-mcp/middleware';\n\nconst prayerMiddleware = new PrayerReminderMiddleware({\n  workerBaseUrl: 'https://muslim-prayer-mcp.najetareqz.workers.dev',\n  userId: 'user_session_42',\n});\n\n// Wrap any LLM completion\nconst rawLlmOutput = await callLlm('Can you review this pull request?');\nconst { responseText, reminderAppended } = await prayerMiddleware.processResponse(rawLlmOutput, {\n  'X-User-Coordinates': '24.71, 46.68', // Riyadh\n  'X-User-Timezone': 'Asia/Riyadh',\n});\n\nconsole.log(responseText);\n// => The code looks solid, but let's optimize line 42...\n//\n// 🕌 It is time for Asr prayer.\n```\n\nThe engine includes 44 unit, integration, and end-to-end tests validating astronomical accuracy across 10 worldwide benchmark coordinates:\n\n```\nnpm test\n▶ Astronomical Prayer Calculation Suite\n  ✔ calculates valid prayer timetable for Riyadh in correct chronological sequence\n  ✔ calculates valid prayer timetable for Makkah in correct chronological sequence\n  ✔ calculates valid prayer timetable for Cairo in correct chronological sequence\n  ✔ calculates valid prayer timetable for Dubai in correct chronological sequence\n  ✔ calculates valid prayer timetable for London in correct chronological sequence\n  ✔ calculates valid prayer timetable for Paris in correct chronological sequence\n  ✔ calculates valid prayer timetable for New York in correct chronological sequence\n  ✔ calculates valid prayer timetable for Jakarta in correct chronological sequence\n  ✔ calculates valid prayer timetable for Karachi in correct chronological sequence\n  ✔ calculates valid prayer timetable for Sydney (Southern Hem) in correct chronological sequence\n  ✔ verifies Hanafi Asr is strictly later than Shafi Asr\n  ✔ handles Daylight Saving Time (DST) transitions safely\n  ✔ automatically resolves Palestinian Awqaf standard for Gaza\n  ✔ handles high-latitude polar city with MiddleOfTheNight rule safely\n...\nℹ tests 44 | pass 44 | fail 0\n```\n\n- **Coordinate Truncation** : All user coordinates are truncated to 2 decimal places upon arrival (~1.1 km resolution). Precise location is mathematically non-recoverable.\n- **No Outbound Tracking** : Astronomical math is computed locally within the isolated V8 runtime; zero external requests are made to third-party tracking APIs.\n- **Fail-Open Architecture** : Host middleware is designed to fail open; network issues or latency spikes will never block primary AI conversation streams.\n- **Full Disclosure Process** : See[SECURITY.md](https://github.com/tareq7/muslim-prayer-mcp/blob/main/SECURITY.md) for supported versions, SLA, and private reporting.\n\n- \n**Publisher & Organization** :[**Smart Creations**](https://github.com/Smart-Creations) (OpenAI Organization ID:`org-deULP4GGInsTcWmuaHWp3lxy` )\n- \n**Lead Maintainer & Author** :**Tareq Naji** ([@tareq7](https://github.com/tareq7) )\n- \n**License** :[MIT License](https://github.com/tareq7/muslim-prayer-mcp/blob/main/LICENSE) (Copyright © 2026 Smart Creations & Tareq Naji)\n- \n**Citation** :[CITATION.cff](https://github.com/tareq7/muslim-prayer-mcp/blob/main/CITATION.cff)\n- \n**Maintainers** :[MAINTAINERS.md](https://github.com/tareq7/muslim-prayer-mcp/blob/main/MAINTAINERS.md)\n- \n**Governance** :[GOVERNANCE.md](https://github.com/tareq7/muslim-prayer-mcp/blob/main/GOVERNANCE.md)\n- \n**Product Roadmap** :[ROADMAP.md](https://github.com/tareq7/muslim-prayer-mcp/blob/main/ROADMAP.md)\n- \n**Agent Guidelines** :[AGENTS.md](https://github.com/tareq7/muslim-prayer-mcp/blob/main/AGENTS.md)\n- \n**Contributing** :[CONTRIBUTING.md](https://github.com/tareq7/muslim-prayer-mcp/blob/main/CONTRIBUTING.md)\n- \n**Code of Conduct** :[CODE_OF_CONDUCT.md](https://github.com/tareq7/muslim-prayer-mcp/blob/main/CODE_OF_CONDUCT.md)\n- \n**Discussions** :[GitHub Discussions](https://github.com/tareq7/muslim-prayer-mcp/discussions)\n\nMade with precision for the global Muslim developer community.\n\nPrayer tools accept a supported `city`, coordinates with `timezone`, or complete stored fixed settings. Missing location returns `location_required`; connector/IP geolocation and automatic Makkah fallback are not used. Explicit per-call inputs override fixed preferences. Host headers must represent the end user.\n\n`highLatitudeAdjustment` discloses twilight substitutions and polar clamping; `effectiveLatitude` is present only for the +/-48-degree substitute and never echoes the original coordinate. `calculationDetails` reports location basis and regional, user, and method offsets. Invalid offsets that reverse prayer windows return `invalid_calculation`. Preferences expose `fixedCoordinatesConfigured` and `fixedCityConfigured` while redacting coordinates.\n\nAnalytics is pseudonymous and approximate: daily buckets 60 days, subject hashes 90 days, sessions 7 days, aggregate counters without expiry. Counts are not global atomic delivery metrics. Both dashboard aliases honor configured service authentication. See the privacy policy for the full retention and trust boundaries.\n\nExplicit coordinates require `timezone` in the same request. Stored fixed-location timezones are never inherited for new explicit coordinates. `calculationDetails.timezoneSource` identifies explicit, city, stored, or host input; city timezones must match the canonical city zone or an IANA alias. Coordinate timezones are checked against an approximate offline lookup and nearby boundary cells; contradictory values return location_timezone_mismatch with expectedTimezone. Supply city or coordinates, never both. Geographic default authority follows the lookup, not the supplied display timezone.\n\nFixed mode requires a supported city or coordinates with timezone. New fixed coordinates require timezone in the same configuration request. Failed configuration updates save nothing. Switching to `auto_travel` preserves fixed location for reuse; `clearFixedLocation:true` removes city, coordinates and timezone and defaults to auto-travel, preserving unrelated preferences. Clear cannot accompany replacement location/timezone or incomplete fixed mode.\n\nFor identified users, `prayer_window` and `exact_window` emit once per prayer/date/mode; `persistent` emits throughout the prayer period. Locale changes and toggling reminders do not reset deduplication. Anonymous calls do not persist deduplication. `expiresAtUtc` retains its prayer-period meaning; `prayerWindowExpiresAtUtc` names the same boundary, and `reminderWindowExpiresAtUtc` describes eligibility, capped by the prayer boundary in exact mode. These fields appear when a reminder is emitted. Cross-region KV updates and deduplication remain best effort.\n\nThe Palestinian regional profile is a configured service heuristic using the Egyptian method with Dhuhr -1 and Maghrib +3 minute offsets. Its broad coordinate/timezone/country rules do not establish jurisdiction. Exact adoption of these parameters by the Palestinian ministry has not been verified from a primary source. Users can override method and offsets. Other regional choices are service defaults, not nationwide mandates. Method descriptions follow [Adhan documentation](https://github.com/batoulapps/adhan-js/blob/develop/METHODS.md).\n\nThe supported city vocabulary and aliases are advertised in each location input schema and generated skill. The service registers five tools only. Duplicate suffixed tools or old schemas in a connector require refreshing its registration; they are not separate server operations.\n\nTimezone validation uses @photostructure/tz-lookup 11.7.0 (compact, approximate geographic data). Canonical IANA aliases are accepted; matching sampled UTC offsets is not sufficient, because DST transition dates can differ. Near boundaries, adjacent lookup zones within roughly 0.05 degrees are accepted and disclosed as nearby_boundary. This is not precise jurisdiction detection. Mathematical poles retain an explicit civil timezone choice; ocean cells require a matching nautical zone or nearby civil zone. New and updated fixed-city preferences store the canonical city timezone; contradictory supplied values are rejected. Legacy city records are presented canonically without rewriting other data on a read.\n\nThe caller must supply current city or coordinates/timezone in auto_travel mode; there is no automatic IP geolocation. Stored method preferences remain active while traveling. exact_window uses the saved duration or, when unset, the service default of 20 minutes unless an operator overrides it. Omitting the duration preserves existing preferences.", "url": "https://wpnews.pro/news/muslim-prayer-reminder-mcp-astronomical-prayer-calculation-engine", "canonical_source": "https://github.com/tareq7/muslim-prayer-mcp", "published_at": "2026-10-15 14:31:11+00:00", "updated_at": "2026-10-15 14:55:41.152574+00:00", "lang": "en", "topics": ["ai-agents", "agent-protocols", "developer-tools", "ai-tools"], "entities": ["Smart Creations", "Tareq Naji", "Muslim Prayer Reminder MCP", "Cloudflare Workers", "Node.js", "Model Context Protocol", "Claude Desktop", "Cursor"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/muslim-prayer-reminder-mcp-astronomical-prayer-calculation-engine", "markdown": "https://wpnews.pro/news/muslim-prayer-reminder-mcp-astronomical-prayer-calculation-engine.md", "text": "https://wpnews.pro/news/muslim-prayer-reminder-mcp-astronomical-prayer-calculation-engine.txt", "jsonld": "https://wpnews.pro/news/muslim-prayer-reminder-mcp-astronomical-prayer-calculation-engine.jsonld"}}