Skip to main content
Glama
belzorash

marketcal

by belzorash

marketcal

An MCP server that gives AI agents correct trading-day and settlement math. LLMs are unreliable at "is the market open today?" and "what's the T+1 settlement date?" — this gets it exactly right, with no API key and no external calls.

Tool

Does

is_trading_day

Is a date a trading day? (weekend/holiday aware, with reason)

next_trading_day / previous_trading_day

Nearest trading day after/before a date

settlement_date

T+N settlement date (advance N trading days; T+1 is the modern default)

trading_days_between

Count trading days in an inclusive date range

market_holidays

List an exchange's holidays for a given year

Exchanges: NYSE, NASDAQ (US), LSE (London), XETRA (Frankfurt), GENERIC (weekends only).

Why it's correct

Holidays are computed from each exchange's rules — nth-weekday-of-month, Good Friday via the Gregorian Easter algorithm, and the exchange's weekend-observation rules (e.g. US: Saturday → Friday, Sunday → Monday; UK substitute days; XETRA closes Christmas Eve & New Year's Eve). No hardcoded date tables to rot — it stays right for any year.

Related MCP server: JayOfemi/shikamaru

Use it

npm install && npm run build && npm start
# or: npm run dev   (no build step)
npm run inspect      # try the tools in the MCP Inspector

Connect to Claude Desktop / Cursor:

{
  "mcpServers": {
    "marketcal": {
      "command": "npx",
      "args": ["-y", "mcp-marketcal"]
    }
  }
}

Then ask: "Using marketcal, what's the T+1 settlement date for a trade on 2026-07-02 on NYSE?"2026-07-06 (July 3 is the observed Independence Day holiday, July 4–5 is the weekend).

Notes & scope

  • Covers full-day market closures. Early-close (half) days are not modelled in v0.1.

  • All dates are calendar dates in YYYY-MM-DD (UTC), no intraday/timezone logic.

  • settlement_date advances trading days (the standard settlement convention).

  • Roadmap: more exchanges (TSX, Euronext, JPX, HKEX), early-close days, and a hosted HTTP + usage-billed tier (x402 / Stripe) for high-volume agents.

License

MIT

Available Tools

6 tools
is_trading_dayIs a date a trading day?A

Return whether a given date is a trading day on an exchange (i.e. not a weekend and not an exchange holiday).

ParametersJSON Schema
NameRequiredDescriptionDefault
dateYesDate in YYYY-MM-DD format
exchangeNoExchange calendar to use (default NYSE). NASDAQ shares the NYSE calendar.NYSE

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must fully disclose behavior. It explains the tool checks weekends and holidays but lacks details on error handling, time zones, or exact holiday calendars. Basic transparency is present but could be more thorough.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with no unnecessary words. It efficiently conveys the tool's purpose and criteria.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the absence of an output schema, the description adequately implies a boolean return. It covers the essential aspects (weekends and holidays) and references exchange calendars, though could specify behavior for each exchange beyond the schema note.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds minimal parameter-level detail beyond the schema (e.g., date format and exchange options are already documented). It provides context about trading day definition but not parameter-specific semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool returns whether a given date is a trading day on an exchange, specifying that it checks for weekends and exchange holidays. This distinguishes it from sibling tools like next_trading_day and market_holidays.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for a simple boolean check but does not explicitly state when to use this tool versus siblings. No alternatives or when-not-to-use scenarios are mentioned, though context makes it somewhat clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

market_holidaysMarket holidays for a yearA

List the exchange holidays (YYYY-MM-DD) for a given calendar year.

ParametersJSON Schema
NameRequiredDescriptionDefault
yearYesCalendar year, e.g. 2026
exchangeNoExchange calendar to use (default NYSE). NASDAQ shares the NYSE calendar.NYSE

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must suffice. It indicates a read operation ('List') but does not explicitly state it is non-destructive or clarify edge cases (e.g., weekends, future years). Basic transparency for a simple list tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One sentence of 12 words, front-loading the purpose. No redundant information. Excellent conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers the main purpose and output format. Lacks explicit mention of return type (array) and whether holidays include names, but for a simple list tool with well-documented schema, it is reasonably complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters. The description adds minimal value beyond restating 'given calendar year', which matches the 'year' parameter. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'List' and the resource 'exchange holidays' with output format 'YYYY-MM-DD' and context 'for a given calendar year'. It distinguishes from siblings like 'is_trading_day' which checks individual dates.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies use when needing a list of holidays for a year, but does not explicitly state when to use it over alternatives (e.g., 'is_trading_day') or provide exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

next_trading_dayNext trading dayA

Return the next trading day strictly after the given date on an exchange.

ParametersJSON Schema
NameRequiredDescriptionDefault
dateYesDate in YYYY-MM-DD format
exchangeNoExchange calendar to use (default NYSE). NASDAQ shares the NYSE calendar.NYSE

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It discloses 'strictly after' which clarifies behavior regarding the given date, but lacks details on permissions, rate limits, or edge cases.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence with no unnecessary words. Highly concise and front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, so description should indicate return format. It does not specify whether the result is a string date or object. Exchange default is not mentioned.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% so baseline is 3. The description adds value by clarifying that NASDAQ shares the NYSE calendar, which is not obvious from the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly specifies the verb 'Return', the resource 'next trading day', and the scope 'strictly after the given date on an exchange'. It effectively distinguishes the tool from siblings like 'previous_trading_day' and 'is_trading_day'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when needing the next trading day but provides no explicit guidance on when to use versus alternatives or when not to use. Sibling tools are listed but not differentiated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

previous_trading_dayPrevious trading dayB

Return the most recent trading day strictly before the given date on an exchange.

ParametersJSON Schema
NameRequiredDescriptionDefault
dateYesDate in YYYY-MM-DD format
exchangeNoExchange calendar to use (default NYSE). NASDAQ shares the NYSE calendar.NYSE

TDQS

B3.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must fully disclose behavior. It lacks details about handling of weekends/holidays, return format, error cases, or timezone considerations. The mention of 'on an exchange' hints at calendar rules but is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence of 13 words, concise and front-loaded. It could be slightly expanded to cover behavioral details without being verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity and full schema coverage, the description is adequate but lacks details on return format, error handling, and edge cases. The absence of an output schema increases the need for such information.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with descriptions for both parameters (date format and exchange enum). The description adds no additional meaning beyond the schema, meeting the baseline of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool returns the most recent trading day strictly before a given date on an exchange, using specific verb 'Return' and resource 'trading day'. It distinguishes from sibling tools like next_trading_day and is_trading_day.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage (finding previous trading day for a date and exchange) but does not explicitly provide when-not-to-use guidance or mention alternative tools. It relies on sibling names for context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

settlement_dateSettlement date (T+N)A

Compute the settlement date by advancing N trading days from a trade date (e.g. days=1 for T+1, the modern equities default). Skips weekends and exchange holidays.

ParametersJSON Schema
NameRequiredDescriptionDefault
dateYesTrade date (YYYY-MM-DD)
daysNoNumber of trading days to settle (T+N). Default 1.
exchangeNoExchange calendar to use (default NYSE). NASDAQ shares the NYSE calendar.NYSE

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It discloses skipping weekends and exchange holidays but omits details like what happens if the trade date is a non-trading day, or the return format. It also doesn't mention the output type.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the core operation, includes an example, and no fluff. Every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, the description should clarify the return value (likely a date string). It also lacks error handling or edge-case behavior (e.g., days=0). However, for a simple computation, it covers major points adequately.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% (baseline 3). The description adds value by explaining the 'days' default (1 for T+1, modern equities default) and noting that NASDAQ shares NYSE calendar, which is beyond the schema's enum descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the specific verb 'compute' and resource 'settlement date' with clear semantics (advancing N trading days). It distinguishes itself from siblings like 'next_trading_day' by focusing on settlement calculation rather than just next trading day, and provides an example (T+1).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for settlement date calculation but provides no explicit guidance on when to use this tool versus siblings like 'next_trading_day' or 'trading_days_between'. It does not mention exclusions or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

trading_days_betweenCount trading days between two datesB

Count the trading days in the inclusive range [start, end] on an exchange.

ParametersJSON Schema
NameRequiredDescriptionDefault
endYes
startYesDate in YYYY-MM-DD format
exchangeNoExchange calendar to use (default NYSE). NASDAQ shares the NYSE calendar.NYSE

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden. It mentions inclusive range and exchange but does not disclose behavioral traits like return type, handling of invalid dates (e.g., start > end), or whether weekends are excluded. This is insufficient for a tool that modifies no state.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence with no redundant information. It is front-loaded and efficiently communicates the core functionality.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, the description should mention the return value type (presumably an integer). It also lacks details on edge cases and error handling. For a simple counting tool, it is moderately complete but has gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 67% (start and exchange have descriptions, end does not). The description adds that the range is inclusive and that exchange specifies the calendar, partially compensating for missing 'end' description. However, it does not provide extra meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'count' and the resource 'trading days in the inclusive range [start, end] on an exchange.' It distinguishes from sibling tools like 'is_trading_day' and 'next_trading_day' by focusing on counting days between dates.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool versus alternatives. No explicit 'when', 'when-not', or references to sibling tools are provided.

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.

  1. 6 tool updatesv0.1.0
    • First observedis_trading_day
    • First observedmarket_holidays
    • First observednext_trading_day
    • First observedprevious_trading_day
    • First observedsettlement_date
    • First observedtrading_days_between

TDQS

A3.9/5.0

Scored across 6 tools

Disambiguation5/5

Each tool has a unique purpose: checking a date, finding next/previous trading days, computing settlement, counting days, and listing holidays. No overlap.

Naming Consistency4/5

Most tools use verb_noun pattern (is_trading_day, next_trading_day, etc.), but 'settlement_date' and 'trading_days_between' break the pattern slightly, making it mostly consistent.

Tool Count5/5

With 6 tools covering essential trading calendar operations, the set is well-scoped without unnecessary bloat or deficiency.

Completeness5/5

The tool set covers all core trading day calculations: checking, finding adjacent days, settlement, counting days, and holiday listing. No obvious gaps.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    MCP server for business-day arithmetic with country-aware holiday calendars. It offers tools to check, calculate, and list business days and holidays for over 60 countries.
    9
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Deterministic day-count and accrued-interest engine. Six ISDA/ICMA conventions, proven exact against QuantLib over 3,600 date pairs. Stops the AI guessing your interest math.
    3
    58 npm
    1
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Provides deterministic business-day calculations for AI agents, correctly handling country-specific weekends and public holidays.
    6
    28 npm
    1
    Apache 2.0
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables 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