Skip to main content
Glama
Taghvim

Taghvim

Taghvim

Deterministic temporal reasoning engine for AI agents.

LLMs are surprisingly bad at dates, timezones, business days, holidays, and recurring schedules. Taghvim gives agents deterministic temporal primitives they can call instead of guessing.

npx taghvim-mcp

Why Taghvim

When a user asks an agent to "schedule the report for the last business day of next month at 9 AM London time", the agent needs to:

  1. Resolve "next month" → deterministic date range

  2. Find the last business day → skip weekends + holidays

  3. Attach "9 AM London" → timezone-aware timestamp

  4. Return a structured result, not a guess

Taghvim provides the tools that make this possible.

Related MCP server: Chrono MCP

Install

npm install taghvim-mcp

Or run directly:

npx taghvim-mcp

MCP Configuration

Claude Desktop / Claude Code

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

Or with a local installation:

{
  "mcpServers": {
    "taghvim": {
      "command": "node",
      "args": ["/absolute/path/to/taghvim/dist/index.js"]
    }
  }
}

Tools

now

Return the current deterministic time. Never let the LLM guess the current date.

Parameters: timezone (IANA), calendar (gregorian|persian|iso-week)
Returns: UTC, local, date, time, weekday, UTC offset, DST status

resolve_time

Resolve natural-language date/time expressions into ISO timestamps.

Expression examples:
  "tomorrow at 3pm"
  "next Friday"
  "in 3 weeks"
  "January 15, 2027"
  "the first Monday of next month"

calculate_date

Deterministic date arithmetic with correct month-end and leap-year handling.

Operations: add, subtract, diff, start_of, end_of, next_weekday, previous_weekday

Examples:
  2026-01-31 + 1 month → 2026-02-28 (handled correctly)
  start_of month for 2026-09-04 → 2026-09-01

convert_time

Convert datetimes between IANA timezones with DST correctness.

Parameters: datetime, from_timezone, to_timezone (string or array)
Convert to multiple targets at once.
Never hardcodes UTC offsets.

timezone_info

Deterministic timezone metadata: UTC offset, DST status, abbreviation, and next/previous DST transitions.

business_days

Business-calendar calculations with configurable weekends and holidays by country.

Operations: is_business_day, next, previous, add, count, last_of_month, range

Supported countries: US, UK, DE, JP, IR, UAE, and 100+ more.
Weekend definitions: Sat-Sun (US/UK), Fri-Sat (Iran/Saudi), Sun-Mon (Maldives).

holidays

Public holiday intelligence for 100+ countries.

Operations: list, is_holiday, next, between, countries

Distinguishes between actual and observed holiday dates.

recurrence

RFC 5545 RRULE recurrence with natural-language parsing.

Natural language patterns:
  "every Monday"
  "every weekday"
  "first Friday of every month"
  "every 90 days"

Always generates bounded results. Never produces infinite recurrences.

calendar

Calendar-system operations: Gregorian ↔ Persian/Jalali, date validation, weekday, month info, month calendar generation.

format_time

Deterministic formatting: ISO 8601, RFC 3339, locale-aware, Jalali, human-readable.

Locales supported: en-US, en-GB, de-DE, fr-FR, ja-JP, fa-IR, ar, es-ES, and any valid BCP 47 locale.

temporal_verify

Verify temporal claims deterministically to prevent hallucinations.

Claims:
  "Is 2026-12-31 a Thursday?"
  "Is 2024 a leap year?"
  "Are 2026-01-01 and 2026-01-01 the same?"

jalali_persian

Persian/Jalali calendar operations: convert dates, look up events, get month overviews, calculate days until Jalali dates.

Architecture

LLM / Agent
      │
      │ natural language
      ▼
Taghvim MCP
      │
      ├── resolve / parse
      │
      ▼
Canonical temporal representation (ISO 8601 + IANA TZ)
      │
      ▼
Deterministic temporal engine
      │
      ▼
Structured JSON result

Standards Used

  • ISO 8601 / RFC 3339 — datetime representation

  • IANA Timezone Database — timezone identifiers via Luxon

  • RFC 5545 / iCalendar RRULE — recurrence rules via rrule library

  • BCP 47 — locale identifiers

Core Dependencies

Library

Purpose

License

luxon

Timezone-aware date/time

MIT

rrule

RFC 5545 recurrence

MIT

chrono-node

Natural language date parsing

MIT

date-holidays

Holiday data for 100+ countries

MIT

jalali-moment

Persian/Jalali calendar

MIT

@modelcontextprotocol/sdk

MCP server

MIT

Development

npm install
npm run build      # compile TypeScript
npm test           # run test suite
npm run lint       # type-check without emit
npm run dev        # watch mode

Testing

npm test

70 tests covering:

  • Date arithmetic (leap years, month boundaries, DST transitions)

  • Timezone conversion (UTC, DST zones, non-DST zones, half-hour offsets)

  • Business days (US, UK, Iran, Japan weekends; holiday interactions)

  • Holidays (multiple countries, observed dates)

  • Recurrence (weekly, monthly, yearly, DST-crossing)

  • Calendar systems (Gregorian ↔ Persian round-trips)

  • Natural language parsing

  • Input validation

  • Invariant/property tests

License

MIT

Available Tools

12 tools
business_daysA

