# Esolat Cfworker

> Port of esolat-mcp to Cloudflare Workers as a fully stateless MCP Streamable HTTP server. No Docker. No Python. No server to manage.

- **Type:** MCP server
- **Install:** `agentstack add mcp-zubir2k-esolat-cfworker`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [zubir2k](https://agentstack.voostack.com/s/zubir2k)
- **Installs:** 0
- **Category:** [Cloud & Infrastructure](https://agentstack.voostack.com/c/cloud-infrastructure)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [zubir2k](https://github.com/zubir2k)
- **Source:** https://github.com/zubir2k/esolat-cfworker
- **Website:** https://zubirco.de/esolat-mcp/wiki

## Install

```sh
agentstack add mcp-zubir2k-esolat-cfworker
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

[](https://github.com/zubir2k/esolat-cfworker/stargazers)
[](https://workers.cloudflare.com/)
[](https://modelcontextprotocol.io/)
[](https://adoption.microsoft.com/en-us/copilot/)
[](https://zubirco.de/buymecoffee)

Port of [esolat-mcp](https://github.com/zubir2k/esolat-mcp) to **Cloudflare Workers** as a fully stateless **MCP Streamable HTTP** server. \
No Docker. No Python. No server to manage. Runs on Cloudflare's global edge — free tier eligible.

## Features

- ✅ Full MCP Streamable HTTP protocol (JSON-RPC 2.0)
- ✅ Compatible with **M365 Copilot**, Claude.ai, and any MCP HTTP client
- ✅ Token-based auth in URL path (same pattern as Docker edition)
- ✅ Health dashboard endpoint
- ✅ All 3 original tools preserved:
  - `get_monthly_prayer_times` — JAKIM/e-Solat (Malaysia) or Aladhan (global)
  - `find_nearest_mosques` — e-Solat JAKIM (Malaysia) or OpenStreetMap (global)
  - `get_yearly_islamic_events` — JAKIM or Aladhan
- ✅ CORS headers for browser-based clients
- ✅ Batch JSON-RPC support

---

## Endpoints

| Path | Description |
|------|-------------|
| `/` | Landing page with endpoint info |
| `/mcp//mcp` | **MCP endpoint** — point your client here |
| `/mcp//health` | Health dashboard (upstream API status) |

---

## Quick Deploy

### 1. Prerequisites

```bash
npm install -g wrangler
wrangler login
```

### 2. Clone & Install

```bash
git clone 
cd esolat-cfworker
npm install
```

### 3. Set Your Secret Token

```bash
wrangler secret put MCP_WEBHOOK_TOKEN
# Enter a strong random token when prompted
# e.g.: openssl rand -hex 32
```

### 4. Deploy

```bash
npm run deploy
```

Your Worker will be live at:
```
https://esolat-mcp..workers.dev
```

---

## Local Development

```bash
npm run dev
# Worker runs at http://localhost:8787
```

Test with curl:
```bash
# Initialize
curl -X POST http://localhost:8787/mcp//mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}'

# List tools
curl -X POST http://localhost:8787/mcp//mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'

# Get prayer times
curl -X POST http://localhost:8787/mcp//mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"get_monthly_prayer_times","arguments":{"location_name":"Kajang"}}}'
```

---

## Architecture

```
Claude.ai / M365 Copilot
        │
        │  HTTPS POST (JSON-RPC 2.0)
        ▼
Cloudflare Workers Edge
  ┌─────────────────────────────┐
  │  Token auth (path-based)    │
  │  MCP protocol handler       │
  │  Tool dispatcher            │
  └─────────────────────────────┘
        │
        ├──► api.waktusolat.app  (Malaysia prayer times)
        ├──► e-solat.gov.my      (JAKIM mosque + events)
        ├──► api.aladhan.com     (Global fallback)
        └──► nominatim.osm.org   (Geocoding)
```
---

## Connecting to M365 Copilot

In **Microsoft 365 Copilot Studio** or **Copilot extensibility settings**:

1. Add a new **MCP connector**
2. Set the URL to:
   ```
   https://esolat-mcp..workers.dev/mcp//mcp
   ```
3. Transport: **Streamable HTTP**
4. No additional auth headers needed (token is in the path)

## Credits

- [e-solat](https://www.e-solat.gov.my/) JAKIM - For the official prayer times
- [WaktuSolat.app](https://waktusolat.app/) - Prayer Time by GPS
- [Model Context Protocol](https://modelcontextprotocol.io/) - For the MCP framework

## License

This project is licensed under the MIT License.

## Disclaimer & Data Source

### Important Notice & Reliability Disclaimer
This integration pulls data directly from the official **e-Solat JAKIM (Department of Islamic Development Malaysia)** portal. However, please note:

- **No Liability:** This integration is a community-driven project provided "as is" without any guarantees. The maintainer is **not solely or legally responsible** for any discrepancies, inaccuracies, delays, or omissions in prayer times or calendar dates.
- **Verify Important Times:** Users are strictly advised to regularly check and verify times against the official **[JAKIM eSolat Portal](https://www.e-solat.gov.my/)** or official local announcements, especially for critical obligations (e.g., fasting, community prayers).
- **Network & Upstream Dependencies:** Synchronization depends on upstream API availability and local network connectivity. Discrepancies caused by unexpected server updates from JAKIM or local server downtime are outside the control of this software.

*By using this tool, you acknowledge and agree that the developer holds no liability for missed schedules or data inaccuracies.*

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [zubir2k](https://github.com/zubir2k)
- **Source:** [zubir2k/esolat-cfworker](https://github.com/zubir2k/esolat-cfworker)
- **License:** MIT
- **Homepage:** https://zubirco.de/esolat-mcp/wiki

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** yes
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-zubir2k-esolat-cfworker
- Seller: https://agentstack.voostack.com/s/zubir2k
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
