Date MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Date MCP Serverwhat's the current date and time in Tokyo?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@ainarsklavins/date-mcp
An MCP server that provides real-time date, time, and timezone information to AI assistants.
Why Use This?
AI models don't inherently know the current date or time. This MCP server solves that by providing tools that return accurate, real-time temporal information.
Installation
Claude Desktop
Add to your Claude Desktop configuration file:
OS | Path |
macOS |
|
Windows |
|
{
"mcpServers": {
"date-mcp": {
"command": "npx",
"args": ["-y", "@ainarsklavins/date-mcp"]
}
}
}Claude Code (CLI)
claude mcp add --scope user date-mcp -- npx -y @ainarsklavins/date-mcpAdd to ~/.claude/settings.json:
{
"mcpServers": {
"date-mcp": {
"command": "npx",
"args": ["-y", "@ainarsklavins/date-mcp"]
}
}
}VS Code
Or manually add to your VS Code MCP settings (Ctrl+Shift+P → "MCP: Open User Configuration"):
{
"servers": {
"date-mcp": {
"command": "npx",
"args": ["-y", "@ainarsklavins/date-mcp"]
}
}
}Cursor
Add to Cursor's MCP settings (Settings → MCP Servers):
{
"mcpServers": {
"date-mcp": {
"command": "npx",
"args": ["-y", "@ainarsklavins/date-mcp"]
}
}
}Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"date-mcp": {
"command": "npx",
"args": ["-y", "@ainarsklavins/date-mcp"]
}
}
}npm install -g @ainarsklavins/date-mcpThen use "command": "date-mcp" instead of npx in any configuration above.
Available Tools
Tool | Description | Read-only |
| Get current date/time with timezone | Yes |
| Get day name for any date | Yes |
| Get timezone offset and details | Yes |
| Format dates in various styles | Yes |
All tools are read-only and have no side effects.
get-current-datetime
Returns the current date and time.
Parameters:
Name | Type | Required | Description |
| string | No | IANA timezone (e.g., |
Example:
{
"iso": "2024-12-15T14:30:00.000Z",
"formatted": "12/15/2024, 9:30:00 AM",
"timezone": "America/New_York",
"timestamp": 1734272200000
}get-day-of-week
Returns the day of the week for a given date.
Parameters:
Name | Type | Required | Description |
| string | No | Date in YYYY-MM-DD format (defaults to today) |
| string | No | Locale code (e.g., |
Example:
{
"dayName": "Sunday",
"dayNumber": 0,
"date": "2024-12-15"
}get-timezone-info
Returns detailed timezone information.
Parameters:
Name | Type | Required | Description |
| string | No | IANA timezone name |
Example:
{
"timezone": "America/New_York",
"offset": "GMT-05:00",
"abbreviation": "EST",
"currentTime": "12/15/2024, 9:30:00 AM"
}format-date
Formats a date in various styles.
Parameters:
Name | Type | Required | Description |
| string | No | Date in ISO format (defaults to today) |
| string | No |
|
| string | No | Locale code (e.g., |
Example:
{
"formatted": "December 15, 2024",
"style": "long",
"locale": "en-US",
"iso": "2024-12-15T00:00:00.000Z"
}Supported Timezones
Uses IANA timezone database. Common examples:
America/New_York,America/Los_Angeles,America/ChicagoEurope/London,Europe/Paris,Europe/BerlinAsia/Tokyo,Asia/Shanghai,Asia/SingaporeAustralia/SydneyUTC
Full list: IANA Time Zone Database
Debugging
You can use the MCP Inspector to debug the server:
npx @modelcontextprotocol/inspector npx -y @ainarsklavins/date-mcpDevelopment
git clone https://github.com/ainarsklavins/date-mcp.git
cd date-mcp
npm install
npm run buildTesting Locally
Add to Claude Code with direct path:
{
"mcpServers": {
"date-mcp": {
"command": "node",
"args": ["/path/to/date-mcp/dist/index.js"]
}
}
}License
MIT - see LICENSE
Available Tools
4 toolsformat-dateFormat DateC
Format a date in various styles (short, medium, long, full).
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | Date in ISO format (defaults to today) | |
| style | No | Date style | |
| locale | No | Locale code (e.g., "en-US", "fr-FR") |
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 of behavioral disclosure. It mentions formatting styles but doesn't cover key traits like default behavior (e.g., defaults to today's date), error handling, or output format. This leaves gaps for a tool with 3 parameters and no output 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?
The description is a single, efficient sentence that front-loads the purpose without waste. It's appropriately sized for a simple tool, though it could be more structured with bullet points or examples. Every word earns its place, making it clear but minimal.
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 3 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain the return values, default behaviors, or potential errors. For a formatting tool with multiple inputs, more context is needed to ensure the agent can use it correctly without guesswork.
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 already documents all parameters (date, style, locale) with descriptions and enums. The description adds no additional meaning beyond the schema, such as examples or usage tips. Baseline 3 is appropriate since the schema does the heavy lifting.
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 verb ('Format') and resource ('a date'), specifying what the tool does. It distinguishes from siblings like 'get-current-datetime' by focusing on formatting rather than retrieval, though it doesn't explicitly mention sibling differentiation. The purpose is specific but could be more detailed about scope.
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 is provided on when to use this tool versus alternatives like 'get-current-datetime' or 'get-day-of-week'. The description implies usage for date formatting but lacks explicit context, prerequisites, or exclusions. It's minimal and doesn't help the agent choose between tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get-current-datetimeGet Current Date and TimeA
Returns the current date and time. Optionally specify a timezone.
| Name | Required | Description | Default |
|---|---|---|---|
| timezone | No | IANA timezone (e.g., "America/New_York", "Europe/London", "UTC") |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool returns current datetime and mentions an optional timezone, but does not specify return format (e.g., ISO string), whether it's read-only (implied by 'Returns'), or any rate limits or error conditions. It adds basic context but lacks detailed behavioral traits.
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 two sentences with zero waste: the first states the core purpose, and the second adds the optional parameter. It is appropriately sized and front-loaded, making it easy for an agent to quickly understand the tool's function without unnecessary elaboration.
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 tool's low complexity (one optional parameter, no output schema, no annotations), the description is mostly complete. It covers the purpose and parameter, but lacks details on return format or behavioral aspects like error handling. For a simple tool, this is adequate but could be slightly enhanced with output information.
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 already documents the timezone parameter with IANA format examples. The description adds minimal value by mentioning 'Optionally specify a timezone' but does not provide additional syntax, format details, or constraints beyond what the schema provides. Baseline 3 is appropriate when schema does the heavy lifting.
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 specific action ('Returns') and resource ('current date and time'), distinguishing it from siblings like format-date (which transforms dates) and get-timezone-info (which provides timezone details). It precisely communicates what the tool does without ambiguity.
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 clear context by mentioning the optional timezone parameter, implying usage when current datetime is needed. However, it does not explicitly state when to use this tool versus alternatives like get-timezone-info or format-date, nor does it provide exclusions or prerequisites for usage.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get-day-of-weekGet Day of WeekB
Returns the day of the week for a given date or today.
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | Date in YYYY-MM-DD format (defaults to today) | |
| locale | No | Locale for day name (e.g., "en-US", "de-DE") |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. It states the basic function but doesn't mention important behavioral aspects: whether it's read-only (implied but not stated), what happens with invalid dates/locales, format of returned day names, or localization behavior. The description is minimal and lacks operational context.
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 perfectly concise - a single sentence that states exactly what the tool does with zero wasted words. It's front-loaded with the core functionality and includes the essential scope information ('for a given date or today'). Every word earns its place.
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 read-only tool with 100% schema coverage but no output schema, the description is minimally adequate. It states the core function but lacks information about return format (string? object?), error behavior, or localization details. With no annotations and no output schema, users must infer these aspects from the tool name and parameters alone.
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 already fully documents both parameters (date format, locale examples). The description adds no additional parameter semantics beyond what's in the schema - it doesn't explain when to use locale parameter, what happens if omitted, or provide examples of day name outputs. Baseline 3 is appropriate when schema does all the work.
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 function ('Returns the day of the week') and specifies the resource ('for a given date or today'). It distinguishes from siblings like 'format-date' by focusing specifically on day-of-week extraction rather than general date formatting. However, it doesn't explicitly contrast with 'get-current-datetime' which might also provide day information.
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 like 'format-date' (which could also return day of week) or 'get-current-datetime' (which provides comprehensive datetime info). There's no mention of use cases, prerequisites, or trade-offs between this tool and its siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get-timezone-infoGet Timezone InformationB
Returns information about the current or specified timezone.
| Name | Required | Description | Default |
|---|---|---|---|
| timezone | No | IANA timezone name (e.g., "America/New_York") |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool returns information, implying a read-only operation, but doesn't detail aspects like error handling (e.g., for invalid timezone names), response format, or any constraints (e.g., rate limits). This leaves significant gaps in understanding how the tool behaves beyond its basic purpose.
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, clear sentence that efficiently conveys the core functionality without unnecessary words. It's front-loaded with the main action and resource, making it easy to parse and understand quickly.
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 tool's low complexity (one optional parameter, no annotations, no output schema), the description is adequate as a starting point but incomplete. It lacks details on return values, error cases, and behavioral traits, which are important for an agent to use the tool effectively, especially without annotations to fill in gaps.
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 has 100% description coverage, fully documenting the single optional parameter 'timezone' with its IANA format. The description adds minimal value by implying the parameter is optional ('current or specified'), but doesn't provide additional semantics beyond what the schema already covers, meeting the baseline for high schema 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 clearly states the verb ('Returns') and resource ('information about the current or specified timezone'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'get-current-datetime' or 'format-date', which might also involve timezone handling, so it doesn't reach the highest score.
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 minimal guidance by mentioning 'current or specified timezone,' but it doesn't specify when to use this tool versus alternatives like 'get-current-datetime' or 'format-date.' There's no explicit advice on use cases or exclusions, leaving the agent to infer usage from context.
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.
4 tool updates
- First observed
format-date - First observed
get-current-datetime - First observed
get-day-of-week - First observed
get-timezone-info
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose: formatting dates, getting current datetime, determining day of week, and retrieving timezone information. There is no overlap in functionality, and an agent can easily select the correct tool based on the specific need.
All tool names follow a consistent verb_noun pattern with hyphens (e.g., format-date, get-current-datetime, get-day-of-week, get-timezone-info). The naming is predictable and readable throughout the set.
With 4 tools, the server is well-scoped for handling date and time operations. Each tool serves a unique and essential function, and the count is appropriate for the domain without being too thin or bloated.
The tool set covers core date/time operations like formatting, current datetime retrieval, day-of-week calculation, and timezone info. A minor gap is the lack of date arithmetic or manipulation tools (e.g., add days, compare dates), but agents can work around this with the provided tools.
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.
Time and date math for AI agents: Unix timestamp conversion, DST-correct time zone conversion, durations, epoch arithmetic, cron schedules, and holiday countdowns. Eight tools, no key.
Deterministic time tools for AI agents: timezone conversion, business-day math, cron interpretation.