Skip to main content

A simple MCP server that provides current time - either local or from an NTP server.

Project description

MseeP.ai Security Assessment Badge

MCP Simple Timeserver

Trust Score smithery badge

One of the strange design decisions Anthropic made was depriving Claude of timestamps for messages sent by the user in claude.ai or current time in general. Poor Claude can't tell what time it is! mcp-simple-timeserver is a simple MCP server that fixes that.

Available Tools

This server provides the following tools:

Tool Description
get_local_time Returns the current local time, day of week, and timezone from the user's machine
get_utc Returns accurate UTC time from an NTP time server
get_current_time Returns current time with optional location, timezone, and calendar conversions
calculate_time_distance Calculates duration between two dates/times (countdowns, elapsed time)
get_holidays Returns public holidays (and optionally school holidays) for a country
is_holiday Checks if a specific date is a holiday in a given country or city

All tools (except get_local_time) use accurate time from NTP servers. If NTP is unavailable, they gracefully fall back to local server time with a notice.

Location Support via get_current_time

The get_current_time tool supports location parameters to get local time anywhere in the world:

Parameter Description Example
city City name (primary use case) "Warsaw", "Tokyo", "New York"
country Country name or ISO code "Poland", "JP", "United States"
timezone IANA timezone or UTC offset "Europe/Warsaw", "+05:30"

Priority: timezone > city > country. When location is provided, the response includes local time, timezone info, UTC offset, and DST status.

If today is a public holiday at the specified location, it will be shown in the output.

Calendar Support via get_current_time

The get_current_time tool also accepts an optional calendar parameter with a comma-separated list of calendar formats:

Calendar Description
unix Unix timestamp (seconds since 1970-01-01)
isodate ISO 8601 week date (e.g., 2026-W03-6)
hijri Islamic/Hijri lunar calendar
japanese Japanese Era calendar (returns both English and Kanji)
hebrew Hebrew/Jewish calendar (returns both English and Hebrew, includes holidays)
persian Persian/Jalali calendar (returns both English and Farsi)

Example: get_current_time(city="Tokyo", calendar="japanese") returns Tokyo local time with Japanese Era calendar.

Time Distance Calculation via calculate_time_distance

Calculate duration between two dates or times:

Parameter Description Example
from_date Start date (ISO 8601 or "now") "2025-01-15", "now"
to_date End date (ISO 8601 or "now") "2025-12-31", "2025-06-01T17:00:00"
unit Output format "auto", "days", "weeks", "hours", "minutes", "seconds"

Location parameters (city, country, timezone) can also be used to specify timezone context.

Example: calculate_time_distance(from_date="now", to_date="2025-12-31") returns a countdown to New Year's Eve.

Holiday Information via get_holidays and is_holiday

Get public and school holiday information for ~119 countries:

get_holidays parameters:

Parameter Description Example
country Country name or ISO code (required) "Poland", "DE", "United States"
year Year to get holidays for (default: current year) 2026
include_school_holidays Include school vacation periods true

is_holiday parameters:

Parameter Description Example
country Country name or ISO code "Poland", "US"
city City name for region-specific info "Warsaw", "Munich"
date Date to check in ISO format (default: today) "2026-01-01"

Regional School Holidays: When using the city parameter with is_holiday, school holidays are filtered to show only those affecting the specific region. This is particularly useful in countries where school holidays vary by region (e.g., Polish voivodeships, German Bundesländer, Spanish autonomous communities).

Example: is_holiday(city="Warsaw", date="2026-01-19") returns school holiday information specific to the Mazowieckie voivodeship.

Data Sources:

Installation

Installing via Smithery

To install Simple Timeserver for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install mcp-simple-timeserver --client claude

Manual Installation

First install the module using:

pip install mcp-simple-timeserver

Then configure in MCP client - the Claude desktop app.

Under Mac OS this will look like this:

"mcpServers": {
  "simple-timeserver": {
    "command": "python",
    "args": ["-m", "mcp_simple_timeserver"]
  }
}

Under Windows you have to check the path to your Python executable using where python in the cmd (Windows command line).

Typical configuration would look like this:

"mcpServers": {
  "simple-timeserver": {
    "command": "C:\\Users\\YOUR_USERNAME\\AppData\\Local\\Programs\\Python\\Python311\\python.exe",
    "args": ["-m", "mcp_simple_timeserver"]
  }
}

Web Server Variant

This project also includes a network-hostable version that can be deployed as a standalone web server. For instructions on how to run and deploy it, please see the Web Server Deployment Guide.

Or you can simply use my server by adding it under https://mcp.andybrandt.net/timeserver to Claude and other tools that support MCP.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_simple_timeserver-3.2.0.tar.gz (26.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_simple_timeserver-3.2.0-py3-none-any.whl (25.6 kB view details)

Uploaded Python 3

File details

Details for the file mcp_simple_timeserver-3.2.0.tar.gz.

File metadata

  • Download URL: mcp_simple_timeserver-3.2.0.tar.gz
  • Upload date:
  • Size: 26.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for mcp_simple_timeserver-3.2.0.tar.gz
Algorithm Hash digest
SHA256 5bb35ba06d397a1176e2d62d46692f628b252605f0003f442322275e5a5485fa
MD5 e186349dd4349e55f3ae4a11a7874351
BLAKE2b-256 7326614b1686abd66f318ca68752fbcfdd075f5a075c5a6ec221a2964a442767

See more details on using hashes here.

File details

Details for the file mcp_simple_timeserver-3.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_simple_timeserver-3.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d66f0d4c81e9eedf3e57d791ad530346b1e1b37c05aab22f665e3c25e64ad9d4
MD5 a366e24b47c1ed560edc823c267fd667
BLAKE2b-256 79ef424ca635d4b5a308d24bd2694314785558f37814713f61a52e5bfd1261ae

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page