jp-calendar-mcp
MCP server for Japanese business days, public holidays, wareki dates, and tax arithmetic, helping AI agents avoid common Japanese date and tax errors.
README
jp-calendar-mcp
MCP server for Japanese business days, public holidays, the Tokyo Stock Exchange trading calendar, imperial-era (wareki) dates and tax arithmetic. Zero dependencies, runs on plain Node 18+.
AI agents get Japanese dates wrong in specific, repeatable ways: they miss 成人の日 landing on a Monday, they assume the stock exchange follows public holidays, they put the 平成→令和 boundary on the wrong day, and they invent furusato-nozei limits. These are lookup and arithmetic problems, not reasoning problems, so this server answers them exactly.
Tools
| Tool | What it answers |
|---|---|
jp_check_date |
Is this date a business day? Weekend? Public holiday? |
jp_shift_days |
"10 business days after 2026-01-09" (skips weekends + holidays) |
jp_count_days |
Calendar days and business days between two dates |
tse_is_trading_day |
Is the Tokyo Stock Exchange open? With the closure reason |
tse_shift_trading_days |
"T+2 settlement from 2025-12-30" → 2026-01-06, across the new-year break |
tse_count_trading_days |
Sessions between two dates (for annualising returns) |
tse_year_summary |
Sessions in a year plus its first/last session (大発会 / 大納会) |
jp_to_wareki |
2019-05-01 → 令和元年5月1日 (era boundaries handled to the day) |
jp_from_wareki |
昭和50年6月1日 → 1975-06-01, and flags out-of-era input |
jp_ideco_tax_saving |
Annual income + residence tax reduction from iDeCo contributions |
jp_furusato_limit |
Donation limit that keeps the out-of-pocket cost at ¥2,000 |
Public holidays are bundled for 2020–2031 (generated with the jpholiday library, including substitute holidays and the moving equinox dates). Dates outside that range return a note saying only weekends were excluded — the server never silently guesses.
The exchange calendar is not the holiday calendar
This trips up almost every implementation. TSE closures are a superset of public holidays: the exchange also closes 31 December through 3 January.
2026-01-02 public holiday? NO TSE open? NO (new_year_break)
2026-12-31 a normal work day TSE open? NO (year_end_break)
2026-12-30 a normal work day TSE open? YES (dainokai, last session)
Because of that break, the first and last session move every year, and a +1 business day calculation gives the wrong answer for settlement:
| Year | First session (大発会) | Last session (大納会) |
|---|---|---|
| 2024 | 2024-01-04 | 2024-12-30 |
| 2025 | 2025-01-06 | 2025-12-30 |
| 2026 | 2026-01-05 | 2026-12-30 |
All of the above are covered by the test suite as known-answer checks against actual sessions.
Install
git clone https://github.com/takeo628-hub/jp-calendar-mcp.git
cd jp-calendar-mcp
node test.js # 42 known-answer tests, no install step needed
Claude Code / Claude Desktop
{
"mcpServers": {
"jp-calendar": {
"command": "node",
"args": ["/absolute/path/to/jp-calendar-mcp/src/index.js"]
}
}
}
Examples
> 2026年1月9日から営業日で1日後は?
jp_shift_days(date="2026-01-09", days=1)
→ { "date": "2026-01-13", "weekday": "火", "mode": "business" }
(1/10-11 is a weekend and 1/12 is 成人の日)
> 平成31年4月30日を西暦で
jp_from_wareki(era="平成", era_year=31, month=4, day=30)
→ { "gregorian": "2019-04-30", "matches_era": true }
> 2025年最後の取引日から2営業日後(T+2受渡)
tse_shift_trading_days(date="2025-12-30", days=2)
→ { "date": "2026-01-06", "weekday": "火" }
(12/31-1/3 is the exchange break, so this is not "2 business days")
> 課税所得300万でiDeCo月2.3万の節税額
jp_ideco_tax_saving(monthly_contribution=23000, taxable_income=3000000)
→ { "annual_tax_saving": 55780, "income_tax_rate": 0.1 }
Also available as plain JavaScript
import { shiftDays, toWareki } from "jp-calendar-mcp";
shiftDays("2026-01-09", 1); // business days by default
Accuracy and limits
- Holiday and exchange data cover 2020–2031. Outside that window a
noteis returned rather than a guess. - The exchange calendar models scheduled closures only. Unscheduled halts (system failures, disasters) are historical events, not rules, and are not included.
- Tax tools implement the standard published formulas: iDeCo contributions are fully deductible (income tax including the 2.1% reconstruction surtax, plus 10% residence tax); the furusato limit uses the residence-tax income levy formula. Contribution caps and tax rules change, and individual circumstances vary — verify before acting. This is arithmetic, not tax advice.
- Invalid input raises an error rather than returning a plausible-looking wrong answer.
2026-02-30is rejected; an unknown era is rejected; a wareki date outside its era is returned with a warning.
Why it exists
Built by an autonomous AI development loop that publishes everything it does, including its failures: https://takeo628-hub.github.io/autoquant-lab/
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。