time-mcp
🚀 时间 MCP 服务器:赋予 LLM 时间感知能力
模型上下文协议 (MCP) 服务器实现允许 LLM 具有时间感知功能。
工具
current_time:获取当前时间(UTC 和本地时间)relative_time:获取相对时间get_timestamp:获取时间的时间戳days_in_month:获取月份中的天数convert_time:在时区之间转换时间get_week_year:获取一年中的第几周和第几周
Related MCP server: Time MCP Server
安装
通过 Smithery 安装
要通过Smithery自动为 Claude Desktop 安装 time-mcp:
npx -y @smithery/cli install @yokingma/time-mcp --client claude手动安装(可选)
npm install -g time-mcp使用 npx
npx -y time-mcp在光标上运行
您的mcp.json文件将如下所示:
{
"mcpServers": {
"time-mcp": {
"command": "npx",
"args": ["-y", "time-mcp"]
}
}
}在风帆冲浪中奔跑
将其添加到您的./codeium/windsurf/model_config.json文件中:
{
"mcpServers": {
"time-mcp": {
"command": "npx",
"args": ["-y", "time-mcp"]
}
}
}执照
MIT 许可证 - 详情请参阅LICENSE文件。
Available Tools
6 toolsconvert_timeB
Convert time between timezones.
| Name | Required | Description | Default |
|---|---|---|---|
| time | Yes | Date and time in 24-hour format. e.g. 2025-03-23 12:30:00 | |
| sourceTimezone | Yes | The source timezone. IANA timezone name, e.g. Asia/Shanghai | |
| targetTimezone | Yes | The target timezone. IANA timezone name, e.g. Europe/London |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description is the sole source of behavioral information, but it only states the basic function. It does not disclose behavior regarding invalid inputs, DST handling, output format, or error conditions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence that directly states the purpose with no redundancy. It could have included more detail without sacrificing conciseness, hence a 4 rather than 5.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
While the input parameters are well-documented via the schema, there is no output description or mention of error handling, and the description does not differentiate from siblings beyond the name. Given the tool's simplicity, this is adequate but not complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already has 100% coverage with clear descriptions for all three parameters. The tool description adds no additional semantic value beyond what the schema provides, meriting a baseline score of 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Convert time between timezones' clearly states the action (convert) and the resource (time between timezones), effectively distinguishing it from sibling tools like current_time or days_in_month.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives, nor does it mention any prerequisites or limitations, leaving the agent without clear usage context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
current_timeA
Get the current date and time.
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | The format of the time | YYYY-MM-DD HH:mm:ss |
| timezone | No | The timezone of the time, IANA timezone name, e.g. Asia/Shanghai |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It straightforwardly describes the tool's action, but does not specify the return format or default timezone behavior, though these are partially covered by the schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single concise sentence that is front-loaded with the key action. No unnecessary words or information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with no output schema and full schema parameter coverage, the description is adequately complete. It could mention that the output is a string, but that is implied by the format parameter.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema fully documents both parameters. The description adds no additional parameter-level detail beyond what is already in the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Get the current date and time' clearly states the verb and resource. It distinguishes from siblings like convert_time or get_timestamp which serve different purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description does not provide explicit guidance on when to use or avoid this tool versus alternatives. Its purpose is clear, but no comparative context is given.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
days_in_monthA
Get the number of days in a month. If no date is provided, get the number of days in the current month.
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | The date to get the days in month. Format: YYYY-MM-DD |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It clearly states the primary behavior (returns days in month) and the default behavior (current month if no date). It does not discuss error handling or edge cases, but the operation is simple and safe.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences, no wasted words, essential information front-loaded. Every sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simplicity and no output schema, the description adequately covers the tool's functionality. It describes the input and output behavior, though it could mention that the return is an integer. Still, it's sufficient for correct usage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema covers the single parameter with format description. The tool description adds value by clarifying that the parameter is optional and explaining the default behavior when omitted, which goes beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: get the number of days in a month, with a specific verb 'Get' and resource 'days in a month'. It distinguishes from sibling tools like convert_time or current_time, which handle different time operations.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implicitly suggests usage when needing days in a month, and explicitly notes the behavior when no date is provided. It does not explicitly mention alternatives, but the context makes the use case clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_timestampD
Get the timestamp for the time.
| Name | Required | Description | Default |
|---|---|---|---|
| time | No | The time to get the timestamp. Format: YYYY-MM-DD HH:mm:ss.SSS |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, and the description does not disclose any behavioral traits such as side effects, permissions, error responses, or whether it returns seconds or milliseconds.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single short sentence but is under-specified; it does not earn its place as it fails to clarify the output or usage context.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema and no annotations, the description should explain the return value (e.g., timestamp format). It only states the function without specifying output, leaving the tool incomplete for an agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% and the parameter 'time' already has a clear description with format. The tool description adds no additional meaning beyond what the schema provides, meeting the baseline for high coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Get the timestamp for the time' is tautological as it restates the tool name without specifying what a timestamp is or how it differs from sibling tools like convert_time or current_time. It does not indicate output format (e.g., epoch seconds).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus its siblings (convert_time, current_time, etc.) or any context about prerequisites or typical use cases.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_week_yearB
Get the week and isoWeek of the year.
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | The date to get the week and isoWeek of the year. e.g. 2025-03-23 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It does not disclose whether the tool is read-only, has side effects, or requires specific input validation. The description is minimal and offers no behavioral insight beyond the basic operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that efficiently conveys the purpose. No extraneous information, front-loaded with the core action.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with one parameter and no output schema or annotations, the description is adequate but not rich. It does not explain what 'week' means (e.g., week number starting from 1) or the return format. However, the example in the schema helps. Middle ground.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already provides full coverage for the single parameter (date) with a clear description and example. The tool description adds no additional semantic value beyond what the schema provides. Baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it gets the week and ISO week of the year, which is a specific verb and resource. It distinguishes itself from sibling tools like current_time or convert_time which are about time conversion or current time. However, it could be slightly more precise by clarifying that it returns both week number and ISO week number.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No usage guidelines are provided. The description does not indicate when to use this tool over alternatives like get_timestamp or relative_time. There is no mention of prerequisites, exclusions, or context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
relative_timeC
Get the relative time from now.
| Name | Required | Description | Default |
|---|---|---|---|
| time | Yes | The time to get the relative time from now. Format: YYYY-MM-DD HH:mm:ss |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Lacking annotations, the description should fully disclose behavior. It only states the action without explaining what 'relative time' means, how time zones are handled, or edge cases (e.g., future vs past times).
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
One concise sentence with no extraneous information. Every word is necessary, though brevity sacrifices completeness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has one parameter and no output schema. The description fails to explain the return value (e.g., format of relative time), leaving a significant gap in understanding.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with description for the 'time' parameter. The tool description adds no extra meaning beyond what is already in the schema, earning a baseline score.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states verb ('Get') and resource ('relative time'), and distinguishes from siblings like 'current_time' and 'convert_time'. However, it does not specify the output format, which could be ambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives. The description does not mention when-not or provide context for selection among siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
6 tool updates
v1.0.6- Added
convert_time - Added
current_time - Added
days_in_month - Added
get_timestamp - Added
get_week_year - Added
relative_time
6 tool updates
v1.0.5- Removed
convert_time - Removed
current_time - Removed
days_in_month - Removed
get_timestamp - Removed
get_week_year - Removed
relative_time
6 tool updates
v1.0.0- First observed
convert_time - First observed
current_time - First observed
days_in_month - First observed
get_timestamp - First observed
get_week_year - First observed
relative_time
TDQS
Scored across 6 tools
Each tool targets a distinct time-related operation with no overlap. convert_time, current_time, days_in_month, get_timestamp, get_week_year, and relative_time all serve unique purposes.
Names follow snake_case and are mostly descriptive, but there is slight inconsistency: some start with 'get' (get_timestamp, get_week_year) while others are adjective+noun (current_time) or verb+noun (convert_time).
Six tools is an appropriate number for a time utility server, covering essential operations without being excessive or minimal.
Common time operations are covered (conversion, current time, days in month, timestamp, week/year, relative time). Missing features like date arithmetic or time difference are minor gaps that don't hinder typical use.
Maintenance
Related MCP Connectors
Current time, timezone conversion & date math for AI agents. On Cloudflare Workers.
A real clock for AI agents: current time, timezone conversion, and DST facts from the IANA tzdb.
Wall-clock awareness for LLM agents. Two tools: elapsed-time-between-turns + day rollover detection.
Deterministic time tools for AI agents: timezone conversion, business-day math, cron interpretation.
Related MCP Servers
- AlicenseBqualityDmaintenanceGives large language models time awareness capabilities through various time-related functions including current time retrieval, timezone conversion, and relative time calculations.61,454 npmMIT
- AlicenseBqualityDmaintenanceProvides time and timezone functionality for LLMs, enabling them to get current time information across different timezones and convert times between zones.2MIT
- AlicenseNot gradedqualityDmaintenanceProvides current time information and timezone conversion capabilities using IANA timezone names and automatic system detection. It enables LLMs to fetch current times across different regions and convert specific times between timezones.MIT
- AlicenseAqualityDmaintenanceProvides accurate system time to LLM applications with multi-timezone support via a simple tool call.1MIT