MCP Simple Timeserver

MCP Simple Timeserver

site icon
2025.01.29 9
Python时间服务其它
mcp-simple-timeserver 是一个简单的 MCP 服务器,旨在为 Claude 提供时间信息。由于 Anthropic 的设计决策,Claude 无法获取用户发送消息的时间戳或当前时间,该服务器通过提供本地时间和 UTC 时间来解决这一问题。
View on GitHub

Overview

基本能力

产品定位

mcp-simple-timeserver 是一个时间服务工具,旨在为 Claude 提供准确的时间信息,使其能够了解用户的本地时间和 UTC 时间。

核心功能

  • get_time:提供用户机器的本地时间和时区信息。
  • get_utc:从 NTP 时间服务器获取当前 UTC 时间。

适用场景

  • 当 Claude 需要知道用户的本地时间时。
  • 当 Claude 需要计算与用户上次交互的时间间隔时。
  • 当需要获取准确的 UTC 时间时。

工具列表

  • get_time:获取用户本地时间和时区信息。
  • get_utc:获取当前 UTC 时间。

常见问题解答

使用教程

使用依赖

  • 需要安装 Python 环境。

安装教程

通过 Smithery 安装

npx -y @smithery/cli install mcp-simple-timeserver --client claude

手动安装

  1. 安装模块:
pip install mcp-simple-timeserver
  1. 在 MCP 客户端(如 Claude 桌面应用)中配置:
  2. Mac OS 配置示例:
"mcpServers": {
  "simple-timeserver": {
    "command": "python",
    "args": ["-m", "mcp_simple_timeserver"]
  }
}
  • Windows 配置示例(需检查 Python 路径):
"mcpServers": {
  "simple-timeserver": {
    "command": "C:\\Users\\YOUR_USERNAME\\AppData\\Local\\Programs\\Python\\Python311\\python.exe",
    "args": ["-m", "mcp_simple_timeserver"]
  }
}

调试方式

无具体调试命令提供,安装完成后可直接在 Claude 中使用 get_timeget_utc 工具测试功能。

许可证

该项目遵循 MIT 开源许可条款,请参阅 MIT 了解完整条款。