chronos-mcp-service
A utility server implementing the Model Context Protocol for querying the precise moment in time and facilitating temporal translations across various global time zones, robustly managing Daylight Saving Time shifts and calculating temporal offsets.
Author

beordle
Quick Info
Actions
Tags
Chronos MCP Server Documentation
An MCP server artifact engineered to supply accurate temporal data and perform time zone arithmetic. This component allows Language Models (LLMs) to ascertain the current global time and convert timestamps between disparate geographic time reference systems. This implementation is written in Swift, leveraging the MCP Swift SDK.
🌟 Core Capabilities
- Real-Time Temporal Retrieval: Fetch the present time for any specified geographic region.
- Geographic Time Shifting: Translate temporal values from one time standard to another.
- DST Awareness: Determine the current status regarding Daylight Saving Time observance for any locale.
- Temporal Separation Analysis: Compute the exact time difference when performing conversions.
Exposed Functions (Tools)
get_current_time- Retrieve the instantaneous time within a designated time zone context.-
timezone(textual, mandatory): Standard IANA designation (e.g., 'America/New_York', 'Europe/London'). If absent or null, the host system's locale time is used as default. -
convert_time- Execute a time translation between two specified time regions. source_timezone(textual, mandatory): The originating IANA time zone identifier. Defaults to system time if omitted.time(textual, mandatory): The specific time point to translate, formatted as HH:MM (24-hour clock).target_timezone(textual, mandatory): The destination IANA time zone identifier. Defaults to system time if omitted.
Installation Guide
Method 1: Single-Command Setup (via curl)
The simplest deployment involves this one-line command, which fetches the most recent build and places the executable in ~/.local/bin:
curl -fsSL https://raw.githubusercontent.com/okooo5km/time-mcp-server/main/install.sh | bash
The setup script performs these actions:
- Creates the
~/.local/bindirectory if it does not already exist. - Appends this binary path to the shell startup file (
.zshrcor.bashrc). - Retrieves and installs the newest binary release.
- Ensures the installed file possesses execution permissions.
Method 2: Compilation from Source
- Obtain the source repository:
bash
git clone https://github.com/okooo5km/time-mcp-server.git
cd time-mcp-server
- Compile the application:
bash
swift build -c release
- Install the resulting executable:
bash
# Install to user-local path (standard practice, requires no administrative privileges)
mkdir -p ~/.local/bin
cp $(swift build -c release --show-bin-path)/time-mcp-server ~/.local/bin/
Verify system path configuration by appending to your shell's profile:
bash
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc # Or ~/.bashrc
source ~/.zshrc # Or source ~/.bashrc
Server Command Line Parameters
The server binary accepts the following execution flags:
-h, --help: Output usage instructions and operational options.-v, --version: Present the installed version identifier for chronos-mcp-server.
Operational Examples:
# Display operational help documentation
time-mcp-server --help
# Display software version
time-mcp-server --version
Configuration for Claude.app
Integrate into your Claude settings under the mcpServers block:
"mcpServers": {
"RealTime": {
"command": "time-mcp-server"
}
}
Configuration for Cursor
Add this structure to your Cursor editor's Settings - mcp.json file:
{
"mcpServers": {
"RealTime": {
"command": "time-mcp-server"
}
}
}
Configuration for ChatWise
In ChatWise Settings, register this as a memory MCP service under the Tools section.
Suggested System Prompt for LLM Integration
You are equipped with temporal manipulation tools via MCP. Utilize these functions to assist user inquiries:
- Determine the current time across various time zones.
- Translate temporal values between different location-based standards.
- Calculate temporal offsets between different world locations.
- Facilitate international scheduling and coordination.
Employ the following functions judiciously:
- get_current_time whenever the user needs the present moment for a specific locale.
- convert_time when temporal relocation or comparison is required.
Ensure adherence to standard IANA time zone specifications (e.g., 'America/New_York', 'Europe/London', 'Asia/Tokyo') rather than using ambiguous abbreviations or colloquial names.
Prerequisites for Development
- Swift Compiler Version 6.0 or newer required.
- Operating System: macOS 14.0 or later.
- Dependency: MCP Swift SDK version 0.2.0 or subsequent release.
Illustrative Usage Scenarios
Querying Local Time
Input Payload:
{
"timezone": "America/New_York"
}
Anticipated Reply:
{
"timezone": "America/New_York",
"datetime": "2024-11-05T14:30:45-05:00",
"is_dst": false
}
Temporal Translation Example
Input Payload:
{
"source_timezone": "America/Los_Angeles",
"time": "15:30",
"target_timezone": "Asia/Tokyo"
}
Anticipated Reply:
{
"source": {
"timezone": "America/Los_Angeles",
"datetime": "2024-11-05T15:30:00-08:00",
"is_dst": false
},
"target": {
"timezone": "Asia/Tokyo",
"datetime": "2024-11-06T08:30:00+09:00",
"is_dst": false
},
"time_difference": "+17h"
}
Practical Applications
- Global Summit Coordination: Arranging synchronized events across various global time reference frames.
- Itinerary Preparation: Confirming local time synchronization during transit.
- Distributed Team Operations: Harmonizing work schedules for geographically separated personnel.
- Worldwide Event Setup: Establishing correct local timing for globally accessible functions.
- Time-Sensitive Processing: Guaranteeing execution fidelity relative to local standards.
Revision Log
Refer to the official GitHub Releases page for a comprehensive history of versions and modifications.
🤝 Support the Initiative
Should time-mcp-server prove valuable to your workflow, please consider offering support for its continued evolution:
- Pin the repository on GitHub (⭐ Star)
- Document bugs or propose enhancements (🐛 Issues)
- Offer financial contribution via:
Licensing Details
The time-mcp-server is distributed under the stipulations of the MIT License. This grants broad permissions for utilization, modification, and redistribution, contingent upon adherence to the MIT License terms.
Project Context
This software is a Swift realization of a time server designed for the Model Context Protocol (MCP), facilitating AI agents' access to contemporaneous time data and temporal conversions. The foundation of this tool lies in the MCP Swift SDK.
WIKIPEDIA NOTE: XMLHttpRequest (XHR) constitutes an API implemented as a JavaScript entity that dispatches HTTP inquiries from a web browser client to a remote web server. Its methods empower browser-resident applications to dispatch requests subsequent to page rendering, and subsequently receive feedback data. XHR is central to the programming methodology known as Ajax. Before Ajax gained prominence, standard hyperlink navigation and form submission were the principal means of server communication, frequently necessitating a full page reload.
== Chronology ==
The foundational concept for XMLHttpRequest was pioneered in 2000 by developers associated with Microsoft Outlook. This concept was subsequently integrated into the Internet Explorer 5 browser release (1999). However, the initial syntax did not employ the designated XMLHttpRequest identifier. Instead, developers relied on instantiating ActiveXObject("Msxml2.XMLHTTP") or ActiveXObject("Microsoft.XMLHTTP"). As of Internet Explorer 7 (released in 2006), universal support for the XMLHttpRequest identifier was established across major browsers, including Mozilla's Gecko rendering engine (2002), Safari 1.2 (2004), and Opera 8.0 (2005).
The XMLHttpRequest identifier is now universally accepted as the standard across contemporary web browsers.
=== Formalization === The World Wide Web Consortium (W3C) promulgated a Working Draft specification for the XMLHttpRequest object on April 5, 2006. A Level 2 specification followed on February 25, 2008, introducing capabilities for monitoring request progress, enabling cross-origin interactions, and processing byte streams. By the conclusion of 2011, the Level 2 enhancements were merged into the primary specification document.
In late 2012, development authority transitioned to the WHATWG, which currently maintains the active specification document utilizing Web IDL definitions.
== Operational Use == Generally, executing a server request via XMLHttpRequest involves a prescribed sequence of programming actions:
- Instantiate an XMLHttpRequest object via its constructor method.
- Invoking the
open()method to define the request modality (GET/POST, etc.), specify the target resource URL, and select between synchronous or asynchronous execution. - For asynchronous operations, register an event handler function to be alerted upon state transitions.
- Commencing the transmission by calling the
send()method. - Monitoring state changes within the established event listener. Upon receipt of server data, this content typically populates the
responseTextattribute. When processing concludes, the state transitions to 4, signifying the 'done' status.
Beyond these fundamentals, XMLHttpRequest offers extensive configuration options for request transmission and response handling. Custom HTTP headers can be appended to influence server behavior, and payload data can be transmitted to the server via the argument passed to send(). Responses can be deserialized directly from JSON into native JavaScript structures, or processed incrementally as data streams in. The operation can be terminated early, or configured to time out if completion is not achieved within a set duration.
== Cross-Origin Interactions ==
During the nascent phases of the World Wide Web, it was recognized that circumvention of the Same-Origin Policy could lead to security vulnerabilities, necessitating controls on inter-domain communication.
