时间感知

zac2ma/Time-MCP
Hosted
15 Stars 2.8k 次浏览 更新于 2026-08-23

一种模型上下文协议(MCP)服务器实现,使大语言模型(LLMs)具备时间感知能力。 - currenttime: 获取当前时间(UTC时间和本地时间)

MCP 服务配置

复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用

{
  "mcpServers": {
    "time-mcp": {
      "args": [
        "-y",
        "time-mcp"
      ],
      "command": "npx"
    }
  }
}

服务介绍

🚀 Time MCP Server: 为大语言模型赋予时间感知能力

smithery 徽章

这是一个 Model Context Protocol (MCP) 服务器实现,允许大语言模型(LLMs)具有时间感知能力。

工具

  • current_time: 获取当前时间(UTC 和本地时间)
  • relative_time: 获取相对时间
  • get_timestamp: 获取时间的时间戳
  • days_in_month: 获取月份中的天数
  • convert_time: 在时区之间转换时间
  • get_week_year: 获取一年中的周和 ISO 周

安装

通过 Smithery 安装

要通过 Smithery 自动为 Claude Desktop 安装 time-mcp:


npx -y @smithery/cli install @yokingma/time-mcp --client claude

手动安装(可选)

npm install -g time-mcp

使用 npx

npx -y time-mcp

在 Cursor 上运行

您的 mcp.json 文件将如下所示:


{

  "mcpServers": {

    "time-mcp": {

      "command": "npx",

      "args": ["-y", "time-mcp"]

    }

  }

}

在 Windsurf 上运行

将以下内容添加到您的 ./codeium/windsurf/model_config.json 文件中:


{

  "mcpServers": {

    "time-mcp": {

      "command": "npx",

      "args": ["-y", "time-mcp"]

    }

  }

}

许可证

MIT 许可证 - 详情请参阅 LICENSE 文件。

相关 MCP 服务