Skip to main content
Glama
MCP DateTime

MCP DateTime

by odgrim

MCP 日時

エージェント システムとチャット REPL に日時とタイムゾーン情報を提供するモデル コンテキスト プロトコル (MCP) サーバーの TypeScript 実装。

概要

MCP DateTimeは、モデルコンテキストプロトコルを実装したシンプルなサーバーで、AIエージェントとチャットインターフェースに日時とタイムゾーン情報を提供します。これにより、AIシステムは以下のことが可能になります。

  • ローカルシステムのタイムゾーンで現在の時刻を取得します

  • 有効なタイムゾーンの現在の時刻を取得します

  • 利用可能なすべてのタイムゾーンを一覧表示する

  • URIリソースを通じてタイムゾーン情報にアクセスする

Related MCP server: Time Tools MCP Server

インストール

npmから

npm install -g mcp-datetime

出典

git clone https://github.com/odgrmi/mcp-datetime.git
cd mcp-datetime
npm install
npm run build

使用法

コマンドライン

MCP DateTime は次の 2 つのモードで実行できます。

1. 標準I/Oモード(デフォルト)

このモードは、標準入出力を介して MCP プロトコルをサポートする AI システムとの統合に最適です。

mcp-datetime

2. サーバー送信イベント(SSE)モード

このモードでは、MCP プロトコル用の SSE トランスポートを提供する HTTP サーバーが起動します。

mcp-datetime --sse

カスタム ポートと URI プレフィックスを指定することもできます。

mcp-datetime --sse --port=8080 --prefix=/api/datetime

環境変数

  • PORT : SSEモードのポートを設定します(デフォルト: 3000)

  • URI_PREFIX : SSEモードのURIプレフィックスを設定します(デフォルト: なし)

利用可能なツール

MCP DateTime は次のツールを提供します。

get-current-time

システムのローカルタイムゾーンの現在の時刻を返します。

get-current-timezone

現在のシステムタイムゾーンを返します。

get-time-in-timezone

指定されたタイムゾーンの現在の時刻を返します。

パラメータ:

  • timezone : 現在の時刻を取得するタイムゾーン(例:"America/New_York")

list-timezones

利用可能なすべてのタイムゾーンのリストを返します。

リソースURI

MCP DateTime は、リソース URI を通じてタイムゾーン情報へのアクセスも提供します。

datetime://{timezone}

指定されたタイムゾーンの現在の時刻を返します。

例: datetime://America/New_York

datetime://list

利用可能なすべてのタイムゾーンのリストを返します。

一般的なタイムゾーン

次の一般的なタイムゾーンは常に利用可能です。

  • UTC

  • ヨーロッパ/ロンドン

  • ヨーロッパ/パリ

  • ヨーロッパ/ベルリン

  • アメリカ/ニューヨーク

  • アメリカ/シカゴ

  • アメリカ/デンバー

  • アメリカ/ロサンゼルス

  • アジア/東京

  • アジア/上海

  • アジア/コルカタ

  • オーストラリア/シドニー

  • パシフィック/オークランド

SSEエンドポイント

SSE モードで実行する場合、次のエンドポイントが利用できます。

  • /sse : SSE接続エンドポイント

  • /message : クライアントとサーバー間の通信のメッセージエンドポイント

  • /info : 基本的なサーバー情報

URI プレフィックスが指定されている場合は、すべてのエンドポイントの先頭に追加されます。

AIシステムとの統合

MCP DateTimeは、モデルコンテキストプロトコルをサポートするAIシステムと統合できます。これにより、AIエージェントは正確なタイムゾーンと日時情報にアクセスできます。

発達

前提条件

  • Node.js 14.16以上

  • npm

設定

git clone https://github.com/odgrim/mcp-datetime.git
cd mcp-datetime
npm install

建てる

npm run build

開発モードで実行

npm run dev        # Standard I/O mode
npm run dev:sse    # SSE mode

ライセンス

このプロジェクトは、Mozilla Public License 2.0 に基づいてライセンスされています。詳細については、 LICENSEファイルを参照してください。

Available Tools

4 tools
get-current-timeB

Get the current time in the configured local timezone

Inputs: no named parameters.

get-current-timezoneB

Get the current system timezone

Inputs: no named parameters.

get-time-in-timezoneC

Get the current time in a specific timezone

Inputs: timezone (required).

list-timezonesB

List all available timezones

Inputs: no named parameters.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 4 tools

    Disambiguation5/5

    Every tool has a clearly distinct purpose with no ambiguity: get-current-time retrieves local time, get-current-timezone returns the system timezone, get-time-in-timezone fetches time for a specified zone, and list-timezones enumerates available zones. The descriptions make it impossible to confuse these tools.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern with hyphens (e.g., get-current-time, list-timezones). This predictable naming scheme enhances readability and agent usability without any deviations.

    Tool Count5/5

    With 4 tools, the server is well-scoped for handling date/time operations. Each tool earns its place by covering core functionalities: retrieving time, managing timezones, and listing options, making the count appropriate for the domain.

    Completeness5/5

    The tool surface provides complete coverage for basic date/time operations: it supports getting current time (locally and in specific zones), accessing timezone information, and listing all available zones. There are no obvious gaps for this focused purpose.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A TypeScript server that provides time-related tools through the Model Context Protocol, allowing users to get current time in various timezones and convert times between different IANA timezones.
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      A Model Context Protocol server that provides time and timezone conversion capabilities, enabling LLMs to get current time information and perform timezone conversions using IANA timezone names.
      2
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      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 back
      72 npm
      25
      MIT