time-mcp
An MCP server that returns the local current time and the current time in any IANA timezone.
Tools
| Tool | Arguments | Returns | Description |
|---|---|---|---|
get_local_time |
(none) | time object | Current date and time of the machine running the server |
get_time_in_timezone |
timezone (string, required) — IANA name, e.g. Asia/Tokyo |
time object | Current date and time in the given timezone. Errors if the name is unknown |
list_timezones |
query (string, optional, default "") — case-insensitive substring; empty returns all |
string[] |
Available IANA timezone names, max 200 results |
get_time_from_ntp |
server (string, optional) — short name or hostname; timezone (string, optional) — IANA name, defaults to local |
time object + ntp_server, local_clock_offset_seconds |
Current time from a public NTP server instead of the local clock |
The time object returned by the tools above:
| Field | Type | Example |
|---|---|---|
timezone |
string | Asia/Tokyo |
datetime |
string (ISO 8601) | 2026-09-05T14:10:32.637530+09:00 |
date |
string | 2026-09-05 |
time |
string | 14:10:32 |
weekday |
string | Saturday |
utc_offset |
string | +0900 |
unix_timestamp |
integer | 1788585032 |
get_time_from_ntp adds two fields: ntp_server (the host actually used) and
local_clock_offset_seconds (how far the machine's clock is from the NTP time;
positive means the local clock is behind).
NTP servers
server takes one of these short names, or any NTP hostname.
| Short name | Host | Operator |
|---|---|---|
apple |
time.apple.com |
Apple |
microsoft / windows |
time.windows.com |
Microsoft |
nict |
ntp.nict.jp |
NICT (Japan) |
google |
time.google.com |
|
cloudflare |
time.cloudflare.com |
Cloudflare |
pool |
pool.ntp.org |
NTP Pool Project |
When server is omitted, time.apple.com is tried first and time.windows.com
is used as a fallback. Requires outbound UDP port 123; the timeout is 5 seconds.
Install
pip install time-mcp
Or run it without installing:
uvx time-mcp
Development setup
uv sync
Try it
uv run mcp dev src/time_mcp/server.py
Register with Claude Code
claude mcp add time -- uvx time-mcp
Or in claude_desktop_config.json:
{
"mcpServers": {
"time": {
"command": "uvx",
"args": ["time-mcp"]
}
}
}
Register with Codex CLI
codex mcp add time -- uvx time-mcp
Or add it to ~/.codex/config.toml by hand:
[mcp_servers.time]
command = "uvx"
args = ["time-mcp"]
Check that it is registered:
codex mcp list
Running from a local checkout
Replace uvx time-mcp with the following in any of the configurations above:
uv --directory /path/to/mcp_server-time run time-mcp
License
MIT License. See LICENSE.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file time_mcp-0.2.1.tar.gz.
File metadata
- Download URL: time_mcp-0.2.1.tar.gz
- Upload date:
- Size: 68.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5be7ce61ae7665af9763e55198d5095aaf9bffaeab208bb7d30208edd9b6886
|
|
| MD5 |
cd04162edaf77b8696255a7326783f7a
|
|
| BLAKE2b-256 |
2cb2f017b177a82aeabea14c9730af763bd39c009b050270cbcfa98c7233944d
|
File details
Details for the file time_mcp-0.2.1-py3-none-any.whl.
File metadata
- Download URL: time_mcp-0.2.1-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ff7c868d6c4cef6f4bf0425f5ca8324b87af39353f9e6f91160b232d2bbb725
|
|
| MD5 |
be15cb799417e1409219e91a361a66d8
|
|
| BLAKE2b-256 |
4c02d7728607b9831949b0f3f173a8eb6a8f1472158dd6c18ceee6f210c0f659
|