Back to MCP directory
publicPublicdnsLocal runtime

time-mcp-iyn

Time-MCP是一个为AI代理提供当前时间和日期信息的MCP服务器。

article

README

🚀 Time-MCP

Time-MCP是一个专门为代理获取当前时间和日期而设计的MCP服务器,它能助力代理完成各类与时间相关的任务。

截图

🚀 快速开始

Claude桌面应用

若要在Claude桌面应用中使用Time-MCP,需将time_mcp_server.py添加到Claude桌面应用配置文件~/Library/Application\ 支持/Claude/claude_desktop_config.json的MCP服务器列表中,示例如下:

{
    "mcpServers": {
        "time": {
            "command": "uv",
            "args": [
                "--directory",
                "/ABSOLUTE/PATH/TO/PARENT/FOLDER/time-mcp",
                "run",
                "time_mcp_server.py"
            ]
        }
    }
}

保存文件后,重新启动Claude桌面应用。

⚠️ 重要提示

您可能需要在command字段中提供uv可执行文件的完整路径。可以通过运行which uv(MacOS/Linux)或where uv(Windows)来获取此路径。此操作基于https://modelcontextprotocol.io/quickstart/server中的“使用Claude Desktop测试您的服务器”文档。

自定义客户端(或其他系统)

由于Time-MCP是一个基于STDIO的MCP服务器,最佳使用方式是像官方教程中实现一个类似天气.py的客户端那样,将time_mcp_server.py作为目标服务器来实现客户端。

✨ 主要特性

让代理知道当前时间和日期十分有用且重要,它能使代理完成与时间相关的任务,例如“Pacifica现在几点?”或“3小时后的天气如何?”

📚 详细文档

Time-MCP提供了两个工具:

  • get_datetime:返回指定时区(UTC未指定)的格式化日期时间。
  • get_current_unix_timestamp:返回当前UNIX时间戳。

有/无 Time-MCP对比

无Time-MCP:

截图

有Time-MCP:

截图

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client