返回市场
时间-MCP

时间-MCP

作者:yokingma53 星标更新:2025-10-15

项目介绍

🚀 Time MCP Server:赋予LLMs时间感知能力

smithery徽章 <a href="https://github.com/yokingma/time-mcp/stargazers"><img src="https://img.shields.io/github/stars/yokingma/time-mcp" alt="GitHub Stars"></a> <a href="https://github.com/yokingma/time-mcp/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-purple" alt="许可证"></a> <a href="https://github.com/yokingma/time-mcp/issues/new"><img src="https://img.shields.io/badge/报告一个错误-GitHub-%231F80C0" alt="报告一个错误"></a>

这是一个Model Context Protocol (MCP)服务器实现,允许LLMs具备时间感知能力。

<div align="center"> <img src="./assets/cursor.png"></img> </div>

工具

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

安装

通过Smithery安装

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

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文件。