Time MCP Server

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

時間MCPサーバー

時刻とタイムゾーンの変換機能を提供するモデルコンテキストプロトコルサーバー。このサーバーにより、LLMは現在の時刻情報を取得し、IANAタイムゾーン名を使用してタイムゾーン変換を実行できます。また、システムによるタイムゾーンの自動検出も可能です。

利用可能なツール

  • get_current_time - 特定のタイムゾーンまたはシステムタイムゾーンの現在の時刻を取得します。
    • 必要な引数:
      • timezone (文字列): IANAタイムゾーン名(例: 'America/New_York'、'Europe/London')
  • convert_time - タイムゾーン間で時間を変換します。
    • 必要な引数:
      • source_timezone (文字列): ソースIANAタイムゾーン名
      • time (文字列): 24時間形式の時刻 (HH:MM)
      • target_timezone (文字列): ターゲットのIANAタイムゾーン名

インストール

uvの使用(推奨)

uvを使用する場合、特別なインストールは必要ありません。uvx uvx使用してmcp-server-timeを直接実行します。

PIPの使用

あるいは、pip 経由でtime-mcp-localをインストールすることもできます。

pip install time-mcp-local

インストール後、次のコマンドを使用してスクリプトとして実行できます。

python -m time-mcp-local

構成

Claude.app 用に設定する

Claude 設定に追加:

"mcpServers": { "time": { "command": "uvx", "args": ["time-mcp-local"] } }
"mcpServers": { "time": { "command": "python", "args": ["-m", "time_mcp_local"] } }

Zed用の設定

Zed のsettings.jsonに追加します:

"context_servers": [ "mcp-server-time": { "command": "uvx", "args": ["time-mcp-local"] } ],
"context_servers": { "mcp-server-time": { "command": "python", "args": ["-m", "time_mcp_local"] } },

カスタマイズ - システムタイムゾーン

デフォルトでは、サーバーはシステムのタイムゾーンを自動的に検出します。設定argsの引数リストに--local-timezone引数を追加することで、この設定を上書きできます。

例:

{ "command": "python", "args": ["-m", "time_mcp_local", "--local-timezone=America/New_York"] }

やり取りの例

  1. 現在の時刻を取得します:
{ "name": "get_current_time", "arguments": { "timezone": "Europe/Warsaw" } }

応答:

{ "timezone": "Europe/Warsaw", "datetime": "2024-01-01T13:00:00+01:00", "is_dst": false }
  1. タイムゾーン間の時間を変換します:
{ "name": "convert_time", "arguments": { "source_timezone": "America/New_York", "time": "16:30", "target_timezone": "Asia/Tokyo" } }

応答:

{ "source": { "timezone": "America/New_York", "datetime": "2024-01-01T12:30:00-05:00", "is_dst": false }, "target": { "timezone": "Asia/Tokyo", "datetime": "2024-01-01T12:30:00+09:00", "is_dst": false }, "time_difference": "+13.0h", }

デバッグ

MCPインスペクタを使用してサーバーをデバッグできます。UVXインストールの場合:

npx @modelcontextprotocol/inspector uvx time-mcp-local

または、パッケージを特定のディレクトリにインストールした場合や、そのディレクトリで開発している場合は、次のようにします。

cd path/to/servers/src/time npx @modelcontextprotocol/inspector uv run time-mcp-local

クロードへの質問例

  1. 「今何時ですか?」(システムのタイムゾーンを使用します)
  2. 「東京は何時ですか?」
  3. 「ニューヨークが午後4時のとき、ロンドンは何時ですか?」
  4. 「東京時間午前9時30分をニューヨーク時間に変換」

建てる

uv build --wheel uv publish --token xxx

You must be authenticated.

A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

時間とタイムゾーンの変換機能を提供するモデル コンテキスト プロトコル サーバー。LLM が現在の時間情報を取得し、IANA タイムゾーン名を使用してタイムゾーン変換を実行できるようになります。

  1. Available Tools
    1. Installation
      1. Using uv (recommended)
      2. Using PIP
    2. Configuration
      1. Configure for Claude.app
      2. Configure for Zed
      3. Customization - System Timezone
    3. Example Interactions
      1. Debugging
        1. Examples of Questions for Claude
          1. build
            ID: kjg67t02vg