MCP Time Server
MCP タイムサーバー
概要
MCPタイムサーバーは、異なるタイムゾーン間で高度な時間関連ユーティリティを提供するために設計された、洗練されたPythonベースのマイクロサービスです。現在の時刻の取得や、様々なグローバルタイムゾーン間の時刻変換を行うための堅牢な機能を提供します。
Related MCP server: Time MCP Server
プロジェクトの詳細
バージョン: 0.1.1
Python 互換性: Python 3.11+
特徴
現在の時刻の取得: 任意の IANA タイムゾーンの現在の時刻を取得します
タイムゾーン変換: 異なるタイムゾーン間の時刻を変換します
包括的な検証:Pydanticモデルを使用した堅牢な入力検証
非同期サーバーアーキテクチャ: 効率的なパフォーマンスのために asyncio で構築
柔軟な構成:環境変数と構成ファイルを通じて構成可能
依存関係
コア依存関係:
mcp (>=1.6.0)
ピダンティック (>=2.11.2)
PyYAML (>=6.0.2)
pyz (>=0.4.3)
開発依存関係:
pytest (>=8.3.5)
インストール
前提条件
Python 3.11以上
ピップ
(オプション)仮想環境を推奨
PyPIからインストール
pip install chuk-mcp-time-serverソースからインストール
リポジトリをクローンします。
git clone <repository-url>
cd chuk-mcp-time-server仮想環境を作成します。
python -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`パッケージをインストールします。
pip install . # Installs the package in editable mode開発インストール
開発用に設定するには:
pip install .[dev] # Installs package with development dependenciesサーバーの実行
コマンドラインインターフェース
chuk-mcp-time-serverプログラムによる使用
from chuk_mcp_time_server.main import main
if __name__ == "__main__":
main()環境変数
NO_BOOTSTRAP: コンポーネントのブートストラップを無効にするように設定しますその他の設定オプションは設定ファイルで設定できます
利用可能なツール
1. 現在の時刻を取得する
入力:
timezone: IANAタイムゾーン名(例: 'America/New_York')
例:
get_current_time('Europe/London')戻り値:
指定されたタイムゾーンの現在の時刻
タイムゾーンの詳細
夏時間(DST)のステータス
2. 時間を変換する
入力:
source_timezone: ソースタイムゾーン(IANA形式)time: HH:MM (24時間)形式の時刻target_timezone: ターゲットタイムゾーン(IANA形式)
例:
convert_time('America/New_York', '14:30', 'Europe/Paris')戻り値:
ソース時間の詳細
目標時間の詳細
ゾーン間の時差
発達
コードのフォーマット
黒はコードのフォーマットに使用されます
isortはインポートソートに使用されます
行の長さは88文字に設定されています
テストの実行
pytest貢献
リポジトリをフォークする
機能ブランチを作成します(
git checkout -b feature/AmazingFeature)コードがフォーマットとテストに合格することを確認する
変更をコミットします(
git commit -m 'Add some AmazingFeature')ブランチにプッシュする (
git push origin feature/AmazingFeature)プルリクエストを開く
ライセンス
Maintenance
Related MCP Connectors
Timezone MCP — wraps timeapi.io (free, no auth)
Current time, timezone conversion & date math for AI agents. On Cloudflare Workers.
A real clock for AI agents: current time, timezone conversion, and DST facts from the IANA tzdb.
Current time in any IANA time zone, plus the full time-zone list. Via timeapi.io.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP server providing timezone conversions and time-related operations via RESTful API endpoints, featuring comprehensive error handling and timezone database integration.-
- AlicenseBqualityDmaintenanceProvides time and timezone functionality for LLMs, enabling them to get current time information across different timezones and convert times between zones.2MIT
- AlicenseNot gradedqualityCmaintenanceProvides time zone management utilities including retrieving current time in any global time zone and converting time between different time zones with automatic daylight saving time handling.125 npmMIT
- AlicenseAqualityDmaintenanceProvides accurate system time to LLM applications with multi-timezone support via a simple tool call.1MIT