Time MCP server

Provides time and date manipulation capabilities including current time retrieval, timezone conversion, duration arithmetic, natural language relative time parsing, and time comparison for scheduling workflows and time-based analysis.
Back to servers
Setup instructions
Provider
TheoBrigitte
Release date
Jul 11, 2025
Language
Python
Stats
6 stars

The MCP Time Server is a tool that implements the Model Context Protocol (MCP) standard, allowing AI assistants to work with time and date operations. It enables time manipulation, timezone conversions, and natural language time parsing through a standardized interface.

Installation Options

Using Docker

Configure your MCP client with this JSON configuration to use the Docker image:

{
  "mcpServers": {
    "time": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "theo01/mcp-time:latest"
      ]
    }
  }
}

Using Binary

Configure your MCP client with this simple JSON configuration if you have the binary installed:

{
  "mcpServers": {
    "time": {
      "command": "mcp-time"
    }
  }
}

Installing the Binary

Option 1: Install from releases

# Replace OS-ARCH with your operating system and architecture (e.g., linux-amd64, darwin-arm64)
curl -Lo mcp-time https://github.com/TheoBrigitte/mcp-time/releases/latest/download/mcp-time.OS-ARCH
install -D -m 755 ./mcp-time ~/.local/bin/mcp-time

Option 2: Install with Go

go install github.com/TheoBrigitte/mcp-time/cmd/mcp-time@latest

Option 3: Build from Source

git clone https://github.com/TheoBrigitte/mcp-time.git
cd mcp-time
make install

Usage

Basic Usage

Start the server using the default stdio transport:

mcp-time

Start with HTTP stream transport:

mcp-time --transport stream --address "http://localhost:8080/mcp"

Command-line Options

The server supports several configuration options:

$ mcp-time --help
An MCP (Model Context Protocol) server which provides utilities to work with time and dates.

Usage:
  mcp-time [flags]

Flags:
      --address string     Listen address for Stream HTTP Server (only for --transport stream) (default "http://localhost:8080/mcp")
  -h, --help               help for mcp-time
      --log-file string    Path to log file (logs is disabled if not specified)
  -t, --transport string   Transport layer: stdio, stream. (default "stdio")
      --version            Print version information and exit

Available Tools

Relative Time

Get a time based on natural language expressions.

Parameters:

  • text (required): Natural language expression (e.g., "yesterday", "5 minutes ago")
  • time (optional): Reference time (defaults to current time)
  • timezone (optional): Target timezone
  • format (optional): Output time format

Convert Timezone

Convert time between different timezones.

Parameters:

  • time (required): Input time string
  • input_timezone (optional): Source timezone
  • output_timezone (optional): Target timezone
  • format (optional): Output format

Current Time

Get the current time in a specified format and timezone.

Parameters:

  • format (optional): Output format (predefined or custom)
  • timezone (optional): Target timezone (defaults to UTC)

Add Time

Add or subtract durations from a given time.

Parameters:

  • time (required): Input time string
  • duration (required): Duration to add or subtract (e.g., "2h30m", "-1h")
  • timezone (optional): Target timezone
  • format (optional): Output format

Compare Time

Compare two different times.

Parameters:

  • time_a (required): First time to compare
  • time_b (required): Second time to compare

Returns:

  • -1 if time_a is before time_b
  • 0 if times are equal
  • 1 if time_a is after time_b

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "time" '{"command":"docker","args":["run","--rm","-i","theo01/mcp-time:latest"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "time": {
            "command": "docker",
            "args": [
                "run",
                "--rm",
                "-i",
                "theo01/mcp-time:latest"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "time": {
            "command": "docker",
            "args": [
                "run",
                "--rm",
                "-i",
                "theo01/mcp-time:latest"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later