Integrates with Claude Desktop on macOS, using a configuration file in ~/Library/Application Support/Claude/ to provide date and time services.
DateTime MCP Server
A simple MCP server that provides accurate date and time information to Claude Code and Claude Desktop.
This server ensures Claude always uses the correct current date and time when creating documents, logs, or any time-sensitive content.
Features
Tools
get_current_datetime
- Get the current date and time- Supports multiple formats: ISO 8601, Unix timestamp, human-readable, or custom format
- Optional timezone parameter
get_current_date
- Get only the current date- Formats: ISO (YYYY-MM-DD), US (MM/DD/YYYY), EU (DD/MM/YYYY), or custom
get_current_time
- Get only the current time- Formats: 24-hour (HH), 12-hour (hh AM/PM), or custom
- Optional seconds display
Custom Format Support
Use format strings with these placeholders:
YYYY
- 4-digit yearMM
- 2-digit monthDD
- 2-digit dayHH
- 2-digit hour (24-hour)mm
- 2-digit minutesss
- 2-digit seconds
Example: "YYYY-MM-DD HH:mm"
→ "2025-07-31 14:30"
Development
Install dependencies:
Build the server:
For development with auto-rebuild:
Installation
For Claude Desktop
The server config was automatically added during setup. To verify:
On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
For Claude Code CLI
Add the server to Claude Code:
To remove the server:
Debugging
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.
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
A simple MCP server that provides accurate date and time information to Claude models, ensuring they always use the correct current date and time when creating time-sensitive content.
Related MCP Servers
- AsecurityAlicenseAqualityA datetime formatting service implemented as an MCP server for the Claude Desktop Application. Supports generation of datetime strings in various formats.Last updated -118PythonMIT License
- AsecurityAlicenseAqualityA Claude MCP server that allows Claude to interact with your FreeAgent account to track time, manage timers, and handle timeslip operations.Last updated -71JavaScriptMIT License
- -securityFlicense-qualityA Claude Model Configuration Protocol (MCP) server that provides real-time timezone-aware date and time information.Last updated -Python
- -securityFlicense-qualityA simple Model Context Protocol (MCP) server that provides date and time functionality in any timezone, along with user profiles and personalized greeting resources.Last updated -Python