plainfold-calendars-mcp
OfficialClick on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@plainfold-calendars-mcp Is July 4, 2025 a NYSE trading day?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
plainfold-calendars-mcp
An MCP (Model Context Protocol) server that answers business-day questions for AI assistants: is a date a trading day, what is the next business day, how many business days between two dates, which holidays fall in a year, and what is the T+2 FX spot date of a currency pair. It runs on your machine over stdio, needs no network and no API key, and is MIT licensed.
It adds no calendar data of its own. It is a thin layer over three verified, dependency-free Plainfold packages, pinned to exact versions:
usbizdays1.0.1: US federal, NYSE and Federal Reserve calendars.exchange-trading-days0.1.1: 9 stock exchanges, with early closes.fx-spot-dates0.1.1: settlement calendars for 6 currencies and T+2 spot dates.
Install
pip install plainfold-calendars-mcp
# or run it without installing:
uvx plainfold-calendars-mcpPython 3.10 or newer. The server speaks stdio; the console script is plainfold-calendars-mcp (also python -m plainfold_calendars_mcp).
Claude Code
claude mcp add plainfold-calendars -- uvx plainfold-calendars-mcpClaude Desktop
Add this to claude_desktop_config.json:
{
"mcpServers": {
"plainfold-calendars": {
"command": "uvx",
"args": ["plainfold-calendars-mcp"]
}
}
}Any other MCP client
Run uvx plainfold-calendars-mcp (or plainfold-calendars-mcp after pip install) as a stdio server. The config shape is the same as above: command plus args.
Related MCP server: marketcal
Calendar ids
One scheme, case-insensitive:
Id | What | Covered years |
| US federal holidays (5 U.S.C. 6103), observed dates | 1971-2050 |
| NYSE trading days incl. early closes and past unscheduled closures (rule-based) | 2000-2050 |
| Federal Reserve Banks (Saturday holidays are not moved) | 2000-2050 |
| NYSE, London, Toronto, Xetra, Euronext Paris, Tokyo, Hong Kong, ASX, SIX Swiss (ISO 10383 MIC) | 2026-2028 |
| Settlement business days (Fedwire, TARGET2, England and Wales, Japan, New Zealand) | 2026-2028 |
| New South Wales bank holidays | 2028 only (2026 and 2027 are withheld because the sources disagree on one day each) |
nyse and XNYS are two independent NYSE calendars; use nyse outside 2026-2028. list_calendars returns the live list.
Outside the covered years the tools return an error, never a guess. The error states the covered years and points to the full 2000-2050 data (https://plainfoldhq.github.io/business-days/, /stock-market-holidays/ or /fx-settlement-holidays/).
Tools
All dates are ISO YYYY-MM-DD. Results are plain JSON.
Tool | Arguments | Returns |
| none | every id with name and covered years |
|
|
|
|
|
|
|
|
|
|
| first business day strictly after |
|
| last business day strictly before |
|
|
|
|
|
|
Counting conventions
These follow the underlying packages and each result repeats its own convention:
add_business_days: the start date is never counted.n = 0returns the date if it is a business day, otherwise the next one. For currencies withn < 0the server steps back one business day at a time (the fx package only moves forward).business_days_betweenonus-federal,nyse,fedand currencies: start included, end excluded (start <= d < end); if end is before start the result is minus the count forend <= d < start.business_days_betweenon exchanges (MICs): both ends included (start <= d <= end), and 0 if start is after end. This is howexchange-trading-dayscounts, and it differs from the US calendars on purpose.FX spot (T+2): for pairs with USD, day 1 is the next business day of the non-USD currency and day 2 the next day that is a business day in both. For crosses: two business days of both currencies, then forward to the first day that is also a USD business day. Some banks use other rules; confirm with your counterparty.
How it was checked
The test suite (pytest) drives the real server through the MCP SDK client (in memory and over stdio) and checks every tool, every error path and the coverage errors. It also compares answers with implementations that share no code or data with the packages:
US calendars, 2000-2050 (federal from 1971): every day against the
holidayspackage (US,XNYS,XFED), plus randomadd_business_daysandbusiness_days_betweencases against NumPybusday_offset/busday_count.Exchanges, 2026-2028: every day and thousands of random cases against
exchange_calendarssessions, closing times and early closes. One known difference is pinned in the tests: when Dec 24 or Dec 31 falls on a weekend,exchange_calendarsmoves ASX's 14:10 early close to the Friday before (2028-12-22 and 2028-12-29);exchange-trading-dayskeeps normal hours on those Fridays, following ASX's 2022 notice that normal hours apply from 2022 on. Check the ASX notice for those dates.Currencies, 2026-2028: every day against the
holidayspackage and QuantLib, and random add, count and spot-date cases against QuantLib calendars.
The independent checks need Python 3.11 or newer; on 3.10 they are skipped and the server tests still run. Test dependencies are pinned in requirements-test.txt.
Full data (paid)
The server covers what the free packages cover. The full 2000-2050 datasets, as CSV, JSON, SQLite and .ics files, are sold separately. Polar is the merchant of record.
World stock exchange holidays and trading hours, 24 exchanges 2000-2050 ($15)
Currency settlement holidays and FX spot dates 2000-2050 ($19)
Limits
Not financial or legal advice. Exchanges can add unscheduled closures and change hours, and future dates follow standing rules. Check the exchange or central bank notice before trading or settlement use. The server never touches the network.
Not affiliated with Anthropic or the MCP project. Plainfold is an AI-run business; this package was written and tested by AI agents.
License
MIT, Copyright (c) 2026 Plainfold. Issues: https://github.com/plainfoldhq/plainfold-calendars-mcp/issues
Available Tools
8 toolsadd_business_daysBRead-onlyIdempotent
Move date forward (n > 0) or back (n < 0) by n business days (|n| <= 10000). The start date is not counted; n = 0 rolls a non-business day forward.
Inputs: n (required), date (required), calendar (required). Returns: object
business_days_betweenBRead-onlyIdempotent
Count business days between two dates. Counting convention differs by calendar and is stated in the result (US calendars and currencies: start included, end excluded; exchanges: both included).
Inputs: end (required), start (required), calendar (required). Returns: object
fx_spot_dateBRead-onlyIdempotent
T+2 spot value date for a currency pair such as EURUSD or USD/JPY (USD, EUR, GBP, JPY, AUD, NZD) and a weekday trade date (YYYY-MM-DD). The result states the convention.
Inputs: pair (required), trade_date (required). Returns: object
holidaysARead-onlyIdempotent
List the weekday holidays of calendar in year as {date, name}, plus early closes for NYSE and exchanges.
Inputs: year (required), calendar (required). Returns: object
is_business_dayARead-onlyIdempotent
Is date (YYYY-MM-DD) a business/trading day on calendar? Returns the holiday name if closed and the early-close time (HH:MM) for NYSE and exchanges.
Inputs: date (required), calendar (required). Returns: object
list_calendarsARead-onlyIdempotent
List every calendar id with its name and covered years: us-federal, nyse, fed, 9 exchange MICs (XNYS, XLON, ...) and 6 currencies (USD, EUR, ...).
Inputs: no named parameters. Returns: object
next_business_dayBRead-onlyIdempotent
The first business day strictly after date (YYYY-MM-DD) on calendar.
Inputs: date (required), calendar (required). Returns: object
previous_business_dayBRead-onlyIdempotent
The last business day strictly before date (YYYY-MM-DD) on calendar.
Inputs: date (required), calendar (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Most tools target clearly distinct operations: directional helpers (previous/next_business_day), range math (add_business_days, business_days_between), lookups (is_business_day, holidays, list_calendars), and the specialized fx_spot_date. The only mild overlap is that add_business_days with n=±1 approximates next/previous_business_day, and both counting tools involve date arithmetic, but the descriptions make the boundaries readable.
All names are snake_case and readable, with a largely predictable verb/noun shape (list_calendars, add_business_days, is_business_day, business_days_between). Minor deviations: `holidays` is a bare noun with no verb prefix (cf. list_holidays), and fx_spot_date is noun-only, but overall style is coherent.
Eight tools is well within the ideal range and each one earns its place covering a distinct piece of calendar/business-day logic. There is no obvious redundancy or filler.
The surface covers checks, forward/backward rolls, counting, holiday enumeration, calendar discovery, and FX spot dating, so core workflows are closed. Gaps: no date-rolling convention tool (following / modified following / preceding), no business-day sequence generation, and settlement conventions are limited to T+2 spot.
Maintenance
Related MCP Connectors
Business days, holidays and settlement dates for ACH, TARGET2, Bacs, 28 exchanges and 247 countries
Business-day, SLA, cron and recurrence calculations — offline, holiday-aware, no network.
NYSE, Federal Reserve, TARGET2 and UK business days, holidays and T+N settlement dates.
US federal holidays, business-day maths, invoice due dates and IRS deadlines.
Related MCP Servers
- AlicenseAqualityCmaintenanceProvides deterministic business-day calculations for AI agents, correctly handling country-specific weekends and public holidays.665 npm1Apache 2.0
- AlicenseAqualityCmaintenanceProvides correct trading day and settlement date calculations for multiple exchanges, with no external API calls.67 npmMIT
- 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
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to calculate business days and public holidays for 29 countries, including adding business days, counting business days between dates, checking whether a date is a business day, and listing holidays and supported countries.MIT