mcp-time

mcp-time

A Model Context Protocol server for time and date operations

8
Stars
5
Forks
8
Watchers
1
Issues
mcp-time is a Model Context Protocol (MCP) server that enables AI assistants and MCP clients to perform standardized time and date-related operations. It provides natural language parsing for relative time expressions, supports flexible formatting, and allows manipulation and comparison of times. The server offers multiple integration methods, including stdio, HTTP stream, Docker, and npx for compatibility with various clients. It is designed for robust time handling and easy integration with AI tools.

Key Features

Current time retrieval
Timezone conversion
Add or subtract durations
Natural language parsing for time expressions
Compare multiple time values
Flexible time formatting
MCP standard compliance
Multiple transport support (stdio, HTTP stream)
Easy integration with AI clients
Docker, npx, and binary deployment options

Use Cases

Allowing AI assistants to answer time-related questions
Scheduling and reminders based on natural language inputs
Comparing dates or durations in conversational interfaces
Formatting dates and times for different locales or needs
Enabling context-aware time functionalities in coding assistants
Parsing and interpreting relative time phrases in chatbots
Providing backend time services to AI-driven platforms
Automating timezone conversions for international teams
Assisting calendar and event tools with date/time logic
Integrating standardized time services into custom applications

README

GitHub release Build Status Go Reference Trust Score NPM Package Docker Image

Time MCP Server

A Model Context Protocol server that enables AI assistants to interact with time

Overview

The Time MCP Server is a Model Context Protocol (MCP) server that provides AI assistants and other MCP clients with standardized tools to perform time and date-related operations. This server acts as a bridge between AI tools and a robust time-handling backend, allowing for complex time manipulations through natural language interactions.

Features

  • ⏰ Time Manipulation - Get current time, convert between timezones, and add or subtract durations
  • 🗣️ Natural Language Parsing - Understands relative time expressions like "yesterday" or "next month"
  • ⚖️ Time Comparison - Compare two different times with ease
  • 🎨 Flexible Formatting - Supports a wide variety of predefined and custom time formats
  • ✅ MCP Compliance - Fully compatible with the Model Context Protocol standard
  • 🔄 Multiple Transports - Supports stdio for local integrations and HTTP stream for network access

Installation

This MCP server can be integrated with various AI assistant clients that support the Model Context Protocol, including Cursor, Claude Desktop, Claude Code, and many more.

🚀 One-Click Install (Cursor)

Click the button below to automatically configure the MCP server using Docker in your Cursor environment:

Using npx (JavaScript/Node.js)

This method runs the MCP server using npx, which requires Node.js to be installed. Copy the following JSON configuration into your MCP client settings:

json
{
  "mcpServers": {
    "mcp-time": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@theo.foobar/mcp-time"
      ]
    }
  }
}

Using Docker

Run the MCP server in an isolated container. Requires Docker to be installed. Copy this JSON configuration into your MCP client settings:

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

Using binary

Install the mcp-time binary directly on your system. Choose one of the installation methods below, ensuring the binary is placed in a directory that's in your PATH. Then add this JSON configuration to your MCP client settings:

json
{
  "mcpServers": {
    "mcp-time": {
      "type": "stdio",
      "command": "mcp-time"
    }
  }
}

Option 1: Download from Releases

Download the latest pre-built binary from the releases page:

bash
# Replace OS-ARCH with your platform (e.g., linux-amd64, darwin-arm64, windows-amd64)
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

For Go developers, install directly using go install:

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

The binary will be installed in your $GOPATH/bin directory.

Option 3: Build from Source

Clone and build the project using make:

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

The binary will be installed in ~/.local/bin/mcp-time.

Usage

Basic Usage

Start with stdio transport (default, for MCP clients):

bash
mcp-time

Start with HTTP stream transport (for network access):

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

Command-Line Options

The server supports the following flags for advanced configurations:

$ 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

current_time

Get the current time in any timezone and format.

Parameters:

  • format (optional) - The output format (predefined like RFC3339, Kitchen, or custom Go layout)
  • timezone (optional) - Target timezone in IANA format (e.g., America/New_York). Defaults to UTC

Example: "What time is it in Tokyo?"

relative_time

Get a time based on a relative natural language expression.

Parameters:

  • text (required) - Natural language expression (e.g., yesterday, 5 minutes ago, next month)
  • time (optional) - Reference time for the expression. Defaults to current time
  • timezone (optional) - Target timezone for the output
  • format (optional) - Output format for the time

Example: "What was the date 3 weeks ago?"

convert_timezone

Convert a given time between timezones.

Parameters:

  • time (required) - Input time string (supports various formats)
  • input_timezone (optional) - Timezone of the input time
  • output_timezone (optional) - Target timezone for the output
  • format (optional) - Output format for the time

Example: "Convert 2:30 PM EST to Tokyo time"

add_time

