- Home
- MCP servers
- Time
Time
- python
0
GitHub Stars
python
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"mekanixms-mcptimeserver": {
"command": "/path/to/python",
"args": [
"/path/to/timeserver.py"
],
"env": {
"TIMEZONE": "America/New_York"
}
}
}
}You can run a dedicated MCP Time Server that fetches the current time from internet time servers and presents it in your preferred timezone. This makes it easy for your applications to display accurate time information without managing time synchronization locally.
How to use
Install and configure the Time Server, then request the current time through your MCP client. Use the get_current_time tool to obtain a timestamp formatted for your configured timezone. The server connects to pool.ntp.org to obtain the accurate current time and converts it to your specified timezone (or UTC if none is set). You’ll receive a neatly formatted string that includes the date, time, and timezone.
Typical usage patterns include checking the current time for logging, timestamping events, or displaying a time-aware clock in your UI. If you change the TIMEZONE environment variable, the tool will reflect the new timezone without changing the client logic.
How to install
Prerequisites you need before installing the Time Server are Python and the ability to install Python packages on your system.
pip install mcp ntplib pytz
```}
Install the server in your MCP environment with your desired timezone. This command installs the server and associates the TIMEZONE setting.
mcp install timeserver.py -e TIMEZONE=America/New_York
Add the Time Server configuration to yourClaude Desktop config under mcpServers. Include the Python path, the script path, and the TIMEZONE you want to use.
{
"mcpServers": {
"Time Server": {
"command": "/path/to/python",
"args": [
"/path/to/timeserver.py"
],
"env": {
"TIMEZONE": "America/New_York"
}
}
}
}
Additional configuration notes
You may set any valid IANA timezone name. Common examples include America/New_York, Europe/London, Asia/Tokyo, US/Pacific, and UTC (default if no timezone is specified). If the timezone is invalid, the server gracefully falls back to UTC.
If you encounter network issues reaching the NTP servers or an invalid timezone, the server will return informative error messages and continue to operate with UTC as a safe fallback.
Notes
This MCP server relies on the standard NTP pool pool.ntp.org for time synchronization and uses the pytz library for timezone conversions.
Available tools
get_current_time
Fetches the current time by querying pool.ntp.org and converts it to the configured timezone, returning a formatted string with date, time, and timezone.