Back to MCP directory
publicPublicdnsLocal runtime

time-mcp

为LLM提供时间感知能力的MCP服务器实现

article

README

🚀 时间 MCP 服务器:赋予大型语言模型时间感知能力

一个模型上下文协议(MCP)服务器的实现,旨在赋予大型语言模型时间感知能力,让模型能够更好地处理与时间相关的任务。

smithery 徽章

🚀 快速开始

本项目是一个模型上下文协议(MCP)服务器的实现,可赋予大型语言模型时间感知能力。以下是相关介绍和使用说明。

✨ 主要特性

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

📦 安装指南

通过 Smithery 安装

要自动为 Claude Desktop 安装 time-mcp,请使用 Smithery

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,详情请参阅 LICENSE 文件。

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