Name | mcp-datetime JSON |
Version |
0.1.4
JSON |
| download |
home_page | None |
Summary | A MCP server for datetime formatting and file name generation. |
upload_time | 2024-12-13 06:38:09 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.12 |
license | MIT |
keywords |
claude
datetime
format
mcp
time
timezone
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# mcp-datetime
[![Python Version](https://img.shields.io/badge/python-3.12-blue.svg)](https://www.python.org/downloads/)
[![MCP Version](https://img.shields.io/badge/mcp-1.1.1-green.svg)](https://github.com/anaisbetts/mcp)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
English | [ๆฅๆฌ่ช](README_ja.md)
A datetime formatting service implemented as an MCP server for the Claude Desktop Application. Supports generation of datetime strings in various formats.
> **Note**: This package has been tested only on macOS. Windows compatibility has not been verified.
## Prerequisites
Before using mcp-datetime, ensure you have the following tools installed:
- Python 3.12 or later
- uv (Python package installer)
- uvx (Python package runner)
## Features
- โจ Support for various datetime formats
- ๐ฏ๐ต Japanese language support
- ๐ Optimized formats for filename generation
- ๐ Accurate timezone handling
- ๐ง Seamless integration with Claude Desktop App
## MCP Server Components
### Tools
The server implements one tool:
- `get_datetime`: Get current date and time in various formats
- Takes "format" as a required string argument
- Returns formatted datetime string based on specified format
- Supports multiple format types including standard, Japanese, and ISO formats
## Usage with Claude Desktop App
Add the following to your config file:
Config file location (macOS):
`~/Library/Application Support/Claude/claude_desktop_config.json`
```json
{
"mcpServers": {
"mcp-datetime": {
"command": "uvx",
"args": ["mcp-datetime"]
}
}
}
```
## About Installation
If you need to install the package directly (e.g., for development or source code inspection), you can use one of these methods:
- Install from PyPI
```bash
pip install mcp-datetime
```
- Install from GitHub Source
```bash
git clone https://github.com/ZeparHyfar/mcp-datetime.git
cd mcp-datetime
pip install -e .
```
- Example `claude_desktop_config.json` for manual installation
```json
{
"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
> e.g., "/usr/local/bin/python3" or "/Users/username/.pyenv/versions/3.12.0/bin/python3"
## Basic Examples
- Command format
```
# Standard datetime format
call datetime-service.get_datetime {"format": "datetime"}
# Result: 2024-12-10 00:54:01
# Japanese format
call datetime-service.get_datetime {"format": "datetime_jp"}
# Result: 2024ๅนด12ๆ10ๆฅ 00ๆ54ๅ01็ง
# Filename format
call datetime-service.get_datetime {"format": "filename_md"}
# Result: 20241210005401.md
```
- Claude Desktop App prompt examples
- User
```
Please tell me the current time in date_slash format
```
- Claude
```
I'll get the current date in date_slash format.
The current date is 2024/12/12
```
## Supported 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 |
## Debugging
Since MCP servers run over stdio, debugging can be challenging. We recommend using the [MCP Inspector](https://github.com/modelcontextprotocol/inspector):
- Using PyPI package
```
npx @modelcontextprotocol/inspector uvx mcp-datetime
```
- Using downloaded source code from GitHub
```
git clone https://github.com/ZeparHyfar/mcp-datetime.git
npx @modelcontextprotocol/inspector uvx --directory ./mcp-datetime run mcp-datetime
```
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
Raw data
{
"_id": null,
"home_page": null,
"name": "mcp-datetime",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": null,
"keywords": "claude, datetime, format, mcp, time, timezone",
"author": null,
"author_email": "ZeparHyfar <zeparhyfar@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/75/03/a4b56142d4d2cfdb5697fa4df1aad755ddaf835bb3c47ff4a6c7699e615b/mcp_datetime-0.1.4.tar.gz",
"platform": null,
"description": "# mcp-datetime\n\n[![Python Version](https://img.shields.io/badge/python-3.12-blue.svg)](https://www.python.org/downloads/)\n[![MCP Version](https://img.shields.io/badge/mcp-1.1.1-green.svg)](https://github.com/anaisbetts/mcp)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n\nEnglish | [\u65e5\u672c\u8a9e](README_ja.md)\n\nA datetime formatting service implemented as an MCP server for the Claude Desktop Application. Supports generation of datetime strings in various formats.\n\n> **Note**: This package has been tested only on macOS. Windows compatibility has not been verified.\n\n## Prerequisites\n\nBefore using mcp-datetime, ensure you have the following tools installed:\n\n- Python 3.12 or later\n- uv (Python package installer)\n- uvx (Python package runner)\n\n## Features\n\n- \u2728 Support for various datetime formats\n- \ud83c\uddef\ud83c\uddf5 Japanese language support\n- \ud83d\udcc1 Optimized formats for filename generation\n- \ud83c\udf0f Accurate timezone handling\n- \ud83d\udd27 Seamless integration with Claude Desktop App\n\n## MCP Server Components\n\n### Tools\n\nThe server implements one tool:\n\n- `get_datetime`: Get current date and time in various formats\n - Takes \"format\" as a required string argument\n - Returns formatted datetime string based on specified format\n - Supports multiple format types including standard, Japanese, and ISO formats\n\n## Usage with Claude Desktop App\n\nAdd the following to your config file:\n\nConfig file location (macOS):\n`~/Library/Application Support/Claude/claude_desktop_config.json`\n\n```json\n{\n \"mcpServers\": {\n \"mcp-datetime\": {\n \"command\": \"uvx\",\n \"args\": [\"mcp-datetime\"]\n }\n }\n}\n```\n\n## About Installation\n\nIf you need to install the package directly (e.g., for development or source code inspection), you can use one of these methods:\n\n- Install from PyPI\n\n ```bash\n pip install mcp-datetime\n ```\n\n- Install from GitHub Source\n\n ```bash\n git clone https://github.com/ZeparHyfar/mcp-datetime.git\n cd mcp-datetime\n pip install -e .\n ```\n\n- Example `claude_desktop_config.json` for manual installation\n\n ```json\n {\n \"mcpServers\": {\n \"mcp-datetime\": {\n \"command\": \"python\",\n \"args\": [\"-m\", \"mcp_datetime\"],\n \"env\": {\n \"PYTHON\": \"/path/to/your/python\"\n }\n }\n }\n }\n ```\n\n Replace \"/path/to/your/python\" with your actual Python interpreter path\n > e.g., \"/usr/local/bin/python3\" or \"/Users/username/.pyenv/versions/3.12.0/bin/python3\"\n\n## Basic Examples\n\n- Command format\n\n ```\n # Standard datetime format\n call datetime-service.get_datetime {\"format\": \"datetime\"}\n # Result: 2024-12-10 00:54:01\n\n # Japanese format\n call datetime-service.get_datetime {\"format\": \"datetime_jp\"}\n # Result: 2024\u5e7412\u670810\u65e5 00\u664254\u520601\u79d2\n\n # Filename format\n call datetime-service.get_datetime {\"format\": \"filename_md\"}\n # Result: 20241210005401.md\n ```\n\n- Claude Desktop App prompt examples\n\n - User\n\n ```\n Please tell me the current time in date_slash format\n ```\n\n - Claude\n\n ```\n I'll get the current date in date_slash format.\n\n The current date is 2024/12/12\n ```\n\n## Supported Formats\n\n| Format Name | Example | Description |\n| ------------ | --------------------------- | ---------------------------- |\n| date | 2024-12-10 | Standard date format |\n| date_slash | 2024/12/10 | Date with slashes |\n| date_jp | 2024\u5e7412\u670810\u65e5 | Japanese date format |\n| datetime | 2024-12-10 00:54:01 | Standard datetime |\n| datetime_jp | 2024\u5e7412\u670810\u65e5 00\u664254\u520601\u79d2 | Japanese datetime |\n| datetime_t | 2024-12-10T00:54:01 | DateTime with T separator |\n| compact | 20241210005401 | Compact format for IDs |\n| compact_date | 20241210 | Compact date only |\n| compact_time | 005401 | Compact time only |\n| filename_md | 20241210005401.md | Markdown filename |\n| filename_txt | 20241210005401.txt | Text filename |\n| filename_log | 20241210005401.log | Log filename |\n| iso | 2024-12-10T00:54:01+0900 | ISO 8601 format |\n| iso_basic | 20241210T005401+0900 | Basic ISO format |\n| log | 2024-12-10 00:54:01.123456 | Log format with microseconds |\n| log_compact | 20241210_005401 | Compact log format |\n| time | 00:54:01 | Time only |\n| time_jp | 00\u664254\u520601\u79d2 | Japanese time format |\n\n## Debugging\n\nSince MCP servers run over stdio, debugging can be challenging. We recommend using the [MCP Inspector](https://github.com/modelcontextprotocol/inspector):\n\n- Using PyPI package\n\n ```\n npx @modelcontextprotocol/inspector uvx mcp-datetime\n ```\n\n- Using downloaded source code from GitHub\n\n ```\n git clone https://github.com/ZeparHyfar/mcp-datetime.git\n npx @modelcontextprotocol/inspector uvx --directory ./mcp-datetime run mcp-datetime\n ```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A MCP server for datetime formatting and file name generation.",
"version": "0.1.4",
"project_urls": {
"Repository": "https://github.com/ZeparHyfar/mcp-datetime.git"
},
"split_keywords": [
"claude",
" datetime",
" format",
" mcp",
" time",
" timezone"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1c093779f1b85135c74426d1052a53edaa46a3ba31cc10aa3aaa13d9e0e1f1a0",
"md5": "e4d9ae2aaa067e2709af75b1a8c36309",
"sha256": "9f1959f56b0b6afb79dd2e37f13d5b47de3e3aa9099af1cfecc832d216962d25"
},
"downloads": -1,
"filename": "mcp_datetime-0.1.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e4d9ae2aaa067e2709af75b1a8c36309",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 6306,
"upload_time": "2024-12-13T06:38:08",
"upload_time_iso_8601": "2024-12-13T06:38:08.224526Z",
"url": "https://files.pythonhosted.org/packages/1c/09/3779f1b85135c74426d1052a53edaa46a3ba31cc10aa3aaa13d9e0e1f1a0/mcp_datetime-0.1.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "7503a4b56142d4d2cfdb5697fa4df1aad755ddaf835bb3c47ff4a6c7699e615b",
"md5": "166ac22fc9b1dd3a0aeb2aee7e1256d1",
"sha256": "112305394a7f9625f0fc2802bc975c77d738c30257704756608b8d2d5edeb00e"
},
"downloads": -1,
"filename": "mcp_datetime-0.1.4.tar.gz",
"has_sig": false,
"md5_digest": "166ac22fc9b1dd3a0aeb2aee7e1256d1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 7261,
"upload_time": "2024-12-13T06:38:09",
"upload_time_iso_8601": "2024-12-13T06:38:09.451540Z",
"url": "https://files.pythonhosted.org/packages/75/03/a4b56142d4d2cfdb5697fa4df1aad755ddaf835bb3c47ff4a6c7699e615b/mcp_datetime-0.1.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-13 06:38:09",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ZeparHyfar",
"github_project": "mcp-datetime",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "mcp-datetime"
}