Add or subtract a duration from a given time.

Parameters:

  • time (required) - Input time string
  • duration (required) - Duration to add/subtract (e.g., 2h30m, -1h, 24h)
  • timezone (optional) - Target timezone for the output
  • format (optional) - Output format for the time

Example: "What time will it be in 45 minutes?"

compare_time

Compare two times and determine their relationship. Supports timezone-aware comparisons.

Parameters:

  • time_a (required) - First time to compare
  • time_a_timezone (optional) - Timezone for time_a in IANA format (e.g., America/New_York)
  • time_b (required) - Second time to compare
  • time_b_timezone (optional) - Timezone for time_b in IANA format (e.g., Europe/London)

Returns:

  • -1 if time_a is before time_b
  • 0 if time_a equals time_b
  • 1 if time_a is after time_b

Example: "Is 3 PM EST before 8 PM GMT?"

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Credits

Built with these excellent libraries:

Star History

Star History Chart

Repository Owner

Repository Details

Language Go
Default Branch main
Size 964 KB
Contributors 2
License MIT License
MCP Verified Nov 12, 2025

Programming Languages

Go
74.48%
Makefile
13.71%
JavaScript
11.48%
Dockerfile
0.33%

Tags

Topics

mcp mcp-server mcp-tools modelcontextprotocol

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • mcp-datetime

    mcp-datetime

    Datetime formatting service MCP server for Claude Desktop App

    mcp-datetime provides a datetime formatting service implemented as an MCP server for integration with the Claude Desktop Application. It offers generation of current date and time strings in various formats, including standard, Japanese, ISO, and filename-friendly outputs. The server exposes a 'get_datetime' tool for easy retrieval of formatted dates and times with support for timezone handling and multi-language output. Seamless integration and Python packaging facilitate installation and extensibility.

    • 25
    • MCP
    • ZeparHyfar/mcp-datetime
  • Plugwise MCP Server

    Plugwise MCP Server

    TypeScript-based Model Context Protocol server for Plugwise smart home integration.

    Plugwise MCP Server is a TypeScript-based server that implements the Model Context Protocol (MCP) for integrating Plugwise smart home devices. It enables automatic discovery and secure management of Plugwise hubs, provides control over thermostats, switches, and smart plugs, and supports real-time device updates and energy monitoring. Designed for compatibility with popular MCP clients such as Claude Desktop, Cline, Cursor, and VS Code Copilot via standard I/O transport, it offers robust support for multiple hubs and both mock and real hardware environments.

    • 0
    • MCP
    • Tommertom/plugwise-mcp
  • MCP-timeserver

    MCP-timeserver

    A simple MCP server providing date and time information to agentic systems.

    MCP-timeserver exposes current datetime information via a custom datetime URI scheme compatible with the Model Context Protocol. It allows agentic systems and chat REPLs to access timezone-aware current times and offers a tool to fetch the system's local time. The server is designed to integrate with MCP-based workflows by providing standardized datetime resources.

    • 39
    • MCP
    • SecretiveShell/MCP-timeserver
  • MCP Simple Timeserver

    MCP Simple Timeserver

    Provides local and UTC time to AI models via the Model Context Protocol.

    MCP Simple Timeserver provides current local time, timezone, and UTC information to AI models such as Claude by serving as a Model Context Protocol (MCP) tool. It offers two main endpoints: one for retrieving the user's local time and timezone, and another for fetching the current UTC time from an NTP server. The project supports both local and web server deployments and can be integrated into the Claude desktop app to enhance temporal awareness for LLMs.

    • 25
    • MCP
    • andybrandt/mcp-simple-timeserver
  • Time Node MCP Server

    Time Node MCP Server

    Timezone-aware date and time operations for AI assistants and applications.

    Time Node MCP Server is an implementation of the Model Context Protocol (MCP) designed to provide accurate, timezone-aware date and time operations. It exposes tools for retrieving and converting times across IANA timezones, detecting system timezone, and offering outputs in multiple formats. The server ensures correct handling of Daylight Saving Time transitions and supports integration with AI assistants like Claude Desktop.

    • 0
    • MCP
    • davidan90/time-node-mcp
  • mcp-server

    mcp-server

    A production-ready Model Context Protocol server for advanced aerospace and astrodynamics calculations.

    The mcp-server provides a Model Context Protocol (MCP) server specifically designed for aerospace and astrodynamics computations. It offers both STDIO and HTTP/SSE transport options, enabling seamless integration with MCP clients for tasks like celestial body ephemeris, orbital mechanics, geometry, ground station operations, and time system conversions. Powered by the IO Aerospace Astrodynamics framework, it supports rapid, context-aware scientific tool execution for applications in mission analysis and research. Extensible deployment methods, including Docker and .NET, and a focus on easy client integration are core components.

    • 1
    • MCP
    • IO-Aerospace-software-engineering/mcp-server
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results