mcp-time is a Model Context Protocol (MCP) server used to let AI assistants interact with time. It acts as a bridge between AI tools and a time-processing backend, enabling AI to perform complex time operations through natural language.
Purpose The server provides standardized tools for AI assistants and other MCP clients to perform time- and date-related operations, such as getting the current time, time zone conversion, time addition and subtraction, natural language time parsing, and time comparison.
Main capabilities
- Time operations: get the current time, convert between different time zones, add or subtract durations.
- Natural language parsing: understand relative time expressions such as "yesterday", "next month", and "5 minutes ago".
- Time comparison: compare two times and determine which is earlier or later, or whether they are equal, with support for time zone-aware comparison.
- Flexible formatting: support multiple predefined formats and custom time formats (such as RFC3339, Kitchen, or a custom Go layout).
- MCP compliance: fully compatible with the Model Context Protocol standard.
- Multiple transport methods: support stdio for local integration and HTTP stream for network access.
Provided tools
- get_current_time: get the current time in any time zone and format.
- format (optional): output format, which can be a predefined format (such as RFC3339, Kitchen) or a custom Go layout.
- timezone (optional): target time zone, in IANA format (such as America/New_York), default UTC.
- Example: "What time is it in Tokyo?"
- get_relative_time: get a time based on a natural language relative expression.
- text (required): natural language expression (such as yesterday, 5 minutes ago, next month).
- time (optional): the reference time for the expression, default current time.
- timezone (optional): the target time zone for output.
- format (optional): time output format.
- Example: "What was the date 3 weeks ago?"
- convert_timezone: convert a given time between time zones.
- time (required): input time string (supports multiple formats).
- input_timezone (optional): the time zone of the input time.
- output_timezone (optional): the target time zone for output.
- Example: "Convert 2:30 PM EST to Tokyo time"
- add_duration: add or subtract a duration to or from a given time.
- time (required): input time string.
- duration (required): the duration to add/subtract (such as 2h30m, -1h, 24h).
- Example: "What time will it be in 45 minutes?"
- compare_time: compare two times and determine their relationship, with support for time zone-aware comparison.
- time_a (required): the first time to compare.
- time_a_timezone (optional): the time zone of time_a, in IANA format (such as America/New_York).
- time_b (required): the second time to compare.
- time_b_timezone (optional): the time zone of time_b, in IANA format (such as Europe/London).
- Returns: -1 means time_a is earlier than time_b; 0 means equal; 1 means time_a is later than time_b.
- Example: "Is 3 PM EST before 8 PM GMT?"
Usage This MCP server can be integrated into various AI assistant clients that support the Model Context Protocol, including Cursor, Claude Desktop, Claude Code, and others.
Multiple installation and configuration methods are provided:
- One-click installation (Cursor): automatically configure the MCP server via a button using Docker.
- Using npx (JavaScript/Node.js): requires Node.js to be installed; copy the corresponding JSON configuration into the MCP client settings.
- Docker: run the MCP server in an isolated container; requires Docker to be installed,Copy the corresponding JSON configuration into the MCP client settings.
- Install the mcp-time binary directly: place the binary in a PATH directory and add the corresponding JSON configuration.
- Download the latest prebuilt binary from the releases page.
- Go developers can install it with go install; the binary will be installed to the $GOPATH/bin directory.
- Clone and build the project with make; the binary will be installed to ~/.local/bin/mcp-time.
Startup methods:
- Use stdio transport (default, for MCP clients).
- Use HTTP stream transport (for network access).
Command-line options: The server supports corresponding flags for advanced configuration (the specific flags are not listed in the material).
Hosted deployment A hosted deployment is available on Fronteir AI.
Use cases
- Let AI assistants answer the current time and the time in a specified time zone.
- Convert time between different time zones.
- Parse relative time expressions such as "yesterday" and "next month".
- Perform addition and subtraction calculations on time, for example, "what time will it be in 45 minutes".
- Compare the order of two times.
Limitations
- An MCP-capable client is required for integration.
- Some installation methods depend on Node.js or Docker.
- The material does not provide specific pricing, platform limitations, or performance metrics.
Project information
- Name: mcp-time
- Repository:https://github.com/TheoBrigitte/mcp-time
- License: MIT License (see the LICENSE file for details)
- Libraries used: araddon/dateparse, tj/go-naturaldate, mark3labs/mcp-go.