How to fix mcp-server-time crash: ZoneInfoNotFoundError 'No time zone found with key EDT'?
I run
uvx mcp-server-timeon macOS with Python 3.11.9 and get ZoneInfoNotFoundError: 'No time zone found with key EDT' as soon as daylight saving time starts. Users on Windows report the same with 'China Standard Time', and others see PDT, CST, BST, AEDT. Why does it crash and how do I fix the timezone setting?Originally asked on GitHub: https://github.com/modelcontextprotocol/servers/issues/786
6 answers
The issue is closed as a duplicate and this thread contains no maintainer fix; the working solution reported by commenters is to pass an explicit IANA timezone name instead of relying on the local timezone label. When the system reports a zone such as 'EDT', 'BST', 'China Standard Time', or 'Mitteleuropaische Zeit', the server's get_local_tz() call tries ZoneInfo on that label and fails with ZoneInfoNotFoundError, because those are not valid IANA zone keys.
A confirmed working configuration for a client MCP settings file is:
{"time": {"command": "uvx", "args": ["mcp-server-time", "--local-timezone", "Europe/London"]}}
Use the IANA name for your actual zone, for example America/New_York for US Eastern. Running the command directly also worked for one commenter: mcp_server_time --local-timezone "Europe/London".
One commenter noted that when no --local-timezone parameter is set, the server should use the current user system setting. One reporter on CST tried --local-timezone "Etc/GMT-1" and reported it still failed, though the thread gives no reason for that failure. As general advice, when passing a timezone explicitly, use an IANA name that matches your location rather than an offset-style name.
Did this work for you?What @danilop tried on GitHub (Worked)
Suggested that the server needs a valid IANA timezone name, not an abbreviation like BST, and reported that
mcp_server_time --local-timezone "Europe/London"works.Did this work for you?What @Muhammad-Hazimi-Yusri tried on GitHub (Worked)
Confirmed a working client config: {"time": {"command": "uvx", "args": ["mcp-server-time", "--local-timezone", "Europe/London"]}}.
Did this work for you?What a GitHub user tried on GitHub (Didn't work)
Reproduced the crash by running
uvx mcp-server-timeon macOS with Python 3.11.9 while the local timezone was EDT; the traceback shows ZoneInfoNotFoundError for key 'EDT'.Source: https://github.com/modelcontextprotocol/servers/issues/786 (opens external site)
Did this work for you?What @zstbee tried on GitHub (Didn't work)
Edited the client developer config to run
python3 -m mcp_server_time --local-timezone "Etc/GMT-1"while in CST and reported it still did not work.Did this work for you?What @MovGP0 tried on GitHub (Outcome unclear)
Noted that when no timezone parameter is set, the current user system setting should be used; no one verified this behavior in the thread.
Did this work for you?
Related questions
- mcp-server-fetch: 'AnyUrl' object has no attribute 'decode' error
- Does the official MCP Postgres example validate SQL before executing it?
- How to fix UTF-8 Japanese text corruption/crash in mcp-server-sqlite with Claude Desktop on Windows?
- MCP Knowledge Graph Memory Server fails with ${workspaceFolder} in MEMORY_FILE_PATH
- npx @modelcontextprotocol/server-filesystem: ERR_MODULE_NOT_FOUND for zod-to-json-schema