Skip to main content
Glama

mcp-datetime

by ZeparHyfar

mcp-datetime

Pythonバージョン MCPバージョン ライセンス

英語 |日本語

Claudeデスクトップアプリケーション用のMCPサーバーとして実装された日時フォーマットサービス。様々な形式の日時文字列の生成をサポートします。

注意:このパッケージはmacOSでのみテストされています。Windowsとの互換性は検証されていません。

前提条件

mcp-datetime を使用する前に、次のツールがインストールされていることを確認してください。

  • Python 3.12以降

  • uv (Python パッケージインストーラー)

  • uvx (Python パッケージ ランナー)

特徴

  • ✨ さまざまな日付時刻形式をサポート

  • 🇯🇵日本語サポート

  • 📁 ファイル名生成のための最適化された形式

  • 🌏 正確なタイムゾーン処理

  • 🔧 Claudeデスクトップアプリとのシームレスな統合

MCP サーバー コンポーネント

ツール

サーバーは 1 つのツールを実装します。

  • get_datetime : 現在の日付と時刻をさまざまな形式で取得する

    • 必須の文字列引数として「format」を取ります

    • 指定された形式に基づいてフォーマットされた日付時刻文字列を返します。

    • 標準、日本語、ISO形式を含む複数の形式をサポート

Claudeデスクトップアプリでの使用

設定ファイルに次の内容を追加します。

設定ファイルの場所 (macOS): ~/Library/Application Support/Claude/claude_desktop_config.json

{ "mcpServers": { "mcp-datetime": { "command": "uvx", "args": ["mcp-datetime"] } } }

インストールについて

パッケージを直接インストールする必要がある場合 (開発やソースコード検査など)、次のいずれかの方法を使用できます。

  • PyPIからインストール

    pip install mcp-datetime
  • GitHubソースからインストール

    git clone https://github.com/ZeparHyfar/mcp-datetime.git cd mcp-datetime pip install -e .
  • 手動インストール用のclaude_desktop_config.json

    { "mcpServers": { "mcp-datetime": { "command": "python", "args": ["-m", "mcp_datetime"], "env": { "PYTHON": "/path/to/your/python" } } } }

    「/path/to/your/python」を実際のPythonインタープリタのパスに置き換えます。

    例: "/usr/local/bin/python3" または "/Users/username/.pyenv/versions/3.12.0/bin/python3"

基本的な例

  • コマンド形式

    # Standard datetime format call datetime-service.get_datetime {"format": "datetime"} # Result: 2024-12-10 00:54:01 # Japanese format call datetime-service.get_datetime {"format": "datetime_jp"} # Result: 2024年12月10日 00時54分01秒 # Filename format call datetime-service.get_datetime {"format": "filename_md"} # Result: 20241210005401.md
  • Claude デスクトップ アプリのプロンプト例

    • ユーザー

      Please tell me the current time in date_slash format
    • クロード

      I'll get the current date in date_slash format. The current date is 2024/12/12

サポートされている形式

フォーマット名

説明

日付

2024年12月10日

標準的な日付形式

日付スラッシュ

2024年12月10日

スラッシュ付き日付

日付_jp

2024年12月10日

日本の日付形式

日時

2024年12月10日 00:54:01

標準日時

日付時刻_jp

2024年12月10日 00時54分01秒

日本の日付時刻

日付時刻t

2024年12月10日00:54:01

T 区切りの DateTime

コンパクト

20241210005401

IDのコンパクトなフォーマット

コンパクト日付

20241210

コンパクト日付のみ

コンパクトタイム

005401

コンパクトタイムのみ

ファイル名_md

20241210005401.md

マークダウンファイル名

ファイル名_txt

20241210005401.txt

テキストファイル名

ファイル名_log

20241210005401.log

ログファイル名

アイソ

2024-12-10T00:54:01+0900

ISO 8601形式

iso_basic

20241210T005401+0900

基本的なISOフォーマット

ログ

2024-12-10 00:54:01.123456

マイクロ秒単位のログ形式

ログコンパクト

20241210_005401

コンパクトログ形式

時間

00:54:01

時間のみ

時間_jp

00時54分01秒

日本の時刻形式

デバッグ

MCPサーバーはstdio経由で実行されるため、デバッグが困難になる場合があります。MCP Inspectorの使用をお勧めします。

  • PyPIパッケージの使用

    npx @modelcontextprotocol/inspector uvx mcp-datetime
  • GitHubからダウンロードしたソースコードを使用する

    git clone https://github.com/ZeparHyfar/mcp-datetime.git npx @modelcontextprotocol/inspector uvx --directory ./mcp-datetime run mcp-datetime

ライセンス

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

Deploy Server
A
security – no known vulnerabilities
-
license - not tested
A
quality - confirmed to work

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.

Claudeデスクトップアプリケーション用のMCPサーバーとして実装された日時フォーマットサービス。様々な形式の日時文字列の生成をサポートします。

  1. 前提条件
    1. 特徴
      1. MCP サーバー コンポーネント
        1. ツール
      2. Claudeデスクトップアプリでの使用
        1. インストールについて
          1. 基本的な例
            1. サポートされている形式
              1. デバッグ
                1. ライセンス

                  Related MCP Servers

                  • A
                    security
                    -
                    license
                    A
                    quality
                    A Claude MCP server that allows Claude to interact with your FreeAgent account to track time, manage timers, and handle timeslip operations.
                    Last updated -
                    1
                    MIT License
                    • Linux
                    • Apple
                  • -
                    security
                    -
                    license
                    -
                    quality
                    A Claude Model Configuration Protocol (MCP) server that provides real-time timezone-aware date and time information.
                    Last updated -
                  • A
                    security
                    -
                    license
                    A
                    quality
                    An MCP server that provides seamless integration with Claude Desktop for querying and managing timeseries data in GigAPI Timeseries Lake.
                    Last updated -
                    7
                    6
                  • A
                    security
                    -
                    license
                    A
                    quality
                    A simple MCP server that provides accurate date and time information to Claude models, ensuring they always use the correct current date and time when creating time-sensitive content.
                    Last updated -
                    3
                    • Apple

                  View all related MCP servers

                  MCP directory API

                  We provide all the information about MCP servers via our MCP API.

                  curl -X GET 'https://glama.ai/api/mcp/v1/servers/ZeparHyfar/mcp-datetime'

                  If you have feedback or need assistance with the MCP directory API, please join our Discord server