Provides current date and time with configurable formats and timezones.
{{ message }}
TakanariShimbo / uvx-datetime-mcp-server Public
A Model Context Protocol (MCP) server that provides tools to get the current date and time in various formats. This is a Python implementation of the datetime MCP server, demonstrating how to build MCP servers using the Python SDK.
pypi.org/project/takanarishimbo-datetime-mcp-server/
0 stars0 forksBranches Tags Activity
Star
Notifications
main
BranchesTags
Go to file
Code
Name | Name | Last commit message | Last commit date |
---|---|---|---|
24 Commits | |||
.github/workflows | .github/workflows | ||
docs | docs | ||
scripts | scripts | ||
src | src | ||
.gitignore | .gitignore | ||
pyproject.toml | pyproject.toml | ||
uv.lock | uv.lock | ||
View all files |
English | 日本語 | README
A Model Context Protocol (MCP) server that provides tools to get the current date and time in various formats. This is a Python implementation of the datetime MCP server, demonstrating how to build MCP servers using the Python SDK.
get_current_time
Choose one of these examples based on your needs:
Basic usage (ISO format):
{ "mcpServers": { "datetime": { "command": "uvx", "args": ["takanarishimbo-datetime-mcp-server"] } } }
Human-readable format with timezone:
{ "mcpServers": { "datetime": { "command": "uvx", "args": ["takanarishimbo-datetime-mcp-server"], "env": { "DATETIME_FORMAT": "human", "TIMEZONE": "America/New_York" } } } }
Unix timestamp format:
{ "mcpServers": { "datetime": { "command": "uvx", "args": ["takanarishimbo-datetime-mcp-server"], "env": { "DATETIME_FORMAT": "unix", "TIMEZONE": "UTC" } } } }
Custom format:
{ "mcpServers": { "datetime": { "command": "uvx", "args": ["takanarishimbo-datetime-mcp-server"], "env": { "DATETIME_FORMAT": "custom", "DATE_FORMAT_STRING": "%Y/%m/%d %H:%M", "TIMEZONE": "Asia/Tokyo" } } } }
The server can be configured using environment variables:
DATETIME_FORMAT
Controls the default output format of the datetime (default: "iso")
Supported formats:
iso
: ISO 8601 format (2024-01-01T12:00:00.000000+00:00)unix
: Unix timestamp in secondsunix_ms
: Unix timestamp in millisecondshuman
: Human-readable format (Mon, Jan 1, 2024 12:00:00 PM UTC)date
: Date only (2024-01-01)time
: Time only (12:00:00)custom
: Custom format using DATE_FORMAT_STRING environment variableDATE_FORMAT_STRING
Custom date format string (only used when DATETIME_FORMAT="custom") Default: "%Y-%m-%d %H:%M:%S"
Uses Python's strftime format codes:
%Y
: 4-digit year%y
: 2-digit year%m
: 2-digit month%d
: 2-digit day%H
: 2-digit hour (24-hour)%M
: 2-digit minute%S
: 2-digit secondTIMEZONE
Timezone to use (default: "UTC") Examples: "UTC", "America/New_York", "Asia/Tokyo"
get_current_time
Get the current date and time
Parameters:
format
(optional): Output format, overrides DATETIME_FORMAT env vartimezone
(optional): Timezone to use, overrides TIMEZONE env varThis project uses PyPI's Trusted Publishers feature for secure, token-less publishing via GitHub Actions.
TakanariShimbo
(your GitHub username/org)uvx-datetime-mcp-server
pypi-publish.yml
pypi
(optional but recommended)pypi
The release script needs to push to GitHub, so you'll need a GitHub token:
repo
(Full control of private repositories)ghp_
)gh auth login
git config --global credential.helper store
Use the release script to automatically version, tag, and trigger publishing:
chmod +x scripts/release.sh
./scripts/release.sh patch
./scripts/release.sh minor
./scripts/release.sh major
./scripts/release.sh 1.2.3
pip show takanarishimbo-datetime-mcp-server
release.sh
script updates version in all filespip install
or uvx
This project uses ruff
for linting and formatting:
uv run ruff check
uv run ruff check --fix
uv run ruff format
uvx-datetime-mcp-server/
├── src/
│ ├── __init__.py # Package initialization
│ ├── __main__.py # Main entry point
│ └── server.py # Server implementation
├── pyproject.toml # Project configuration
├── uv.lock # Dependency lock file
├── .github/
│ └── workflows/
│ └── pypi-publish.yml # PyPI publish workflow with Trusted Publishers
├── scripts/
│ └── release.sh # Release automation script
├── docs/
│ ├── README.md # This file
│ └── README_ja.md # Japanese documentation
└── .gitignore # Git ignore file
MIT
Readme
Activity
0 stars
0 watching
0 forks
Report repository
4 tags
No packages published
MCP server for managing accounting and taxes with Norman Finance.
An MCP server for interacting with the YuQue knowledge base, enabling AI assistants to perform operations on documents and information.
Guides problem-solving by breaking down complex problems and recommending the best MCP tools for each step.
AI Task schedule planning with LLamaIndex and Timefold: breaks down a task description and schedules it around an existing calendar
AI-powered task orchestration and workflow automation with specialized agent roles, intelligent task decomposition, and seamless integration across Claude Desktop, Cursor IDE, Windsurf, and VS Code.
Connect AI agents with the Feishu/Lark platform for automation, including document processing, conversation management, and calendar scheduling.
Access and manage your VISO TRUST third-party risk program directly through your AI assistant.
Access and analyze Fathom Analytics data and reports
Marketing insights and audience analysis from Audiense reports, covering demographic, cultural, influencer, and content engagement analysis.
A CLI tool to synchronize MCP (Model Context Protocol) settings across multiple AI coding tools.