MCP 服务器

mcp-time

io.github.mcpcentral-io/mcp-time
生产力 公开且可连接 MCP 2025-11-25

此 MCP 可以做什么

Provides timezone conversion, current-time lookup, date calculations, Unix timestamps, week numbers, and relative-time calculations.

convert_time
Convert Timezone
Converts a time from a source IANA timezone to a target IANA timezone.
只读 幂等
输入模式
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['time', 'sourceTimezone', 'targetTimezone'], 'properties': {'time': {'type': 'string', 'description': 'The time to convert (e.g., "2025-03-23 12:30:00")'}, 'sourceTimezone': {'type': 'string', 'description': 'Source IANA timezone name (e.g., "Asia/Shanghai")'}, 'targetTimezone': {'type': 'string', 'description': 'Target IANA timezone name (e.g., "Europe/London")'}}, 'additionalProperties': False}
输出模式
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['convertedTime', 'hourDifference'], 'properties': {'convertedTime': {'type': 'string'}, 'hourDifference': {'type': 'number'}}, 'additionalProperties': False}
current_time
Get Current Time
Returns the current time in UTC and a specified or guessed IANA timezone.
只读 幂等
输入模式
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'properties': {'format': {'type': 'string', 'description': 'Format for the returned time string (default YYYY-MM-DD HH:mm:ss)'}, 'timezone': {'type': 'string', 'description': 'IANA timezone name (e.g., "America/New_York"). Defaults to the server\'s guessed timezone'}}, 'additionalProperties': False}
输出模式
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['utcTime', 'localTime', 'timezone'], 'properties': {'utcTime': {'type': 'string'}, 'timezone': {'type': 'string'}, 'localTime': {'type': 'string'}}, 'additionalProperties': False}
days_in_month
Get Days in Month
Returns the number of days in the month of a given date.
只读 幂等
输入模式
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'properties': {'date': {'type': 'string', 'description': 'The date to check (format: YYYY-MM-DD). Defaults to current date'}}, 'additionalProperties': False}
输出模式
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['days'], 'properties': {'days': {'type': 'integer'}}, 'additionalProperties': False}
get_timestamp
Get Unix Timestamp
Converts a date-time string to a Unix timestamp in milliseconds.
只读 幂等
输入模式
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'properties': {'time': {'type': 'string', 'description': 'The time to convert (format: YYYY-MM-DD HH:mm:ss). Defaults to current time'}}, 'additionalProperties': False}
输出模式
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['timestamp'], 'properties': {'timestamp': {'type': 'number'}}, 'additionalProperties': False}
get_week_year
Get Week of Year
Returns the week number and ISO week number for a given date.
只读 幂等
输入模式
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'properties': {'date': {'type': 'string', 'description': 'The date to check (e.g., "2025-03-23"). Defaults to current date'}}, 'additionalProperties': False}
输出模式
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['week', 'isoWeek'], 'properties': {'week': {'type': 'integer'}, 'isoWeek': {'type': 'integer'}}, 'additionalProperties': False}
relative_time
Get Relative Time
Calculates the relative time from now to a given date-time string.
只读 幂等
输入模式
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['time'], 'properties': {'time': {'type': 'string', 'description': 'The time to compare (format: YYYY-MM-DD HH:mm:ss)'}}, 'additionalProperties': False}
输出模式
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['relativeTime'], 'properties': {'relativeTime': {'type': 'string'}}, 'additionalProperties': False}
已添加
get_week_year
2026年9月17日 12:43
已添加
convert_time
2026年9月17日 12:43
已添加
get_timestamp
2026年9月17日 12:43
已添加
days_in_month
2026年9月17日 12:43
已添加
relative_time
2026年9月17日 12:43
已添加
current_time
2026年9月17日 12:43