Exhub provides an MCP server for time-related functionality, enabling timezone-aware operations through the Model Context Protocol.
The Time MCP server exposes time utilities as MCP tools, allowing LLMs and other MCP clients to:
- Get current time in any IANA timezone
- Convert time between different timezones
The Time MCP server runs at /time/mcp endpoint.
Module: Exhub.MCP.TimeServer
| Tool | Description |
|---|---|
get_current_time |
Get current time in a specific IANA timezone |
convert_time |
Convert time between two IANA timezones |
Returns the current time for a specified IANA timezone.
Parameters:
timezone(string, required) - IANA timezone identifier (e.g., "America/New_York", "Asia/Shanghai")
Returns:
- Current datetime in the specified timezone
Converts a datetime from one timezone to another.
Parameters:
source_timezone(string, required) - Source IANA timezonetime(string, required) - Time to convert (ISO 8601 format or datetime string)target_timezone(string, required) - Target IANA timezone
Returns:
- Converted datetime in the target timezone
# The server is automatically started with the Exhub application
# Access via MCP client at http://localhost:4000/time/mcp
# Example: Get current time in Tokyo
# Tool: get_current_time
# Args: %{"timezone" => "Asia/Tokyo"}
# Example: Convert time from New York to London
# Tool: convert_time
# Args: %{
# "source_timezone" => "America/New_York",
# "time" => "2024-01-15 10:00:00",
# "target_timezone" => "Europe/London"
# }The Time MCP server consists of:
Exhub.MCP.TimeServer- MCP server implementationExhub.MCP.Tools.GetCurrentTime- Get current time toolExhub.MCP.Tools.ConvertTime- Time conversion tool
The server supports all valid IANA timezone identifiers, including:
UTC- Coordinated Universal TimeAmerica/New_York- Eastern TimeAmerica/Los_Angeles- Pacific TimeEurope/London- Greenwich Mean Time / British Summer TimeEurope/Paris- Central European TimeAsia/Shanghai- China Standard TimeAsia/Tokyo- Japan Standard TimeAsia/Dubai- Gulf Standard TimeAustralia/Sydney- Australian Eastern Time
For a complete list, see the IANA Time Zone Database.