Skip to main content
Glama

mcp-datetime

by ZeparHyfar

mcp-datetime

英語 |日本語

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日スラッシュ付き日付
日付_jp2024年12月10日日本の日付形式
日時2024年12月10日 00:54:01標準日時
日付時刻_jp2024年12月10日 00時54分01秒日本の日付時刻
日付時刻t2024年12月10日00:54:01T 区切りの DateTime
コンパクト20241210005401IDのコンパクトなフォーマット
コンパクト日付20241210コンパクト日付のみ
コンパクトタイム005401コンパクトタイムのみ
ファイル名_md20241210005401.mdマークダウンファイル名
ファイル名_txt20241210005401.txtテキストファイル名
ファイル名_log20241210005401.logログファイル名
アイソ2024-12-10T00:54:01+0900ISO 8601形式
iso_basic20241210T005401+0900基本的なISOフォーマット
ログ2024-12-10 00:54:01.123456マイクロ秒単位のログ形式
ログコンパクト20241210_005401コンパクトログ形式
時間00:54:01時間のみ
時間_jp00時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ファイルを参照してください。

Install Server
A
security – no known vulnerabilities
A
license - permissive license
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
                    A
                    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 -
                    7
                    1
                    JavaScript
                    MIT License
                    • Linux
                    • Apple
                  • -
                    security
                    F
                    license
                    -
                    quality
                    A Claude Model Configuration Protocol (MCP) server that provides real-time timezone-aware date and time information.
                    Last updated -
                    Python
                  • A
                    security
                    F
                    license
                    A
                    quality
                    A server built on mcp-framework that enables integration with Claude Desktop through the Model Context Protocol.
                    Last updated -
                    1
                    1
                    • Apple
                  • A
                    security
                    F
                    license
                    A
                    quality
                    A server built with mcp-framework that allows users to extend Claude's capabilities by adding custom tools that can be used through the Claude Desktop client.
                    Last updated -
                    3
                    340
                    TypeScript

                  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