Time and Date MCP Server
An MCP server providing time and date tools for LLMs.
Overview
The Time and Date MCP Server provides date and time utilities for language models and AI assistants. It allows tools like current_time, time_since, date_diff to be called programmatically via Stdio or Streamable HTTP.
Tools
The tools exposed by the MCP server include:
- current_time - Get the current time in a given timezone.
- time_since - Human readable time elapsed since a given date.
- add_days - Add days to today and return the future date.
- subtract_days - Subtract days from today and return the past date.
- date_diff - Number of days between two dates.
- next_weekday - Date of the next occurrence of a weekday.
- is_leap_year - Check if a year is a leap year.
- week_number - ISO week number for a date.
- parse_human_date - Parse a natural language date description.
Configuration
Local Time Zone
The local time zone can be set using the environmental variable LOCAL_TIME_ZONE.
It takes a IANA Timezone, if not given it will default to Etc/UTC.
🛠️ Installation
Local Development (via uv)
From this directory:
uv sync --locked
uv tool install .
Docker Build
From the root of the repository:
docker build -f servers/time/Dockerfile -t casual-mcp-server-time .
▶️ Running the Server
➤ Stdio Mode
From Source
Install for local development and then configure:
{
"mcpServers": {
"time": {
"command": "uv",
"args": ["tool", "run", "casual-mcp-server-time"],
"env": {
"LOCAL_TIME_ZONE": "Asia/Bangkok"
}
}
}
}
Using uvx
{
"mcpServers": {
"time": {
"command": "uvx",
"args": ["casual-mcp-server-time"],
"env": {
"LOCAL_TIME_ZONE": "Asia/Bangkok"
}
}
}
}
Docker
{
"mcpServers": {
"time": {
"command": "docker",
"args": ["run", "--rm", "casual-mcp-server-time"],
"env": {
"LOCAL_TIME_ZONE": "Asia/Bangkok"
}
}
}
}
➤ Streamable HTTP Mode
From Source
uv run casual-mcp-server-time --transport streamable-http
With port/host overrides:
uv run casual-mcp-server-time --transport streamable-http --port 9000 --host 0.0.0.0
Using uvx
uvx casual-mcp-server-time --transport streamable-http
You can use the same port/host overrides as above
Docker
docker run -e MCP_TRANSPORT=streamable-http -e MCP_PORT=9000 -p 9000:9000 casual-mcp-server-time
Configuration
{
"mcpServers": {
"time": {
"type": "streamable-http",
"url": "http://localhost:9000"
}
}
}
📜 License
MIT – LICENSE
📦 PyPI
Published at: https://pypi.org/project/casual-mcp-server-time/
Metadata
Release files for casual-mcp-server-time 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| casual_mcp_server_time-1.0.0.tar.gz | 4.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| casual_mcp_server_time-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.2 kB
Release files / casual_mcp_server_time-1.0.0.tar.gz
| Download URL | casual_mcp_server_time-1.0.0.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b04e9edf26f5bd7a82678258498c5ad59b96a24138005385e0fcc9ccdd287f82
|
|
BLAKE2b-256 checksum How to use checksums |
f840b749889a3bbef90a413cc3546725e957248fcacbc6a5f1b8ffb7a44e4c4b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.12
|
Release files / casual_mcp_server_time-1.0.0-py3-none-any.whl
| Download URL | casual_mcp_server_time-1.0.0-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9b9ceeefaa042d274c2f46c65efe326d19e0948db94b83c91ecf4e9d9634e1f9
|
|
BLAKE2b-256 checksum How to use checksums |
ed15a0c7262983ce420513ccd92ab5c895443a148fa9d7a667f9e66a5d6e100d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.12
|
Security for casual-mcp-server-time 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.