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は指定できません。日付を省略すると今日(日本時間)が起点になります。
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | 起点の日付(省略時は今日・日本時間) | |
| days | Yes | 営業日数。正の数=後の日付、負の数=前の日付(例: 5, -3) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description goes far beyond the readOnlyHint annotation by detailing the counting logic: weekends and holidays are excluded, the start date is excluded from the count, zero is an invalid input, and the default start date is today in Japan time. These are critical behavioral details that affect how the agent invokes and interprets the tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single well-structured passage that front-loads the core purpose and then lists the key rules in sequence. Every clause provides relevant information, with no filler or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simplicity of the tool (two parameters, no output schema), the description covers all essential aspects: the calculation rule, sign semantics, holiday handling, start-date exclusion, invalid days, and default date. It does not specify the return format, but that is implicitly a date string and not necessary given the context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already provides complete descriptions for both parameters (100% coverage), and the description largely restates them in prose. It adds one important non-schema constraint — that days cannot be zero — and clarifies that the start date itself is not counted, which provides marginal added value over the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it calculates the date N business days after or before a specified date, using a specific verb ('計算します') and resource (business days). The sign convention for days is explicit, and the behavior distinguishes it from sibling tools like jp_is_business_day or jp_business_days_between, even though it does not name them.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for when to use the tool (when you need to offset a date by business days) and includes important rules like excluding weekends/holidays and that the start date is not counted. However, it does not explicitly mention alternatives or when not to use it, so the agent must infer that from the sibling tool names.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
jp_business_days_between2日付間の営業日数ARead-only
開始日から終了日まで(両端を含む)の営業日数をカウントします。開始日は終了日以前である必要があります。
| Name | Required | Description | Default |
|---|---|---|---|
| end | Yes | 終了日(YYYY-MM-DD、開始日以降) | |
| start | Yes | 開始日(YYYY-MM-DD) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, so the safe-read nature is covered. The description adds meaningful behavior by specifying both endpoints are included and enforcing the start<=end constraint. It does not detail error handling or return type, but 'count' reasonably implies an integer.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, direct sentence that immediately states the core action and boundary conditions. There is no filler, and it is optimally front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple two-parameter read-only tool with full schema coverage and clear annotations, the description is complete. It conveys the inclusive date range, the ordering requirement, and that the result is a business-day count, so no output schema is necessary.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% and both parameters already have descriptions and format patterns (YYYY-MM-DD). The tool description adds no parameter-specific information beyond what the schema provides, so the baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb 'カウントします' (counts) with a clear resource: business days between start and end dates. It distinguishes itself from sibling tools like jp_is_business_day and jp_add_business_days by conveying a date-range counting operation, and it explicitly notes inclusive boundaries.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for use: it counts inclusive business days and states the precondition that the start date must be before or equal to the end date. It does not explicitly reference alternative sibling tools or when-not-to-use scenarios, but the operation is sufficiently well-defined.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
jp_calc_deadline期限からの逆算日を計算ARead-only
有効期限・締切日などの基準日から、指定した営業日数だけ前の「対応期限日」を計算します。「基準日のX営業日前までに提出・対応する」という管理(更新期限のリマインダー設定など)に使えます。土日・祝日は数えず、実際に動ける営業日ベースで逆算します。
| Name | Required | Description | Default |
|---|---|---|---|
| referenceDate | Yes | 基準日(有効期限・締切日など、YYYY-MM-DD) | |
| businessDaysBefore | Yes | 基準日の何営業日前までに対応するか(例: 10) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations declare readOnlyHint=true and openWorldHint=false, so the read-only nature is already known. The description adds valuable context beyond this: it explains that weekends and holidays are not counted ('土日・祝日は数えず') and that the calculation is based on actual business days for action, which provides deeper behavioral transparency without contradicting the annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is only two sentences, with the core action and output stated first, followed by a practical use case and the business-day behavior. Every sentence earns its place with no ifs, buts, or unnecessary filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple calculator with two parameters and no output schema, the description is quite complete: it explains the purpose, the use case, and the holiday-excluding behavior. The only minor gap is that it does not explicitly state the output format (e.g., YYYY-MM-DD), but given the tool's simplicity and the schema's date pattern, this is not a significant omission.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema covers both parameters with 100% description coverage, including formats and constraints. The description reinforces their meaning by specifying that businessDaysBefore is a count of business days before the referenceDate (e.g., '指定した営業日数だけ前'), and it gives an example usage. This adds a bit beyond the baseline for full schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states what the tool does: it calculates the 'action deadline date' that is a specified number of business days before a reference date. It uses a specific verb ('計算します') and resource ('基準日から...逆算'), and it distinguishes itself from sibling tools by emphasizing the backward counting direction, unlike add_business_days.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides a concrete use case: '「基準日のX営業日前までに提出・対応する」という管理(更新期限のリマインダー設定など)に使えます。' This clearly indicates when to use the tool. However, it does not explicitly mention when not to use it or contrast with sibling tools, so it lacks the explicit exclusion criteria for a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
jp_is_business_day営業日判定ARead-only
指定した日付が営業日(平日かつ祝日でない日)かどうかを判定します。土日・祝日の場合は、その理由(曜日名または祝日名)も返します。日付を省略すると今日(日本時間)を判定します。対応範囲: 2020〜2099年。
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | 判定したい日付(省略時は今日・日本時間) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Beyond the readOnlyHint annotation, the description discloses that it returns the reason (weekday or holiday name) for non-business days, defaults to Japan time when date is omitted, and supports 2020-2099. This gives useful behavioral context for callers.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, covering purpose, return reason, default, and supported range with no redundancy. It is front-loaded with the core function and efficiently structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple with one optional parameter and no output schema. The description explains the key behavior and return of reason, but does not specify the exact return data structure (e.g., boolean plus reason field). Nevertheless, it is adequate for its simplicity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already describes the 'date' parameter with its meaning and default behavior, and the description does not add any additional parameter details beyond what the schema provides. Therefore baseline of 3 applies given 100% schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool determines if a date is a business day (weekday and not a holiday), returns the reason for non-business days, and supports an optional date with default to today. It distinguishes from sibling tools like adding business days or calculating deadlines by its scoped function.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies its usage for checking business day status but does not explicitly mention when not to use it or name alternative tools. Agents can infer it based on the description, but there is no direct guidance on choosing between this and sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
4 tool updates
v1.0.0- First observed
jp_add_business_days - First observed
jp_business_days_between - First observed
jp_calc_deadline - First observed
jp_is_business_day
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.
Zero-signup business-day date-math API: add days, count days between dates, is-business-day.
Business-day, SLA, cron and recurrence calculations — offline, holiday-aware, no network.
Deterministic date arithmetic with auditable receipts: business days, due dates, holidays.
Related MCP Servers
- AlicenseAqualityBmaintenanceProvides correct trading day and settlement date calculations for multiple exchanges, with no external API calls.66MIT
- 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
- AlicenseAqualityCmaintenanceEnables AI assistants to perform Japanese business calendar calculations including holiday detection, business day arithmetic, payment date settlement, and deadline management using local data.6MIT
- AlicenseAqualityAmaintenanceProvides Japanese national holidays, wareki (era) conversion, and date information. Works fully offline with no API keys required.4MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/h-kazuki-pixel/jp-business-days-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server