Time MCP Server is a component in the Model Context Protocol reference server collection, intended to give large language models time and time zone handling capabilities. It provides current time queries, time zone conversion, and time-ago calculations, and supports automatic detection of the system time zone.
Its main capabilities include three tools: get_current_time is used to obtain the current time in a specified time zone or the system time zone; the time zone parameter is an optional IANA time zone name (such as America/New_York, Europe/London), defaulting to the server's local time zone; convert_time is used to convert time between two time zones; the time parameter is required and uses the 24-hour HH:MM format; the source time zone and target time zone are both optional and default to the server's local time zone; get_time_ago is used to obtain the time a number of days, hours, minutes, and seconds ago, suitable for answering questions like "what happened in the past 5 hours"; each offset parameter is a non-negative JSON integer, defaults to 0, and is accumulated; offsets go back by actual elapsed time, so across daylight saving time transitions "one day ago" is exactly 24 hours ago, and going back before year 1 AD will raise an error.
For usage, uv is recommended, requiring no dedicated installation; run mcp-server-time directly via uvx. It can also be installed via pip and run as a script. The server requires the MCP Python SDK 2.x (mcp>=2.3,<3). It communicates via stdio by default and supports both the 2026-07-28 and 2025-11-25 protocol versions, with the version determined by the client's first request. Using --transport streamable-http runs it as a standalone HTTP service, providing the /mcp endpoint, listening on 127.0.0.1:3001 by default, adjustable via the HOST and PORT environment variables. The documentation also provides configuration methods for Claude, Zed, VS Code, and Zencoder.
For time zone customization, the server automatically detects the system time zone by default, which can be overridden with the --local-timezone parameter; Docker images cannot read the host time zone, so at startup they read the LOCAL_TIMEZONE environment variable and use UTC if it is not set. Time zone names must be exact IANA keys and are case-sensitive.
For result and error handling, each tool declares an outputSchema and returns results in both structuredContent and an indented JSON text block. When a tool fails, it returns an isError result with text prefixed by "Error executing tool <name>:", covering cases such as unknown or non-exact time zones, empty time zones, non-conforming time formats, times skipped by clock transitions, and missing or wrongly typed parameters. For times that occur twice due to a daylight saving time fall-back, convert_time returns the first occurrence in source and target, and gives the second occurrence with an explanation in later_occurrence, without guessing on its own. An unknown tool name returns a JSON-RPC -32602 error. The server does not register prompts or resources, and the corresponding list methods return empty lists.
Applicable scenarios include having the model answer the current time, the time in a certain city, cross-time-zone meeting time conversion, conversion of a specified time, and retrospective time queries. Limitations: time zones must use exact IANA names; time input must be in 24-hour HH:MM format; the offset parameter of get_time_ago does not accept decimals, numeric strings, or booleans; in HTTP mode, browser pages from non-localhost origins are rejected with a 403 to prevent DNS rebinding. The project uses the MIT license, and contributions are submitted as issues.