time-时智
赋予大型语言模型时间感知能力。 为您的大型语言模型赋予时间感知能力。访问当前时间、在时区之间转换并轻松获取时间戳。通过精确的时间相关功能增强您的应用程序。
MCP 服务配置
复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用
{
"mcpServers": {
"time-mcp": {
"args": [
"-y",
"time-mcp"
],
"command": "npx"
}
}
}
可用工具 (5 个)
该服务在 MCP 协议中暴露的工具,AI 可按需调用
current_time 2 个参数 需填 1 项
Get the current date and time.
必填参数:format
relative_time 1 个参数
Get the relative time from now.
该工具无需必填参数,直接调用即可
days_in_month 1 个参数
Get the number of days in a month.
该工具无需必填参数,直接调用即可
get_timestamp 1 个参数
Get the timestamp of a time.
该工具无需必填参数,直接调用即可
convert_time 3 个参数 需填 3 项
Convert time between timezones.
必填参数:sourceTimezone、targetTimezone、time
服务介绍
🚀 Time MCP Server: 为LLM赋予时间感知能力
这是一个模型上下文协议(MCP)服务器实现,它允许大语言模型(LLMs)具备时间感知功能。
工具
current_time: 获取当前时间(UTC 和本地时间)relative_time: 获取相对时间get_timestamp: 获取指定时间的时间戳days_in_month: 获取月份中的天数convert_time: 在不同时区之间转换时间get_week_year: 获取一年中的周和ISO周
安装
通过Smithery安装
要通过Smithery自动为Claude Desktop安装time-mcp:
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文件。