jp-business-days MCP Server
This MCP server provides accurate Japanese business-day calculations, excluding weekends and national holidays, completely offline and without API keys. It covers dates from 2020 to 2099 and includes support for substitute holidays (振替休日), national holidays falling between weekdays (国民の休日), and special provisions for the 2020/2021 Olympics.
Check if a date is a business day (
jp_is_business_day): Determine whether a given date (or today, Japan time) is a business day. If not, returns the reason (weekend or holiday name).Calculate a date N business days away (
jp_add_business_days): Add or subtract up to ±250 business days from a given date (or today), skipping weekends and holidays. The starting date is not counted in the N.Count business days between two dates (
jp_business_days_between): Count the total business days between a start and end date, inclusive of both endpoints. Requires start ≤ end.Calculate a response deadline (
jp_calc_deadline): Reverse-calculate the date that is exactly N business days before a reference date, useful for setting action deadlines based on expiry or due dates.
All holidays are computed algorithmically, so no API calls or internet connection is needed.
jp-business-days MCP Server 📅✅
日本の営業日計算(土日・祝日を除く)を Claude に提供する MCP (Model Context Protocol) サーバーです。
An MCP server that gives Claude accurate Japanese business-day calculations (weekends and national holidays excluded). Works fully offline — no API keys required.
jp-series の第2弾です。第1弾の jp-dates-mcp-server(祝日・和暦)と組み合わせて使うと、より便利になります。
✨ できること / Features
Claude にこんな質問が正確に即答できるようになります:
「今日は営業日?」
「今日から5営業日後は何日?」
「今月と来月の間で、営業日は何日ある?」
「9月30日が期限の書類、10営業日前までに準備するなら、いつまでに動けばいい?」
ツール | 説明 |
| 指定日が営業日(平日かつ祝日でない)かどうかを判定 |
| 指定日からN営業日後・前の日付を計算 |
| 2つの日付の間(両端含む)の営業日数をカウント |
| 基準日(有効期限・締切日など)からN営業日前の「対応期限日」を逆算 |
✅ APIキー不要・完全オフライン(祝日はアルゴリズムで算出)
✅ 振替休日・国民の休日・2020/2021年の五輪特例に対応
✅ 対応範囲: 2020〜2099年
💡 jp_calc_deadline の使いどころ
許認可の更新、契約の更新、各種届出など、「期限のX営業日前までに提出・対応する」という管理が必要な場面で使えます。土日・祝日を挟んでも、実際に動ける営業日ベースで正確に逆算します。
Related MCP server: jp-business-calendar-mcp
🚀 セットアップ / Setup
1. インストール
git clone https://github.com/h-kazuki-pixel/jp-business-days-mcp-server.git
cd jp-business-days-mcp-server
npm install
npm run build2. Claude Desktop に登録
claude_desktop_config.json に以下を追加します。
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"jp-business-days": {
"command": "node",
"args": ["/absolute/path/to/jp-business-days-mcp-server/dist/index.js"]
}
}
}Claude Desktop を再起動すると、🔌アイコンからツールが確認できます。
3. 使ってみる
Claude にそのまま話しかけるだけです:
「今日から10営業日後はいつ?」 「8月31日が期限なら、10営業日前はいつまでに動けばいい?」
🧪 動作確認 / Testing
MCP Inspector で対話的にテストできます:
npx @modelcontextprotocol/inspector node dist/index.jsリポジトリ同梱の統合テスト(4つのツールをすべて実行して検証)も実行できます:
npm run build
node test/run_tests.mjs📝 営業日計算について / Notes
祝日は法律(国民の祝日に関する法律)のルールに基づきアルゴリズムで算出しています(jp-dates-mcp-serverと同じロジック)
「営業日」は「祝日でない平日(月〜金)」として計算しています。会社独自の休業日(夏季休業・年末年始休業など)は含まれません
将来の法改正には追従が必要です。誤りを見つけたら Issue で教えてください!
🤝 コントリビュート / Contributing
Issue・Pull Request 歓迎です!
📄 License
MIT
Available Tools
4 toolsjp_add_business_daysN営業日後/前の日付ARead-only
指定日からN営業日後(daysが正の数)、またはN営業日前(daysが負の数)の日付を計算します。土日・祝日はカウントしません。起点日自体はカウントに含みません。daysに0は指定できません。日付を省略すると今日(日本時間)が起点になります。
Inputs: days (required), date.
jp_business_days_between2日付間の営業日数ARead-only
開始日から終了日まで(両端を含む)の営業日数をカウントします。開始日は終了日以前である必要があります。
Inputs: end (required), start (required).
jp_calc_deadline期限からの逆算日を計算ARead-only
有効期限・締切日などの基準日から、指定した営業日数だけ前の「対応期限日」を計算します。「基準日のX営業日前までに提出・対応する」という管理(更新期限のリマインダー設定など)に使えます。土日・祝日は数えず、実際に動ける営業日ベースで逆算します。
Inputs: referenceDate (required), businessDaysBefore (required).
jp_is_business_day営業日判定ARead-only
指定した日付が営業日(平日かつ祝日でない日)かどうかを判定します。土日・祝日の場合は、その理由(曜日名または祝日名)も返します。日付を省略すると今日(日本時間)を判定します。対応範囲: 2020〜2099年。
Inputs: date.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a distinct primary purpose: checking a date, adding business days, counting between dates, and calculating deadlines. There is some overlap between jp_add_business_days with negative days and jp_calc_deadline, but the descriptions clearly frame the latter for deadline management, reducing misselection risk.
All tools share the jp_ prefix and mostly follow verb_noun patterns (is, add, calc). The exception is jp_business_days_between, which uses a noun-preposition-noun structure, and 'calc' is abbreviated while others are full words. Overall, the pattern is consistent enough to be predictable.
With 4 tools, the server is well-scoped for its narrow domain. Each tool addresses a specific, necessary operation (check, add, count, deadline) without unnecessary bloat or missing essentials.
The domain of Japanese business days is thoroughly covered: checking a date, adding/subtracting business days, counting between dates, and computing deadlines. No critical operations are missing; a holiday-listing tool would be nice but is not essential for common use cases.
Maintenance
Related MCP Connectors
Japanese holiday and business-day calculations using official Japan Cabinet Office data.
Japanese national holidays, business days and wareki (era) dates, exact not guessed. No API key.
Normalize and romanize Japanese addresses, look up postal codes, count Japanese business days.
Exact Japanese text & date tools: char count, business days with JP holidays, era, tax, units.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables Japanese business calendar operations such as holiday checking, business day calculations, payment date calculation, fiscal year determination, and deadline tracking, all locally without external API.MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to perform Japanese business calendar calculations including holiday detection, business day arithmetic, payment date settlement, and deadline management using local data.6MIT
- AlicenseAqualityCmaintenanceProvides Japanese national holidays, wareki (era) conversion, and date information. Works fully offline with no API keys required.4MIT
- AlicenseAqualityDmaintenanceProvides accurate Japanese business day utilities including holiday checks, settlement day calculations, and fiscal period determination, all with embedded holiday data from 2020-2030.7MIT