Skip to content

With Simple Timeserver MCP Server you can let your LLM interact with a NTP server to obtain the current time in a certain area in the world.

License

Notifications You must be signed in to change notification settings

rncz/simple-timeserver-mcp-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Timeserver MCP Server

Time Server MCP is a lightweight MCP server that allows a Large Language Model (LLM) to fetch the current time from NTP servers. Query the current timestamp, see it in human-readable format, and even check the offset and delay — all controlled via an LLM.

Simply ask your LLM for the current time, and it will automatically fetch it from reliable NTP servers like pool.ntp.org.

Features

  • NTP-Powered – Fetch accurate time from public NTP servers.
  • 💻 Fully Local – The MCP server runs locally and requires no external database.
  • 🤖 LLM Integration – Use tool calling in your LLM to request the current time.
  • 📡 Multiple NTP Servers – Supports several pool.ntp.org mirrors for redundancy.
  • Quick Access – Retrieve timestamps, human-readable time, offset, delay, and stratum information.

Installation

🐧 macOS / Linux

  1. Clone the repository:

    git clone https://github.com/rncz/simple-timeserver-mcp-server.git
  2. Configure environment:

    cd simple-timeserver-mcp-server
    cp env_sample .env

    Open .env and enter your timezone, for example MCP_DEFAULT_TIMEZONE="Europe/Amsterdam".

  3. Configure Python environment and install the package:

    uv venv
    uv tool install -e .
  4. Add MCP server to your LLM software (example for LM Studio):

    {
      "mcpServers": {
        "simple-timeserver-mcp": {
          "command": "uvx",
          "args": ["simple-timeserver-mcp"]
        }
      }
    }
  5. Test your setup — Connect your LLM with tool calling enabled and ask the current time or a time in a region in the world.

🪟 Windows (PowerShell)

  1. Clone the repository:

    git clone https://github.com/rncz/simple-timeserver-mcp-server.git
  2. Configure environment:

    cd nextcloud-notes-mcp-server
    copy env_sample .env

    Open .env and enter your timezone, for example MCP_DEFAULT_TIMEZONE="Europe/Amsterdam".

  3. Configure Python environment and install the package:

    uv venv
    uv tool install -e .
  4. Add MCP server to your LLM software (example for LM Studio):

    {
      "mcpServers": {
        "simple-timeserver-mcp": {
          "command": "uvx",
          "args": ["simple-timeserver-mcp"]
        }
      }
    }
  5. Test your setup — Connect your LLM with tool calling enabled and ask the current time or a time in a region in the world.


🕰️ Time Server MCP Tools

Tool Description
get_ntp_time Fetch the current time from a specified NTP server.
list_ntp_servers List available NTP servers that can be queried.

Each NTP response includes the timestamp, human-readable time, offset, delay, and stratum.


🛠️ Example Usage

Once the Time Server MCP is running and your LLM has tool calling enabled, you can fetch time easily:

  • Get current time from the default NTP server:

    "What is the current time?"

  • Get current time from a specific NTP server (index 2):

    "Fetch the current time from server number 2."

  • List all available NTP servers:

    "Which NTP servers can I use?"

The LLM will automatically fetch and return the current time, letting you query NTP servers seamlessly without manual network calls.


Note: This MCP server does not store data locally; it only fetches the current time from NTP servers. Use it to keep your LLM or scripts synchronized with accurate timestamps.

🌍 Available Time Zones

This Time Server MCP uses IANA time zone identifiers (the same ones used by Linux, macOS, and most servers worldwide).

✅ Supported Time Zones

All standard IANA time zones are supported, including (but not limited to):

Europe

  • Europe/Amsterdam
  • Europe/Brussels
  • Europe/London
  • Europe/Paris
  • Europe/Berlin
  • Europe/Madrid
  • Europe/Rome

Americas

  • America/New_York
  • America/Los_Angeles
  • America/Chicago
  • America/Sao_Paulo
  • America/Lima
  • America/Mexico_City

Asia

  • Asia/Shanghai
  • Asia/Tokyo
  • Asia/Singapore
  • Asia/Kolkata
  • Asia/Dubai
  • Asia/Jakarta

Australia & Oceania

  • Australia/Sydney
  • Australia/Melbourne
  • Pacific/Auckland

UTC

  • UTC (default if no timezone is specified)

📝 How to Choose a Time Zone

You can:

  • Set a default timezone in your .env file:

    MCP_DEFAULT_TIMEZONE="Europe/Amsterdam"
  • Or request a specific timezone directly via the LLM:

    “What time is it in Europe/Brussels?”

The server automatically handles:

  • Daylight Saving Time (DST)
  • Correct UTC offsets (e.g. UTC+1, UTC+2, UTC-5)

🔎 Full List of Time Zones

For a complete and authoritative list of all supported time zones, see:

👉 https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

Any timezone from this list can be used with get_ntp_time.


✅ Notes

  • The MCP server never guesses your location

  • If no timezone is provided, it uses:

    • MCP_DEFAULT_TIMEZONE (if set)
    • otherwise UTC
  • NTP always provides UTC; timezones are applied locally and correctly

About

With Simple Timeserver MCP Server you can let your LLM interact with a NTP server to obtain the current time in a certain area in the world.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages