article
README
🚀 时间 MCP 服务器:赋予大型语言模型时间感知能力
一个模型上下文协议(MCP)服务器的实现,旨在赋予大型语言模型时间感知能力,让模型能够更好地处理与时间相关的任务。
🚀 快速开始
本项目是一个模型上下文协议(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 文件。
Scan to contact