Skip to main content
Glama
Date-time Tools MCP

Date-time Tools MCP

by abhi12299

日時ツール MCP

日時操作およびタイムゾーン変換のためのModel Context Protocol (MCP) サーバーです。

概要

このMCPサーバーは、タイムゾーン変換、日付の変更(算術演算)、現在の日時とタイムゾーンの取得など、日時文字列を扱うための一連のツールを提供します。堅牢で標準化された日時操作を必要とするアプリケーションやエージェントのバックエンドユーティリティとして設計されています。

ライブデプロイ: https://date-time-tools.iabhishek.workers.dev/mcp

Related MCP server: Time MCP Server

アーキテクチャ

このサーバーは Cloudflare Workers 上で動作し、Streamable HTTP トランスポート(レガシーなSSEエンドポイントも公開)を使用します。セッションごとの状態は、Cloudflareの agents McpAgent ラッパーを介してDurable Objectによってバックアップされます。

エンドポイント:

  • POST/GET/DELETE /mcp — Streamable HTTPトランスポート。セッションは mcp-session-id ヘッダーで追跡されます。

  • GET /sse, POST /sse/message — 古いクライアント用のレガシーSSEトランスポート。

ローカル開発

npm install
npm run dev   # wrangler dev — serves at http://127.0.0.1:8787/mcp

Cloudflareへのデプロイ

手動

初回セットアップ:

npx wrangler login

デプロイ:

npm run deploy

Wranglerが公開URLを表示します。このプロジェクトの場合は https://date-time-tools.iabhishek.workers.dev/mcp です。Workersの無料プランでこのサーバーをカバーできます(1日10万リクエストまで。Durable Objectsの無料枠でセッションストレージをカバー)。

自動化 (GitHub Actions)

.github/workflows/deploy.yml は、main へのプッシュごと(および手動の workflow_dispatch)にデプロイを行います。2つのリポジトリシークレットを設定してください:

  • CLOUDFLARE_API_TOKEN — https://dash.cloudflare.com/profile/api-tokens にて Edit Cloudflare Workers テンプレートを使用して作成

  • CLOUDFLARE_ACCOUNT_ID — Workers & Pagesダッシュボードのサイドバーで確認可能

MCPクライアントとの統合

Claude Code

claude mcp add date-time-tools --transport http https://date-time-tools.iabhishek.workers.dev/mcp

すべてのプロジェクトに登録するには --scope user を追加し、共同作業者と共有する .mcp.json をコミットするには --scope project を追加します。claude mcp list で確認してください。Claude Code内では /mcp を実行してステータスとツールを検査します。

汎用Streamable HTTPクライアント

Streamable HTTPトランスポートをサポートするクライアントを設定し、デプロイされたURLを指定します:

{
  "mcpServers": {
    "date-time-tools": {
      "url": "https://date-time-tools.iabhishek.workers.dev/mcp"
    }
  }
}

stdioのみをサポートするクライアントの場合は、mcp-remote でブリッジします:

{
  "mcpServers": {
    "date-time-tools": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://date-time-tools.iabhishek.workers.dev/mcp"]
    }
  }
}

利用可能なツール

このMCPサーバーは、LLM向けに以下のツールを提供します:

  • convertTimezones: 日時文字列をあるタイムゾーンから別のタイムゾーンへ変換します。

  • mutateDate: 日時文字列に対して、日、時間、分、月、または年を加算または減算します。

  • currentDateTimeAndTimezone: 現在の日付、時刻、タイムゾーンを取得します。


🧪 MCP Inspectorによるテスト

npm run dev を実行し、別のターミナルで以下を実行します:

npx -y @modelcontextprotocol/inspector

Streamable HTTP トランスポートを選択し、URLとして http://127.0.0.1:8787/mcp を使用します。


機能

  • タイムゾーン変換
    Luxon互換の形式を使用して、日時文字列をあるIANAタイムゾーンから別のタイムゾーンへ変換します。

  • 日付の変更
    日時文字列に対して、日、時間、分、月、または年を加算または減算します。

  • 現在の日時とタイムゾーン
    ユーザー/システムの現在の日付、時刻、タイムゾーンを取得します。

Available Tools

3 tools
convertTimezonesA

Converts a date time string from one timezone to another.

  • The date time string must follow luxon date-time format: yyyy-MM-dd hh:mm:ss a. Example: 2025-06-16 10:00:00 pm.

  • The timezones must be valid IANA timezones. Example: Asia/Calcutta, America/New_York.

  • You must first invoke the tool named "currentDateTimeAndTimezone" to get the current date, time and timezone of the user if they don't specify the date or time explicitly or use relative date or time (i.e. in an hour/today/tomorrow/yesterday/next week/next month/next year etc.).

Inputs: dateTime (required), fromZone (required), toZone (required).

currentDateTimeAndTimezoneB

Gets the current date, time and timezone of the user.

Inputs: no named parameters.

mutateDateA

Mutates a date time string by adding or subtracting days, hours, minutes, months, or years.

  • The date time string must follow luxon date-time format: yyyy-MM-dd hh:mm:ss a. Example: 2025-06-16 10:00:00 pm.

  • The update object must be a valid update object. Example: { days: -1, hours: 2, minutes: 3, months: 4, years: 5 }.

  • You must first invoke the tool named "currentDateTimeAndTimezone" to get the current date, time and timezone of the user if they don't specify an absolute date or time explicitly (today/tomorrow/yesterday/next week/next month/next year etc. is not absolute date or time).

Inputs: dateTime (required), update (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: convertTimezones handles timezone conversion, currentDateTimeAndTimezone retrieves current datetime and timezone, and mutateDate performs date arithmetic. There is no overlap or ambiguity between these functions.

    Naming Consistency4/5

    Two tools use camelCase (convertTimezones, currentDateTimeAndTimezone) while one uses snake_case (mutateDate), creating a minor inconsistency. However, all names are descriptive and follow a verb_noun pattern, making them readable despite the mixed conventions.

    Tool Count3/5

    With only 3 tools, the set feels thin for a date-time utility server. While the tools cover core operations, additional functions like parsing, formatting, or comparing dates would enhance completeness. The count is borderline but manageable.

    Completeness3/5

    The tools cover conversion, retrieval, and mutation, but there are notable gaps such as date parsing from various formats, date comparison, duration calculation, or formatting. Agents may struggle with tasks requiring these missing operations, though core workflows are supported.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      Gives large language models time awareness capabilities through various time-related functions including current time retrieval, timezone conversion, and relative time calculations.
      6
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      Provides time and timezone functionality for LLMs, enabling them to get current time information across different timezones and convert times between zones.
      2
      MIT
    • A
      license
      B
      quality
      C
      maintenance
      Provides time and date functionality with support for multiple formats and timezones, enabling users to get current time/date, format timestamps, and retrieve comprehensive datetime information.
      4
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides current date and time information in multiple formats, timezone conversion, date/time differences, and date calculations.
      1
      MIT