Get current date and time in various formats
DateTime Formatter is a specialized tool that provides extensive datetime formatting capabilities through a simple MCP interface. It supports a wide range of formats including standard ISO formats, Japanese language formats, and optimized formats for filename generation. With this tool, you can easily generate properly formatted datetime strings for documentation, logging, file naming, and other use cases where consistent datetime formatting is essential. The service handles timezone information accurately and integrates seamlessly with the Claude Desktop Application.
DateTime Formatter is an MCP server that provides various datetime formatting capabilities. It allows you to generate current date and time strings in multiple formats, including standard formats, Japanese language formats, and specialized formats for filenames.
Before installing DateTime Formatter, ensure you have:
Install the package using pip:
pip install mcp-datetime
Alternatively, you can install directly from GitHub:
git clone https://github.com/ZeparHyfar/mcp-datetime.git
cd mcp-datetime
pip install -e .
Configure your Claude Desktop App by adding the following to your configuration file:
Config file location (macOS):
~/Library/Application Support/Claude/claude_desktop_config.json
Add the following configuration:
{
"mcpServers": {
"mcp-datetime": {
"command": "uvx",
"args": ["mcp-datetime"]
}
}
}
For manual installation, you can use:
{
"mcpServers": {
"mcp-datetime": {
"command": "python",
"args": ["-m", "mcp_datetime"],
"env": {
"PYTHON": "/path/to/your/python"
}
}
}
}
Replace "/path/to/your/python" with your actual Python interpreter path.
To use DateTime Formatter with Claude Desktop App, you can ask Claude to get the current time in a specific format:
Please tell me the current time in date_slash format
Claude will respond with the current date in the requested format:
I'll get the current date in date_slash format.
The current date is 2024/12/12
DateTime Formatter supports a wide range of formats:
| Format Name | Example | Description | | --- | --- | --- | | date | 2024-12-10 | Standard date format | | date_slash | 2024/12/10 | Date with slashes | | date_jp | 2024年12月10日 | Japanese date format | | datetime | 2024-12-10 00:54:01 | Standard datetime | | datetime_jp | 2024年12月10日 00時54分01秒 | Japanese datetime | | datetime_t | 2024-12-10T00:54:01 | DateTime with T separator | | compact | 20241210005401 | Compact format for IDs | | compact_date | 20241210 | Compact date only | | compact_time | 005401 | Compact time only | | filename_md | 20241210005401.md | Markdown filename | | filename_txt | 20241210005401.txt | Text filename | | filename_log | 20241210005401.log | Log filename | | iso | 2024-12-10T00:54:01+0900 | ISO 8601 format | | iso_basic | 20241210T005401+0900 | Basic ISO format | | log | 2024-12-10 00:54:01.123456 | Log format with microseconds | | log_compact | 20241210_005401 | Compact log format | | time | 00:54:01 | Time only | | time_jp | 00時54分01秒 | Japanese time format |
Since MCP servers run over stdio, debugging can be challenging. You can use the MCP Inspector for debugging:
npx @modelcontextprotocol/inspector uvx mcp-datetime
Or with downloaded source code:
git clone https://github.com/ZeparHyfar/mcp-datetime.git
npx @modelcontextprotocol/inspector uvx --directory ./mcp-datetime run mcp-datetime
This package has been tested primarily on macOS. Windows compatibility has not been verified.