提供时间与时区转换能力,满足各类应用场景下的时间时区转换需求。

9 次收藏下载次数: 0状态:社区镜像维护者:mcp(Model Context Protocol)仓库类型:镜像最近更新:
下载命令
点击查看

Time (Reference) MCP Server

镜像概述和主要用途

Time MCP Server 提供时间和时区转换功能,是基于模型上下文协议(Model Context Protocol)的参考服务器实现。

https://www.anthropic.com/news/model-context-protocol

核心功能和特性

基本信息

属性详情
Docker镜像https://hub.docker.com/repository/docker/mcp/time
作者https://github.com/modelcontextprotocol
代码仓库https://github.com/modelcontextprotocol/servers
Dockerfilehttps://github.com/modelcontextprotocol/servers/blob/2025.4.24/src/time/Dockerfile
镜像构建者Docker Inc.
Docker Scout健康评分
验证签名COSIGN_REPOSITORY=mcp/signatures cosign verify mcp/time --key https://raw.githubusercontent.com/docker/keyring/refs/heads/main/public/mcp/latest.pub
许可证MIT License

可用工具 (2)

工具名称简短描述
convert_time在不同时区之间转换时间
get_current_time获取特定时区的当前时间

使用场景和适用范围

  • 多时区应用中的时间转换
  • 全球化服务的时间显示适配
  • 需要跨时区时间计算的自动化流程
  • AI应用中的时间上下文管理

详细的使用方法和配置说明

工具详情

工具: convert_time

在不同时区之间转换时间

参数类型描述
source_timezonestring源IANA时区名称(例如:'America/New_York','Europe/London')。如果用户未提供源时区,则使用'UTC'作为本地时区。
target_timezonestring目标IANA时区名称(例如:'Asia/Tokyo','America/San_Francisco')。如果用户未提供目标时区,则使用'UTC'作为本地时区。
timestring要转换的时间,采用24小时格式(HH:MM)

工具: get_current_time

获取特定时区的当前时间

参数类型描述
timezonestringIANA时区名称(例如:'America/New_York','Europe/London')。如果未提供时区,则使用'UTC'作为本地时区。

部署和配置

Docker 运行命令

bash
docker run -i --rm docker.xuanyuan.run/mcp/time

MCP Server 配置示例

json
{
  "mcpServers": {
    "time": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "mcp/time"
      ]
    }
  }
}

Docker Compose 配置示例

yaml
version: '3'
services:
  time-mcp-server:
    image: docker.xuanyuan.run/mcp/time
    stdin_open: true
    tty: true

安全性说明

https://www.docker.com/blog/the-model-context-protocol-simplifying-building-ai-apps-with-anthropic-claude-desktop-and-docker/

建议通过验证签名确保镜像完整性:

bash
COSIGN_REPOSITORY=mcp/signatures cosign verify mcp/time --key https://raw.githubusercontent.com/docker/keyring/refs/heads/main/public/mcp/latest.pub

镜像拉取方式

您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

轩辕镜像加速拉取命令点我查看更多 time 镜像标签

docker pull docker.xuanyuan.run/mcp/time:<标签>

DockerHub 原生拉取命令

docker pull mcp/time:<标签>
专业版 · 高速稳定拉取镜像
50GB 仅 ¥8/年
高速镜像下载在线技术支持专业版保障服务可用付费会员免广告