YT

yokingma/time-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

72 stars 14 forks 质量 67 趋势 0MIT

yokingma/time-mcp 是从 https://github.com/yokingma/time-mcp. 导入的 MCP 服务器候选

概览

yokingma/time-mcp 是从 https://github.com/yokingma/time-mcp. 导入的 MCP 服务器候选

概述(AI 翻译)

一种模型上下文协议(MCP)服务器实现,允许LLM具备时间感知能力。

工具

  • current_time:获取当前时间(UTC和当地时间)
  • relative_time:获得相对时间
  • get_timestamp:获取时间戳
  • days_in_month:月份获得天数
  • convert_time:时区间时间转换
  • get_week_year:获取周和isoWeek of the Year

安装

通过Smithery安装

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

手动安装(可选)

使用 NPX

运行克劳德代码

要向 Claude Code 添加 time-mcp,请使用以下命令:

验证安装情况:

你应该会看到time-mcp显示为✓已连接状态。

Claude 代码中的使用

安装后,你可以在与 Claude Code 的对话中使用 time-mcp 工具。例如:

  • “现在几点了?”
  • “将下午2:00从纽约时间转换为东京时间”
  • “这个月有多少天?”
  • “现在是一年中的哪一周?”

time-mcp 服务器会自动向 Claude 提供准确的时间信息。

在光标上运行

你的 mcp.json 文件将呈现如下:

在风帆冲浪上奔跑

把这个加到你的“。

本页由 AI 翻译,技术细节请以原文为准。

README

🚀 Time MCP Server: Giving LLMs Time Awareness Capabilities

A Model Context Protocol (MCP) server implementation that allows LLMs to have time awareness capabilities.

Tools

  • current_time: Get current time (UTC and local time)
  • relative_time: Get relative time
  • get_timestamp: Get timestamp for the time
  • days_in_month: Get days in month
  • convert_time: Convert time between timezones
  • get_week_year: Get week and isoWeek of the year

Installation

Installing via Smithery

To install time-mcp for Claude Desktop automatically via Smithery:

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

Manually install (Optional)

npm install -g time-mcp

using npx

npx -y time-mcp

Running on Claude Code

To add time-mcp to Claude Code, use the following command:

claude mcp add time-mcp -- npx -y time-mcp

To verify the installation:

claude mcp list

You should see time-mcp listed with a ✓ Connected status.

Usage in Claude Code

Once installed, you can use time-mcp tools in your conversations with Claude Code. For example:

  • “What time is it now?”
  • “Convert 2:00 PM from New York to Tokyo time”
  • “How many days are in this month?”
  • “What week of the year is it?”

The time-mcp server will automatically provide accurate time information to Claude.

Running on Cursor

Your mcp.json file will look like this:

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

Running on Windsurf

Add this to your ./codeium/windsurf/model_config.json file:

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

License

MIT License - see LICENSE file for details.

在 GitHub 查看完整 README

安装

npx -y time-mcp
新手?先看 mcpskill.org 教程 →

配置

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