@pinkpixel/datetime-mcp 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
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:
1. Installation from NPM (Recommended)
Install the package globally using npm:
Then, add the following configuration to your MCP client's settings file.
Basic Configuration (Uses UTC)
Configuration with Default Timezone
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 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
Europe
Asia
Other Regions
Usage Examples
Tool Usage Without Timezone Parameter
Tool Usage With Timezone Parameter
Multiple Timezone Queries
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:
The Inspector will provide a URL to access debugging tools in your browser.
License 📄
MIT License - Copyright (c) 2025 Pink Pixel