Skip to content

Menu

Time MCP Server logo

Time MCP Server

Published · Updated

At a glance

Watch out for
The servers repository describes its reference servers as educational examples that demonstrate MCP features and SDK usage, not production-ready solutions, and tells developers to apply their own safeguards.

Time is a reference server in the main modelcontextprotocol/servers repository, written in Python on the MCP Python SDK 2.x and published on PyPI as mcp-server-time, with a Docker image mcp/time. Its registry name in the README is io.github.modelcontextprotocol/server-time.

It gives a model the current time and timezone conversion using IANA timezone names, with the system timezone detected automatically. That sounds trivial, but models have no clock, so questions like "what time is it in Tokyo" or "what was the time two and a half hours ago" need a tool to answer correctly.

It runs locally over stdio by default and speaks both the 2026-07-28 and 2025-11-25 protocol versions without configuration. With --transport streamable-http it runs as an HTTP service on a single /mcp endpoint. Each tool declares an output schema and returns structured content plus the same JSON as text.

How it connects

Your AI app

An assistant or agent that supports MCP

Time MCP Server

Runs as

  • Python (uv / pip)
  • Docker

Gives the agent

  • Current time
  • Timezone conversion
  • Relative past times
  • DST edge cases
  • Clear errors

Time

The data or system the tools act on

Your AI app talks to Time MCP Server over the Model Context Protocol, and the server carries out the work. Built from the setup and capability sections on this page.

What it can do

Current time
get_current_time returns the datetime, day of week and DST flag for an IANA timezone, or the server's local timezone if none is given.
Timezone conversion
convert_time converts a 24-hour HH:MM time from source_timezone to target_timezone and reports the time difference.
Relative past times
get_time_ago counts back days_ago, hours_ago, minutes_ago and seconds_ago from now, as elapsed time, so a day ago across a DST change is exactly 24 hours.
DST edge cases
When a fall-back clock change makes a wall-clock time occur twice, convert_time returns the first occurrence and puts the second in later_occurrence instead of guessing.
Clear errors
Bad timezones, malformed times and times skipped by a clock change come back as isError results the model can read and act on.

Setting it up

The README recommends uv: no install step is needed, uvx mcp-server-time runs it directly. Alternatively pip install mcp-server-time and run python -m mcp_server_time. For Claude Desktop, add a time entry under mcpServers with command uvx and args ["mcp-server-time"]; the Docker form is command docker with args ["run", "-i", "--rm", "-e", "LOCAL_TIMEZONE", "mcp/time"]. Zed uses the same command under context_servers, and VS Code with Copilot takes it under mcpServers in ~/.copilot/mcp-config.json or the workspace-root .mcp.json. To override the detected timezone, add --local-timezone=America/New_York (or any exact IANA key) to args; the Docker image cannot see the host timezone, reads LOCAL_TIMEZONE at start and falls back to UTC. For HTTP, run uvx mcp-server-time --transport streamable-http, which listens on 127.0.0.1:3001 unless HOST and PORT say otherwise, and point the client at http://127.0.0.1:3001/mcp. npx @modelcontextprotocol/inspector uvx mcp-server-time opens it in the MCP Inspector for debugging.

Run in a terminal
claude mcp add time -- uvx mcp-server-time

Runs the mcp-server-time package from PyPI. Add any API keys, environment variables or extra arguments the setup notes above list. Combine several servers in the MCP config generator

Where each client keeps its MCP config file, and the JSON it expects (cheat sheet)

Where it helps

  • Answering "what time is it in Tokyo right now" with a real clock reading instead of a guess.
  • Scheduling across teams, for example converting 9:30 in Tokyo to New York time before proposing a meeting.
  • Working out a timestamp for "the last five hours" before an agent queries logs or tickets.
  • Handling DST change days correctly when converting times that are skipped or repeated.

Limitations and things to watch

  • The servers repository describes its reference servers as educational examples that demonstrate MCP features and SDK usage, not production-ready solutions, and tells developers to apply their own safeguards.
  • Timezone names must be exact IANA keys with correct case: Europe/Warsaw works and europe/warsaw is rejected on every platform.
  • convert_time only accepts a time of day in HH:MM form and converts it on the current date; it registers no prompts or resources.
  • In Docker the server cannot see the host timezone and defaults to UTC unless LOCAL_TIMEZONE or --local-timezone is passed.
  • Setting HOST=0.0.0.0 on the HTTP transport exposes it to every machine that can reach yours, so it should be set deliberately.

Sources

Written from the project's own documentation, checked November 2026.

How we research: where our facts come from, how often we re-check them, and why no one can pay for a review or a verdict.

Reviews and commentsShow

Reviews

Sign in to leave a review.

Loading reviews…

Comments

Sign in to leave a comment.

Loading comments…