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 服务器
提供时间和时区转换功能的模型上下文协议 (MLM) 服务器。该服务器使 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
直接运行mcp-server-time 。
使用 PIP
或者,您可以通过 pip 安装time-mcp-local
:
Copy
安装后,您可以使用以下命令将其作为脚本运行:
Copy
配置
为 Claude.app 配置
添加到您的 Claude 设置:
Copy
Copy
为 Zed 配置
添加到您的 Zed settings.json:
Copy
Copy
自定义 - 系统时区
默认情况下,服务器会自动检测您系统的时区。您可以通过在配置文件的args
列表中添加参数--local-timezone
来覆盖此设置。
例子:
Copy
交互示例
- 获取当前时间:
Copy
回复:
Copy
- 在时区之间转换时间:
Copy
回复:
Copy
调试
您可以使用 MCP 检查器来调试服务器。对于 uvx 安装:
Copy
或者,如果您已将软件包安装在特定目录中或正在其上进行开发:
Copy
克劳德的问题示例
- “现在几点?”(将使用系统时区)
- “东京现在几点?”
- “当纽约时间下午 4 点时,伦敦时间是几点?”
- “将东京时间上午 9:30 转换为纽约时间”
建造
Copy
You must be authenticated.
提供时间和时区转换功能的模型上下文协议服务器,使 LLM 能够获取当前时间信息并使用 IANA 时区名称执行时区转换。
- Available Tools
- Installation
- Configuration
- Example Interactions
- Debugging
- Examples of Questions for Claude
- build