Cover image
Try Now
2025-03-19

A Model Context Protocol server that provides time-related capabilities.

3 years

Works with Finder

1

Github Watches

2

Github Forks

5

Github Stars

Time MCP Server

A Model Context Protocol server that provides time-related capabilities. This server enables LLMs to access current time information and convert times between different timezones. This is a Swift implementation of a time MCP server using the MCP Swift SDK.

Swift Platform License

✨ Features

  • Current Time Queries: Get the current time in any timezone
  • Time Zone Conversions: Convert time between different timezones
  • Daylight Saving Time Information: Check if a timezone is currently in DST
  • Time Difference Calculation: Get the time difference between timezones when converting

Available Tools

  • get_current_time - Get the current time in a specific timezone

    • timezone (string, required): IANA timezone name (e.g., 'America/New_York', 'Europe/London'). If empty or not provided, the system timezone will be used.
  • convert_time - Convert time between timezones

    • source_timezone (string, required): Source IANA timezone name. If empty or not provided, the system timezone will be used.
    • time (string, required): Time to convert in 24-hour format (HH:MM)
    • target_timezone (string, required): Target IANA timezone name. If empty or not provided, the system timezone will be used.

Installation

Option 1: One-Line Installation (curl)

The easiest way to install is with the one-line installer, which automatically downloads the latest version and installs it to ~/.local/bin in your home directory:

curl -fsSL https://raw.githubusercontent.com/okooo5km/time-mcp-server/main/install.sh | bash

The installer will:

  • Create ~/.local/bin if it doesn't exist
  • Add this directory to your PATH (in .zshrc or .bashrc)
  • Download and install the latest version
  • Make the binary executable

Option 2: Build from Source

  1. Clone the repository:

    git clone https://github.com/okooo5km/time-mcp-server.git
    cd time-mcp-server
    
  2. Build the project:

    swift build -c release
    
  3. Install the binary:

    # Install to user directory (recommended, no sudo required)
    mkdir -p ~/.local/bin
    cp $(swift build -c release --show-bin-path)/time-mcp-server ~/.local/bin/
    

    Make sure ~/.local/bin is in your PATH by adding to your shell configuration file:

    echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc  # or ~/.bashrc
    source ~/.zshrc  # or source ~/.bashrc
    

Command Line Arguments

The server supports the following command line arguments:

  • -h, --help: Display help information about the server, its usage, and available options
  • -v, --version: Display the version number of the time-mcp-server

Example usage:

# Display help information
time-mcp-server --help

# Display version information
time-mcp-server --version

Configure for Claude.app

Add to your Claude settings:

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

Configure for Cursor

Add the following configuration to your Cursor editor's Settings - mcp.json:

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

cursor

Configure for ChatWise

Add the memory MCP server to your Chatwise Settings - Tools.

chatwise-settings-tools

Example System Prompt

You can use the following system prompt to help Claude utilize the time-mcp-server effectively:

You have access to time-related tools through MCP. Use these to help users:

- Get the current time in any timezone
- Convert times between timezones
- Calculate time differences between locations
- Plan meetings across different timezones

Use the following tools appropriately:
- `get_current_time` for checking the current time in a specific timezone
- `convert_time` when the user needs to convert between timezones

Always use proper IANA timezone names (e.g., 'America/New_York', 'Europe/London', 'Asia/Tokyo') 
rather than abbreviations or common names.

Development Requirements

  • Swift 6.0 or later
  • macOS 14.0 or later
  • MCP Swift SDK 0.2.0 or later

Usage Examples

Getting Current Time

{
  "timezone": "America/New_York"
}

Response:

{
  "timezone": "America/New_York",
  "datetime": "2024-11-05T14:30:45-05:00",
  "is_dst": false
}

Converting Time

{
  "source_timezone": "America/Los_Angeles",
  "time": "15:30",
  "target_timezone": "Asia/Tokyo"
}

Response:

{
  "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"
}

Use Cases

  • International Meeting Planning: Schedule meetings across different timezones
  • Travel Planning: Check local times at destination
  • Remote Work Coordination: Coordinate work hours with international teams
  • Event Scheduling: Set up global events with correct local times
  • Time-Sensitive Operations: Ensure operations happen at the correct local time

Version History

See GitHub Releases for version history and changelog.

☕️ Support the Project

If you find time-mcp-server helpful, please consider supporting its development:

  • ⭐️ Star the project on GitHub
  • 🐛 Report bugs or suggest features
  • 💝 Support via:

License

time-mcp-server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License.

About

A Swift implementation of a time server for Model Context Protocol (MCP), enabling AI assistants to access current time information and convert between timezones. This project is built using the MCP Swift SDK.

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Khalid kalib
  • Write professional emails

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • Yasir Eryilmaz
  • AI scriptwriting assistant for short, engaging video content.

  • J. DE HARO OLLE
  • Especialista en juegos de palabras en varios idiomas.

  • Daren White
  • A supportive coach for mastering all Spanish tenses.

  • albert tan
  • Japanese education, creating tailored learning experiences.

  • ShrimpingIt
  • Micropython I2C-based manipulation of the MCP series GPIO expander, derived from Adafruit_MCP230xx

  • huahuayu
  • A unified API gateway for integrating multiple etherscan-like blockchain explorer APIs with Model Context Protocol (MCP) support for AI assistants.

  • deemkeen
  • control your mbot2 with a power combo: mqtt+mcp+llm

  • zhaoyunxing92
  • 本项目是一个钉钉MCP(Message Connector Protocol)服务,提供了与钉钉企业应用交互的API接口。项目基于Go语言开发,支持员工信息查询和消息发送等功能。

  • apappascs
  • Discover the most comprehensive and up-to-date collection of MCP servers in the market. This repository serves as a centralized hub, offering an extensive catalog of open-source and proprietary MCP servers, complete with features, documentation links, and contributors.

  • justmywyw
  • Short and sweet example MCP server / client implementation for Tools, Resources and Prompts.

    Reviews

    1 (1)
    Avatar
    user_sTrq5Rag
    2025-04-16

    MathCAD MCP Server by hvkshetry is an exceptional tool for anyone dealing with complex mathematical computations. The interface is user-friendly and the server speed is impressive. It streamlines workflows and enhances productivity significantly. Definitely worth checking out!