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.
Metadata
Release files for time-mcp 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| time_mcp-0.2.1.tar.gz | 68.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| time_mcp-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 74.4 kB
Release files / time_mcp-0.2.1.tar.gz
| Download URL | time_mcp-0.2.1.tar.gz |
|---|---|
| Size | 68.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c5be7ce61ae7665af9763e55198d5095aaf9bffaeab208bb7d30208edd9b6886
|
|
BLAKE2b-256 checksum How to use checksums |
2cb2f017b177a82aeabea14c9730af763bd39c009b050270cbcfa98c7233944d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.9
|
Release files / time_mcp-0.2.1-py3-none-any.whl
| Download URL | time_mcp-0.2.1-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0ff7c868d6c4cef6f4bf0425f5ca8324b87af39353f9e6f91160b232d2bbb725
|
|
BLAKE2b-256 checksum How to use checksums |
4c02d7728607b9831949b0f3f173a8eb6a8f1472158dd6c18ceee6f210c0f659
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.9
|
Security for time-mcp 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.