DateTime MCP Server
This server provides LLMs with current date and time information with comprehensive timezone support, via a single tool: get_current_datetime.
Get the current date/time in ISO-compatible format, including timezone details
Query any timezone by passing an optional IANA timezone identifier (e.g.,
America/New_York,Europe/London,Asia/Tokyo)Use a configured default timezone set via the
TZenvironment variable, so responses reflect your preferred timezone without specifying it each timeAutomatic UTC fallback if no timezone is configured or provided
Validate timezone identifiers β returns helpful error messages if an invalid IANA timezone string is provided
Compare multiple timezones in a single conversation by making multiple calls with different timezone parameters
Click on "Install 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., "@DateTime MCP Serverwhat's the current 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.
Date & Time MCP Server
A powerful MCP server that provides LLMs with current date and time context with comprehensive timezone support. Get the current time in any timezone, with configurable defaults and intelligent fallbacks.
This is a TypeScript-based MCP server built with the Model Context Protocol that demonstrates timezone-aware datetime functionality.
Features
Tools
get_current_datetime: Returns the current date and time with full timezone supportOptional timezone parameter: Specify any IANA timezone (e.g.,
America/New_York,Europe/London,Asia/Tokyo)Configurable defaults: Set server default timezone via environment variables
Smart fallbacks: Automatically falls back to UTC if no timezone is configured
Robust validation: Validates timezone identifiers and provides helpful error messages
ISO-compatible format: Returns properly formatted datetime strings with timezone information
Related MCP server: Time MCP Server
Installation
There are two ways to install and configure this MCP server:
Installing via Smithery
To install datetime-mcp for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @pinkpixel-dev/datetime-mcp --client claude1. Installation from NPM (Recommended)
Install the package globally using npm:
npm install -g @pinkpixel/datetime-mcpThen, add the following configuration to your MCP client's settings file.
Basic Configuration (Uses UTC)
{
"mcpServers": {
"datetime": {
"command": "npx",
"args": [
"-y",
"@pinkpixel/datetime-mcp"
]
}
}
}Configuration with Default Timezone
{
"mcpServers": {
"datetime": {
"command": "npx",
"args": [
"-y",
"@pinkpixel/datetime-mcp"
],
"env": {
"TZ": "America/New_York"
}
}
}
}2. Local Development Setup
If you want to run the server directly from a cloned repository for development or testing:
Clone the repository:
# git clone https://github.com/pinkpixel/datetime-mcp.git cd datetime-mcpInstall dependencies:
npm installBuild the server:
npm run buildAdd the following configuration to your MCP client's settings file, making sure to replace
/path/to/datetime-mcpwith the actual absolute path to where you cloned the repository:Basic Local Configuration
{ "mcpServers": { "datetime-local": { "command": "node", "args": ["/path/to/datetime-mcp/build/index.js"], } } }Local Configuration with Timezone
{ "mcpServers": { "datetime-local": { "command": "node", "args": ["/path/to/datetime-mcp/build/index.js"], "env": { "TZ": "Europe/London" } } } }
(Restart your MCP client application after updating the settings)
π Timezone Configuration Examples
Common Timezone Identifiers
United States
"TZ": "America/New_York" // Eastern Time (EST/EDT)
"TZ": "America/Chicago" // Central Time (CST/CDT)
"TZ": "America/Denver" // Mountain Time (MST/MDT)
"TZ": "America/Los_Angeles" // Pacific Time (PST/PDT)
"TZ": "America/Phoenix" // Arizona (no DST)
"TZ": "America/Anchorage" // Alaska Time
"TZ": "America/Honolulu" // Hawaii TimeEurope
"TZ": "Europe/London" // GMT/BST (Greenwich Mean Time)
"TZ": "Europe/Paris" // CET/CEST (Central European Time)
"TZ": "Europe/Berlin" // CET/CEST
"TZ": "Europe/Rome" // CET/CEST
"TZ": "Europe/Madrid" // CET/CEST
"TZ": "Europe/Amsterdam" // CET/CEST
"TZ": "Europe/Stockholm" // CET/CEST
"TZ": "Europe/Moscow" // MSK (Moscow Time)Asia
"TZ": "Asia/Tokyo" // JST (Japan Standard Time)
"TZ": "Asia/Shanghai" // CST (China Standard Time)
"TZ": "Asia/Seoul" // KST (Korea Standard Time)
"TZ": "Asia/Kolkata" // IST (India Standard Time)
"TZ": "Asia/Dubai" // GST (Gulf Standard Time)
"TZ": "Asia/Singapore" // SGT (Singapore Time)
"TZ": "Asia/Bangkok" // ICT (Indochina Time)Other Regions
"TZ": "Australia/Sydney" // AEST/AEDT (Australian Eastern)
"TZ": "Australia/Melbourne" // AEST/AEDT
"TZ": "Australia/Perth" // AWST (Australian Western)
"TZ": "Pacific/Auckland" // NZST/NZDT (New Zealand)
"TZ": "Africa/Cairo" // EET (Eastern European Time)
"TZ": "America/Sao_Paulo" // BRT (Brazil Time)
"TZ": "UTC" // Coordinated Universal TimeUsage Examples
Tool Usage Without Timezone Parameter
User: What time is it?
Assistant: (calls get_current_datetime with no parameters)
Response: "The current date and time is: 2025-09-06T19:30:00.000-04:00 (America/New_York)"Tool Usage With Timezone Parameter
User: What time is it in Tokyo?
Assistant: (calls get_current_datetime with timezone: "Asia/Tokyo")
Response: "The current date and time in Asia/Tokyo is: 2025-09-07T08:30:00.000+09:00"Multiple Timezone Queries
User: What time is it in London and Los Angeles?
Assistant:
- London: (calls with timezone: "Europe/London")
- Los Angeles: (calls with timezone: "America/Los_Angeles")2. Local Development Setup
Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:
npm run inspectorThe Inspector will provide a URL to access debugging tools in your browser.
License π
Apache 2.0 License - Copyright (c) 2025 Pink Pixel
Available Tools
1 toolget_current_datetimeA
Get the current server date and time. Optionally specify a timezone (e.g., 'America/New_York', 'Europe/London', 'Asia/Tokyo'). Defaults to server's configured timezone or UTC.
| Name | Required | Description | Default |
|---|---|---|---|
| timezone | No | Optional timezone identifier (e.g., 'America/New_York', 'Europe/London', 'Asia/Tokyo'). If not provided, uses the server's default timezone or 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. It discloses that the tool returns current datetime and defaults to server/UTC timezone, but lacks details on response format, precision, or error handling. It adds basic behavioral context but misses richer operational 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 front-loaded with the core purpose, followed by an efficient explanation of the optional parameter. Both sentences are necessary and contribute directly to understanding, with zero wasted words.
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 optional parameter and no output schema, the description adequately covers purpose and usage. However, without annotations or output details, it lacks information on return format (e.g., ISO string, object) and error cases, leaving minor 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?
Schema description coverage is 100%, so the schema fully documents the single optional parameter. The description adds minimal value by restating the timezone examples and default behavior already in the schema, 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 clearly states the specific action ('Get') and resource ('current server date and time'), with no siblings to differentiate from. It precisely defines what the tool does without being vague or tautological.
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 for when to use the optional timezone parameter, but since there are no sibling tools, it cannot specify alternatives or exclusions. It effectively guides usage within its isolated scope.
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. Dates show when Glama detected each change.
1 tool update
- First observed
get_current_datetime
TDQS
With only one tool, there is no possibility of ambiguity or overlap between tools. The tool's purpose is clearly defined as retrieving the current date and time, with no other tools to confuse it with.
The single tool name 'get_current_datetime' follows a clear verb_noun pattern (get + current_datetime). Since there is only one tool, consistency is inherently perfect with no deviations to assess.
One tool is too few for a server named 'DateTime MCP Server', which suggests a broader scope for date and time operations. A single tool for getting the current datetime feels thin, lacking basic operations like formatting, parsing, timezone conversion, or date arithmetic that would be expected in this domain.
The tool surface is severely incomplete for a date/time server. It only provides current datetime retrieval, missing essential operations such as date formatting, parsing strings into dates, calculating differences, adding/subtracting time, or handling timezone conversions beyond the optional parameter in the single tool.
Maintenance
Related MCP Connectors
A real clock for AI agents: current time, timezone conversion, and DST facts from the IANA tzdb.
Current time, timezone conversion & date math for AI agents. On Cloudflare Workers.
Get the current time in any timezone and quickly look up common timezone info. Set a default timezβ¦
Deterministic time tools for AI agents: timezone conversion, business-day math, cron interpretation.
Related MCP Servers
- AlicenseBqualityDmaintenanceProvides current time information and timezone conversion capabilities using IANA timezone names. Enables LLMs to get current time in any timezone and convert times between different timezones with automatic system timezone detection.2MIT
- AlicenseBqualityDmaintenanceProvides current time information and timezone conversion capabilities using IANA timezone names with automatic system detection. It enables LLMs to fetch local or global times and convert specific timestamps between different regions.22MIT
- 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
- AlicenseAqualityCmaintenanceProvides accurate system time to LLM applications with multi-timezone support via a simple tool call.1MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/pinkpixel-dev/datetime-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server