Business-day calculations: check if a date is a business day, find next/previous business day, add business days, count business days between dates. Supports configurable weekends and public holidays by country (US, UK, DE, JP, IR, UAE, etc.). Does NOT assume Saturday/Sunday weekend globally.

Inputs: operation (required), date, year, count, +4 more.

calculate_dateA

Perform deterministic date arithmetic: add/subtract units, snap to day/week/month/quarter/year boundaries, or compute differences between dates. Handles leap years and month-end edge cases correctly. Example: 2026-01-31 + 1 month → 2026-02-28.

Inputs: date (required), operation (required), unit, value, +5 more.

calendarC

Calendar system operations: convert between Gregorian, Persian/Jalali, and ISO week calendars. Validate dates, get weekday information, generate month calendars. Persian/Jalali is a first-class supported calendar.

Inputs: operation (required), date, year, month, +2 more.

convert_timeA

Convert a datetime between IANA timezones. Correctly handles DST transitions and date-boundary changes. Never hardcodes UTC offsets. Use IANA timezone names (e.g. 'America/New_York', 'Asia/Tokyo'). Can convert to multiple timezones at once.

Inputs: datetime (required), to_timezone (required), from_timezone (required).

format_timeB

Deterministically format a datetime string. Supports ISO 8601, RFC 3339, locale-aware formats (en-US, de-DE, ja-JP, fa-IR, etc.), Jalali, human-readable, and custom Luxon format strings. Use Intl.DateTimeFormat for locale-specific output.

Inputs: format (required), datetime (required), locale, calendar, +1 more.

holidaysA

Public holiday intelligence: list all holidays for a country and year, check if a specific date is a holiday, find the next upcoming holiday, or get holidays in a date range. Supports 100+ countries via the IATA holiday database. Distinguishes between actual and observed holiday dates.

Inputs: operation (required), date, year, region, +3 more.

jalali_persianA

Persian/Jalali calendar operations: convert dates, look up events, get month overviews, calculate days until Jalali dates. This is a convenience wrapper for Jalali-specific functionality. For universal calendar operations, use the 'calendar' tool instead.

Inputs: operation (required), to, date, from, +3 more.

nowA

Return the current deterministic time. Do NOT let the LLM infer the current date/time — call this tool instead. Returns UTC and local time, weekday, UTC offset, and DST status.

Inputs: calendar, timezone.

recurrenceA

Generate recurring date schedules using RFC 5545 RRULE. Supports natural language patterns ('every Monday', 'first Friday of every month', 'every 90 days') converted deterministically to RRULE where possible. Always generates bounded results within a date range. Never generates infinite recurrences.

Inputs: start_date (required), rrule, end_date, timezone, +2 more.

resolve_timeA

Resolve a natural-language date/time expression into a deterministic ISO timestamp. Use this whenever the user mentions relative dates ('tomorrow', 'next Friday', 'in two weeks', 'the first Monday of next month'). The LLM interprets the language; this tool performs the actual temporal computation. Returns structured result with UTC, local, and precision info.

Inputs: expression (required), locale, timezone, reference_time.

temporal_verifyA

Verify a temporal claim deterministically. Prevents temporal hallucinations by checking facts like: 'Is 2026-12-31 a Thursday?', 'Is December 25 2027 a Saturday?', 'Is 3 PM London before 10 AM New York?', 'Is 2024 a leap year?'. Always returns structured facts.

Inputs: claim (required), date, datetime, timezone.

timezone_infoA

Get deterministic timezone information: UTC offset, DST status, abbreviation, and next/previous DST transitions. Uses the IANA timezone database. Handles zones with no DST correctly.

Inputs: timezone (required), reference_time.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 12 tools

    Disambiguation4/5

    Most tools have clearly distinct purposes: formatting, conversion, arithmetic, recurrence, business days, and verification all occupy separate niches. The main overlap is between calendar and jalali_persian, plus some holiday-awareness shared by holidays and business_days, but the descriptions provide enough guidance to avoid serious misselection.

    Naming Consistency3/5

    All names are readable snake_case, but the set mixes verb_noun forms like convert_time and calculate_date with noun-only names like now, holidays, and calendar, plus descriptor-noun names like timezone_info and jalali_persian. This is understandable but not a consistent naming pattern.

    Tool Count5/5

    With 12 tools, the server covers a broad date/time/calendar domain without feeling bloated. Each tool addresses a meaningful temporal operation, and the count sits comfortably within the well-scoped 3-15 range.

    Completeness5/5

    The tool surface covers the full lifecycle of temporal requests: current time, natural-language resolution, timezone conversion, formatting, arithmetic, recurrence, business days, holidays, calendar systems, and factual verification. There are no obvious dead-ends for common agent workflows involving dates and times.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      Giving LLMs Time Awareness Capabilities. Empower your LLMs with time awareness capabilities. Access current time, convert between timezones, and get timestamps effortlessly. Enhance your applications with precise time-related functionalities.
      6
      1,767 npm
      72
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Provides comprehensive date, time, timezone, and calendar operations powered by Luxon, enabling AI agents to perform time calculations, timezone conversions, and temporal data handling across 400+ IANA timezones.
      2
      44 npm
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Automates meeting logistics with tools for scheduling, availability checking, slot finding, timezone conversion, and recurring date generation. Eliminates the need for custom calendar logic by providing validated time operations and formatted invitations for applications and AI assistants.
      MIT