Home / MCP / Time MCP Server

Time MCP Server

Provides time and timezone conversion capabilities using IANA timezones with automatic system timezone detection.

python
74.1kstars
Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
    "mcpServers": {
        "time": {
            "command": "uvx",
            "args": [
                "mcp-server-time"
            ],
            "env": {
                "LOCAL_TIMEZONE": "YOUR_VALUE"
            }
        }
    }
}

Time MCP Server provides time and timezone conversion capabilities for LLMs. It automatically detects your system timezone and exposes tools to fetch the current time in any IANA timezone or convert times between timezones, enabling precise, context-aware time handling in your applications.

How to use

You interact with the Time MCP Server through your MCP client by calling its tools to get current time or to convert times between timezones. Use a dedicated tool to fetch the current time in a specific timezone or in the system timezone when you do not specify one. Use the conversion tool to translate a given time from a source timezone to a target timezone.

How to install

Prerequisites: you need Python installed if you plan to run the server via Python, or you can use container or runtime tooling such as uvx or Docker depending on your preferred workflow.

Option A: Run via uvx (recommended for quick starts) and avoid a separate install step.

Option B: Install with Python using pip and run the module directly.

Additional sections

Configuration and usage details are provided below so you can adapt the server to your environment. You can override the system timezone by supplying a local timezone when you start the server.

Example interactions show how you request the current time or perform timezone conversions. Use these patterns to integrate the server into your workflows.

Debugging can be done with the MCP inspector when you are using uvx or other supported runtimes to verify the server is responding to tool calls.

If you want to build a container image, you can create a Docker build context for the time server and expose it as an MCP endpoint in your environment.

Examples of interactions

{
  "name": "get_current_time",
  "arguments": {
    "timezone": "Europe/Warsaw"
  }
}
```

```json
{
  "name": "convert_time",
  "arguments": {
    "source_timezone": "America/New_York",
    "time": "16:30",
    "target_timezone": "Asia/Tokyo"
  }
}

Build

To build a Docker image for the time server, navigate to the server’s source directory and run the Docker build command as specified by your workflow.

Available tools

get_current_time

Fetches the current time in a specified IANA timezone or the system timezone when no timezone is provided.

convert_time

Converts a time from a source timezone to a target timezone using the provided time in 24-hour format.