ZeparHyfar/mcp-datetime
Free提供各种格式的日期和时间功能的 MCP 服务器。
FreeFree tier
About ZeparHyfar/mcp-datetime
A Model Context Protocol (MCP) server for datetime formatting and file name generation, designed for integration with the Claude Desktop application. Supports a wide range of datetime formats including standard, ISO 8601, Japanese language, and compact formats optimized for filenames. Features accurate timezone handling and a single tool (get_datetime) that accepts a format string and returns the formatted current datetime. Open-source, written in Python, and installable via pip or uvx.
Key Features
Support for various datetime formats (date, date_slash, date_jp, datetime, datetime_jp, datetime_t, compact, compact_date, compact_time, filename_md, filename_txt, filename_log, iso, iso_basic)
Japanese language support (date_jp, datetime_jp formats)
Optimized formats for filename generation (filename_md, filename_txt, filename_log)
Accurate timezone handling
Seamless integration with Claude Desktop App via MCP protocol
Single easy-to-use tool: get_datetime
Pros & Cons
Pros
- Simple and focused: does one thing well (datetime formatting)
- Broad format coverage including Japanese and ISO standards
- Automatic timezone handling ensures accuracy across regions
- Designed specifically for Claude Desktop, enabling natural language time queries
- Optimized filename formats reduce manual renaming for exports
- Open-source and easy to install via uvx or pip
Cons
- Only tested on macOS; Windows compatibility not verified
- Limited to a single tool (get_datetime) – no date arithmetic or timezone conversion beyond formatting
- Requires Python 3.12+ and the uv package runner for default setup
- No flexibility to specify custom format strings – only predefined format names are supported
Best For
Generating timestamps for markdown filenames in note-taking workflowsInserting current date/time in various formats into documents via Claude DesktopCreating compact date-time IDs for logging or unique identifiersObtaining Japanese-formatted date/time strings for region-specific contentGenerating ISO 8601 timestamps for data exports or API requests
FAQ
What datetime formats are supported?
The server supports 14 predefined formats including date (2024-12-10), date_slash (2024/12/10), date_jp (2024年12月10日), datetime (2024-12-10 00:54:01), datetime_jp (2024年12月10日 00時54分01秒), datetime_t (2024-12-10T00:54:01), compact (20241210005401), compact_date (20241210), compact_time (005401), filename_md (20241210005401.md), filename_txt (20241210005401.txt), filename_log (20241210005401.log), iso (2024-12-10T00:54:01+0900), and iso_basic (20241210T005401+0900).
How do I install mcp-datetime?
The recommended installation is using uvx: add `{ "mcpServers": { "mcp-datetime": { "command": "uvx", "args": ["mcp-datetime"] } } }` to your Claude Desktop config file. Alternatively, install from PyPI (`pip install mcp-datetime`) or from GitHub source and configure with a Python command.
How do I use the get_datetime tool in Claude Desktop?
Add the server to your claude_desktop_config.json, then ask Claude for the current time in a specific format. For example, say 'Please tell me the current time in date_slash format' and Claude will call the tool and return the formatted result.
Is mcp-datetime compatible with Windows?
The package has only been tested on macOS. Windows compatibility has not been verified.