@catlabtech/mycal-mcp-server 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +103 -0
- package/package.json +3 -3
package/README.md
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# @catlabtech/mycal-mcp-server
|
|
2
|
+
|
|
3
|
+
MCP (Model Context Protocol) server exposing the **Malaysia Calendar API** as 12 ready-to-use tools for Claude, ChatGPT, and other AI agents.
|
|
4
|
+
|
|
5
|
+
> Data sourced from the official Malaysian government gazette (JPM BKPP), JAKIM, KPM, and MPM.
|
|
6
|
+
|
|
7
|
+
## Why
|
|
8
|
+
|
|
9
|
+
LLMs are notoriously bad at Malaysia-specific calendar questions:
|
|
10
|
+
|
|
11
|
+
- They get Islamic holidays wrong (incorrect Hijri → Gregorian mapping)
|
|
12
|
+
- They don't know about cuti peristiwa announced after their training cutoff
|
|
13
|
+
- They confuse state-specific vs federal holidays
|
|
14
|
+
- They default to Sat–Sun weekends — wrong for Kedah, Kelantan, Terengganu (Fri–Sat)
|
|
15
|
+
|
|
16
|
+
Drop this MCP server into your AI client and all those questions get answered from the live gazette-backed API instead of hallucinated.
|
|
17
|
+
|
|
18
|
+
## Setup with Claude Desktop
|
|
19
|
+
|
|
20
|
+
Edit your Claude Desktop config:
|
|
21
|
+
|
|
22
|
+
- **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
23
|
+
- **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
|
|
24
|
+
- **Linux:** `~/.config/Claude/claude_desktop_config.json`
|
|
25
|
+
|
|
26
|
+
Add (or merge into the existing `mcpServers` block):
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"mcpServers": {
|
|
31
|
+
"malaysia-calendar": {
|
|
32
|
+
"command": "npx",
|
|
33
|
+
"args": ["-y", "@catlabtech/mycal-mcp-server"]
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Completely quit Claude Desktop and reopen. Test with:
|
|
40
|
+
|
|
41
|
+
> *"Is March 21, 2026 a public holiday in Selangor?"*
|
|
42
|
+
> *"What are the long weekends for KL in 2026?"*
|
|
43
|
+
|
|
44
|
+
## Setup with Claude Code
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
claude mcp add malaysia-calendar --scope user -- npx -y @catlabtech/mycal-mcp-server
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Or commit to your repo's `.mcp.json` for team-wide setup. Verify with `/mcp` in a Claude Code session.
|
|
51
|
+
|
|
52
|
+
## Available tools (12)
|
|
53
|
+
|
|
54
|
+
| Tool | What it does |
|
|
55
|
+
|------|-------------|
|
|
56
|
+
| `get_malaysia_holidays` | List holidays (filter by year, state, type, status, month) |
|
|
57
|
+
| `check_malaysia_holiday` | Is this date a holiday, weekend, working day, or school day? |
|
|
58
|
+
| `next_malaysia_holiday` | Next N upcoming holidays |
|
|
59
|
+
| `malaysia_business_days` | Count working days in range, or add N business days to a date |
|
|
60
|
+
| `malaysia_long_weekends` | All 3+ day non-working stretches in the year |
|
|
61
|
+
| `list_malaysia_states` | 16 states + 3 FTs with weekend config |
|
|
62
|
+
| `resolve_malaysia_state` | Alias (`kl`, `jb`, `n9`) → canonical code |
|
|
63
|
+
| `malaysia_holiday_changes` | Recent additions / changes — useful for cuti peristiwa tracking |
|
|
64
|
+
| `malaysia_school_terms` | KPM school term dates + school-day counts |
|
|
65
|
+
| `malaysia_school_holidays` | Cuti penggal, pertengahan, akhir, perayaan |
|
|
66
|
+
| `malaysia_exams` | SPM, STPM, MUET, PT3 schedules |
|
|
67
|
+
| `malaysia_is_school_day` | Is this date a school day for this state/group? |
|
|
68
|
+
|
|
69
|
+
## How it works
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
Your AI client MyCal MCP server Calendar API
|
|
73
|
+
(Claude, etc.) ──────▶ (local npx process) ────▶ (Cloudflare Workers)
|
|
74
|
+
stdio JSON-RPC HTTPS
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
The server runs locally via `npx`. It speaks MCP over stdio on one side and HTTPS to the API on the other. Nothing to host yourself. No API key needed.
|
|
78
|
+
|
|
79
|
+
## Troubleshooting
|
|
80
|
+
|
|
81
|
+
**"Command not found: npx"** — install Node 18+ from [nodejs.org](https://nodejs.org/).
|
|
82
|
+
|
|
83
|
+
**"Server disconnected" / MCP not responding** — check `node -v` is ≥ 18. Older Node versions lack ESM/fetch features the server needs.
|
|
84
|
+
|
|
85
|
+
**First call is slow** — `npx` downloads the package on first use. Subsequent calls are fast.
|
|
86
|
+
|
|
87
|
+
**Corporate network blocked** — the server needs outbound HTTPS to `mycal-api.huijun00100101.workers.dev`.
|
|
88
|
+
|
|
89
|
+
## Documentation
|
|
90
|
+
|
|
91
|
+
- **Full guide:** [https://mycal-web.pages.dev/docs/mcp-server/what-is-mcp](https://mycal-web.pages.dev/docs/mcp-server/what-is-mcp)
|
|
92
|
+
- **Tool reference:** [https://mycal-web.pages.dev/docs/mcp-server/tools](https://mycal-web.pages.dev/docs/mcp-server/tools)
|
|
93
|
+
|
|
94
|
+
## Related packages
|
|
95
|
+
|
|
96
|
+
- **[`@catlabtech/mycal-sdk`](https://www.npmjs.com/package/@catlabtech/mycal-sdk)** — TypeScript client SDK for direct REST usage
|
|
97
|
+
- **[`@catlabtech/mycal-core`](https://www.npmjs.com/package/@catlabtech/mycal-core)** — shared types and schemas
|
|
98
|
+
|
|
99
|
+
## License
|
|
100
|
+
|
|
101
|
+
MIT — © catlab.tech
|
|
102
|
+
|
|
103
|
+
Issues and contributions: [github.com/Junhui20/malaysia-calendar-api](https://github.com/Junhui20/malaysia-calendar-api)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@catlabtech/mycal-mcp-server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "MCP (Model Context Protocol) server exposing the Malaysia Calendar API as 12 tools for Claude, ChatGPT, and other AI agents",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"malaysia",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"url": "git+https://github.com/Junhui20/malaysia-calendar-api.git",
|
|
18
18
|
"directory": "packages/mcp-server"
|
|
19
19
|
},
|
|
20
|
-
"homepage": "https://mycal.pages.dev/docs/mcp-server/what-is-mcp/",
|
|
20
|
+
"homepage": "https://mycal-web.pages.dev/docs/mcp-server/what-is-mcp/",
|
|
21
21
|
"bugs": "https://github.com/Junhui20/malaysia-calendar-api/issues",
|
|
22
22
|
"type": "module",
|
|
23
23
|
"bin": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@modelcontextprotocol/sdk": "^1.12.0",
|
|
37
37
|
"zod": "^3.25.76",
|
|
38
|
-
"@catlabtech/mycal-core": "0.1.
|
|
38
|
+
"@catlabtech/mycal-core": "0.1.1"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/node": "^25.5.0",
|