The Time MCP Server is a specialized implementation of the Model Context Protocol (MCP) designed to provide time and timezone conversion capabilities. This server enables Large Language Models (LLMs) to retrieve current time information and perform accurate timezone conversions using IANA timezone names, with automatic system timezone detection.
get_current_timeRetrieves the current time in a specified timezone or the system’s default timezone.
Required Arguments:
- timezone (string): IANA timezone name (e.g., America/New_York, Europe/London).
convert_timeConverts a specific time from one timezone to another.
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.
uv (Recommended)No specific installation is required when using uv. Use uvx to run mcp-server-time directly.
pipInstall mcp-server-time via pip:
pip install mcp-server-time
Run the server as a script:
python -m mcp_server_time
Add the following to your Claude settings:
uvx"mcpServers": {
"time": {
"command": "uvx",
"args": ["mcp-server-time"]
}
}
"mcpServers": {
"time": {
"command": "docker",
"args": ["run", "-i", "--rm", "mcp/time"]
}
}
pip Installation"mcpServers": {
"time": {
"command": "python",
"args": ["-m", "mcp_server_time"]
}
}
Add the following to your settings.json:
uvx"context_servers": {
"mcp-server-time": {
"command": "uvx",
"args": ["mcp-server-time"]
}
}
pip Installation"context_servers": {
"mcp-server-time": {
"command": "python",
"args": ["-m", "mcp_server_time"]
}
}
Override the default system timezone detection by adding the --local-timezone argument:
{
"command": "python",
"args": ["-m", "mcp_server_time", "--local-timezone=America/New_York"]
}
{
"name": "get_current_time",
"arguments": {
"timezone": "Europe/Warsaw"
}
}
Response:
{
"timezone": "Europe/Warsaw",
"datetime": "2024-01-01T13:00:00+01:00",
"is_dst": false
}
{
"name": "convert_time",
"arguments": {
"source_timezone": "America/New_York",
"time": "16:30",
"target_timezone": "Asia/Tokyo"
}
}
Response:
{
"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"
}
Use the MCP inspector for debugging:
uvx Installationsnpx @modelcontextprotocol/inspector uvx mcp-server-time
cd path/to/servers/src/time
npx @modelcontextprotocol/inspector uv run mcp-server-time
cd src/time
docker build -t mcp/time .
We welcome contributions to enhance mcp-server-time. Whether you want to add new features, improve functionality, or update documentation, your input is valuable.
For examples of other MCP servers, visit: https://github.com/modelcontextprotocol/servers.
mcp-server-time is licensed under the MIT License. For more details, see the LICENSE file in the repository.