Time Mcp Server

io.github.lchinglen由 GitHub 账号 lchinglen 发布v1.0.3更新于 Oct 24, 2026

MCP server for timezone conversions and time queries with support for IANA timezones

已验证STDIO仅桌面效率与工作流

概览

AI 生成的概览

本地 MCP 服务器,让助手查询任意 IANA 时区的当前时间,并在时区之间转换时间。

可以做什么
按指定的 IANA 时区或自动检测的系统时区获取当前时间,响应中包含夏令时状态和偏移信息。将给定的 24 小时制时间从源时区转换为目标时区,返回两地的本地时间及时差。
适用场景
适合涉及某地当前时间、跨地区安排日程,或把某一时区的指定时间换算到另一时区的提问。它只是一个单一用途的小型补充,而非通用工具服务器。
运行要求
以本地进程通过 stdio 运行。需要 Python 环境并通过 pip 安装该包,或用 uv/uvx 免安装直接运行;文档也提供了 Docker 镜像方式。未声明需要账号、API 密钥或请求头。系统时区会自动检测,也可通过本地时区参数覆盖。
安装前请注意
只读:仅报告和换算时间,不会写入、发送或删除数据。不索取任何凭据。结果依赖宿主机的时钟和时区数据库,若自动检测的系统时区有误,需要手动覆盖。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Time Mcp Server,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Time MCP Server

A Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.

Available Tools

  • get_current_time - Get current time in a specific timezone or system timezone.

    • Required arguments:
      • timezone (string): IANA timezone name (e.g., 'America/New_York', 'Europe/London')
  • convert_time - Convert time between timezones.

    • Required arguments:
      • source_timezone (string): Source IANA timezone name
      • time (string): Time in 24-hour format (HH:MM)
      • target_timezone (string): Target IANA timezone name

Installation

Using uv (recommended)

When using uv no specific installation is needed. We will use uvx to directly run mcp-server-time.

bash
uvx mcp-server-time

Using PIP

Alternatively you can install mcp-server-time via pip:

bash
pip install mcp-server-time

After installation, you can run it as a script using:

bash
python -m mcp_server_time

Configuration

Configure for Claude.app

Add to your Claude settings:

Using uvx
json
{  "mcpServers": {    "time": {      "command": "uvx",      "args": ["mcp-server-time"]    }  }}
Using docker
json
{  "mcpServers": {    "time": {      "command": "docker",      "args": ["run", "-i", "--rm", "-e", "LOCAL_TIMEZONE", "mcp/time"]    }  }}
Using pip installation
json
{  "mcpServers": {    "time": {      "command": "python",      "args": ["-m", "mcp_server_time"]    }  }}

Configure for Zed

Add to your Zed settings.json:

Using uvx
json
"context_servers": [  "mcp-server-time": {    "command": "uvx",    "args": ["mcp-server-time"]  }],
Using pip installation
json
"context_servers": {  "mcp-server-time": {    "command": "python",    "args": ["-m", "mcp_server_time"]  }},

Configure for VS Code

For quick installation, use one of the one-click install buttons below...

[Install with UV in VS Code] [Install with UV in VS Code Insiders]

[Install with Docker in VS Code] [Install with Docker in VS Code Insiders]

For manual installation, add the following JSON block to your User Settings (JSON) file in VS Code. You can do this by pressing Ctrl + Shift + P and typing Preferences: Open User Settings (JSON).

Optionally, you can add it to a file called .vscode/mcp.json in your workspace. This will allow you to share the configuration with others.

Note that the mcp key is needed when using the mcp.json file.

Using uvx
json
{  "mcp": {    "servers": {      "time": {        "command": "uvx",        "args": ["mcp-server-time"]      }    }  }}
Using Docker
json
{  "mcp": {    "servers": {      "time": {        "command": "docker",        "args": ["run", "-i", "--rm", "mcp/time"]      }    }  }}

Configure for Zencoder

  1. Go to the Zencoder menu (...)
  2. From the dropdown menu, select Agent Tools
  3. Click on the Add Custom MCP
  4. Add the name and server configuration from below, and make sure to hit the Install button
Using uvx
json
{    "command": "uvx",    "args": ["mcp-server-time"]  }

Customization - System Timezone

By default, the server automatically detects your system's timezone. You can override this by adding the argument --local-timezone to the args list in the configuration.

Example:

json
{  "command": "python",  "args": ["-m", "mcp_server_time", "--local-timezone=America/New_York"]}

Example Interactions

  1. Get current time:
json
{  "name": "get_current_time",  "arguments": {    "timezone": "Europe/Warsaw"  }}

Response:

json
{  "timezone": "Europe/Warsaw",  "datetime": "2024-01-01T13:00:00+01:00",  "is_dst": false}
  1. Convert time between timezones:
json
{  "name": "convert_time",  "arguments": {    "source_timezone": "America/New_York",    "time": "16:30",    "target_timezone": "Asia/Tokyo"  }}

Response:

json
{  "source": {    "timezone": "America/New_York",    "datetime": "2024-01-01T12:30:00-05:00",    "is_dst": false  },  "target": {    "timezone": "Asia/Tokyo",    "datetime": "2024-01-01T12:30:00+09:00",    "is_dst": false  },  "time_difference": "+13.0h",}

Debugging

You can use the MCP inspector to debug the server. For uvx installations:

bash
npx @modelcontextprotocol/inspector uvx mcp-server-time

Or if you've installed the package in a specific directory or are developing on it:

bash
cd path/to/servers/src/timenpx @modelcontextprotocol/inspector uv run mcp-server-time

Examples of Questions for Claude

  1. "What time is it now?" (will use system timezone)
  2. "What time is it in Tokyo?"
  3. "When it's 4 PM in New York, what time is it in London?"
  4. "Convert 9:30 AM Tokyo time to New York time"

Build

Docker build:

bash
cd src/timedocker build -t mcp/time .

Contributing

We encourage contributions to help expand and improve mcp-server-time. Whether you want to add new time-related tools, enhance existing functionality, or improve documentation, your input is valuable.

For examples of other MCP servers and implementation patterns, see: https://github.com/modelcontextprotocol/servers

Pull requests are welcome! Feel free to contribute new ideas, bug fixes, or enhancements to make mcp-server-time even more powerful and useful.

License

mcp-server-time is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.

来源:README.md,提交 b0f5cbb

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.0.3最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分