
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 timeget_timestamp: Get timestamp for the timedays_in_month: Get days in monthconvert_time: Convert time between timezonesget_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.
安装
npx -y time-mcp配置
{
"mcpServers": {
"time-mcp": {
"command": "npx",
"args": ["-y", "time-mcp"]
}
}
}