Malaysia public holidays, school terms, business days & a leave optimizer (13 tools).
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent โ or use 1-click editor setup below.
๐ก Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
Malaysia's most complete calendar API โ public holidays, school calendar, exam schedules, and MCP server for AI tools.
Data source: Official government gazette (JPM BKPP), JAKIM, KPM, MPM. Not scraped from third-party websites.
Published to npm under the @catlabtech scope:
| Package | Purpose | Install |
|---|---|---|
@catlabtech/mycal-core | Shared types, Zod schemas, and calendar/business-day logic | npm install @catlabtech/mycal-core |
@catlabtech/mycal-sdk | TypeScript client SDK for the REST API | npm install @catlabtech/mycal-sdk |
@catlabtech/mycal-mcp-server | MCP server exposing 13 calendar tools for AI agents | npm install @catlabtech/mycal-mcp-server |
.ics feeds@catlabtech/mycal-sdk) with typed responsesBase URL: https://mycal-api.huijun00100101.workers.dev/v1
Response:
| Endpoint | Description |
|---|---|
GET /v1/holidays | List holidays (filter by year, state, type, status, month) |
GET /v1/holidays/check | Is this date a holiday/weekend/working day/school day? |
GET /v1/holidays/today | Today's holiday status |
GET /v1/holidays/next | Next upcoming holiday |
GET /v1/holidays/between | Holidays in date range |
GET /v1/holidays/leave-optimizer | Suggest annual-leave days to spend for the longest consecutive break |
GET /v1/business-days | Count business days between dates |
GET /v1/business-days/add | Add N business days to a date |
GET /v1/states | All 16 states + 3 FTs with weekend config |
GET /v1/states/resolve | Resolve alias (KL, penang, jb) to canonical code |
GET /v1/school/terms | School term dates + day counts |
GET /v1/school/holidays | School holidays + KPM cuti perayaan |
GET /v1/school/exams | SPM, STPM, MUET, PT3 schedule |
GET /v1/school/is-school-day | Is this a school day? |
GET /v1/feed/ical/:state | iCal subscription feed |
GET /v1/feed/csv/:state | CSV/spreadsheet export of holidays |
GET /v1/data/* | Raw, cacheable open-data snapshots โ manifest, states, holidays/:year, all (no API key required) |
GET /v1/prayer-times/:zone | JAKIM prayer times for a zone (MYT-formatted); GET /v1/prayer-times/zones lists the zone directory |
POST /v1/keys | Issue an API key (admin-gated for now; GET /v1/keys/whoami checks the caller's tier) |
See the full OpenAPI 3.1 spec for request/response schemas.
Connect the Malaysia Calendar API to Claude, ChatGPT, or any MCP-compatible AI assistant.
Add to your MCP configuration:
| Tool | Description |
|---|---|
get_malaysia_holidays | Get public holidays (filter by year, state, type) |
check_malaysia_holiday | Check if a date is a holiday or working day |
next_malaysia_holiday | Find the next upcoming holiday |
malaysia_business_days | Count working days between two dates |
malaysia_long_weekends | Find long weekends (3+ days) |
malaysia_leave_optimizer | Find the most efficient leave days to take to maximise consecutive days off |
list_malaysia_states | List all states with weekend config |
resolve_malaysia_state | Resolve alias (KL, JB) to canonical code |
malaysia_holiday_changes | Recent data changes |
malaysia_school_terms | School term dates and day counts |
malaysia_school_holidays | School holidays (cuti penggal, cuti perayaan) |
malaysia_exams | SPM, STPM, MUET, PT3 exam schedule |
malaysia_is_school_day | Check if a date is a school day |
| Code | Aliases | Group | Weekend |
|---|---|---|---|
johor | jhr, jb | B | Sat-Sun (was Fri-Sat 2014-2024) |
kedah | kd, kdh | A | Fri-Sat |
kelantan | kel, kb | A | Fri-Sat |
terengganu | trg, kt | A | Fri-Sat |
perak | prk, ipoh | B | Sat-Sun |
pulau-pinang | penang, pg | B | Sat-Sun |
selangor | sel, sgr | B | Sat-Sun |
negeri-sembilan | ns, n9 | B | Sat-Sun |
melaka | mlk, malacca | B | Sat-Sun |
pahang | phg, kuantan | B | Sat-Sun |
perlis | pls, kangar | B | Sat-Sun |
sabah | sbh, kk | B | Sat-Sun |
sarawak | swk, kuching | B | Sat-Sun |
kuala-lumpur | kl | B | Sat-Sun |
wp-putrajaya | putrajaya, pjy | B | Sat-Sun |
wp-labuan | labuan, lbn | B | Sat-Sun |
State aliases are case-insensitive. Use GET /v1/states/resolve?q=kl to resolve any alias to the canonical code.
All data is sourced from official Malaysian government publications:
| Source | Data | URL |
|---|---|---|
| JPM BKPP | Federal Gazette / Warta Kerajaan (public holidays) | kabinet.gov.my |
| JAKIM | Takwim Hijri-Miladi (Islamic calendar) | e-solat.gov.my |
| KPM | Kalendar Akademik / school calendar (Lampiran A/B/C) | moe.gov.my |
| MPM | STPM & MUET exam schedules | mpm.edu.my |
| State Portals | State-specific holidays (16 states) | *.gov.my |
Holiday data includes gazette references (e.g., P.U.(B) 305/2025) for traceability.
Two parts deploy independently:
First-time Pages setup:
mycal-web in the Cloudflare dashboard..github/workflows/deploy.yml) to push via wrangler pages deploy.CLOUDFLARE_API_TOKEN, CLOUDFLARE_ACCOUNT_ID.GitHub Actions handles:
main: build and deploy API to Workers + Web to Pages in parallelSee CONTRIBUTING.md for how to:
MIT
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/mycal)<a href="https://allmcps.com/mcp/mycal"><img src="https://allmcps.com/api/badge/mycal?style=directory" alt="Mycal on AllMCPs" /></a>