这是一个基于Model Context Protocol(MCP)协议的标准时间区转换和时间相关操作服务器,使用Python编写,可实现获取特定时区的当前时间、时区转换等功能。
本时间服务器可通过Smithery自动安装,也能手动安装。安装完成后,即可启动服务器并使用其提供的API进行时间相关操作。
通过Smithery自动安装Claude桌面的时间服务器:
npx -y @smithery/cli install @clssck/mcp-time-server --client claude
pip install .
启动服务器:
python -m time_server
get_current_time获取特定时区的当前时间。 参数:
timezone:字符串 - IANA时区标识符(例如“America/New_York”)
返回:convert_time在时区之间转换时间。 参数:
time:字符串 - 要转换的时间,ISO 8601格式from_timezone:字符串 - 源时区to_timezone:字符串 - 目标时区
返回:pip install -e .[dev]
pytest
ruff check .
mypy src
本项目采用MIT许可证。
本项目遵循Contributor Covenant的行为准则。参与本项目意味着您应遵守此准则。