datetime-mcp
The datetime-mcp server exposes the host OS clock as MCP tools over stdio transport, providing lightweight date/time utilities:
Get current date/time (
datetime.now): Retrieve the current date and time from the host OS clock, optionally specifying an IANA timezone (e.g.,America/New_York). Returns UTC ISO string, epoch milliseconds, and a human-readable format.Parse a date/time string (
datetime.parse): Convert any JSDate-compatible string into canonical forms (UTC ISO, epoch milliseconds, human-readable). Optionally accepts an IANA timezone for localized output.Check server health (
datetime.health): Retrieve server metrics including wall clock epoch time, monotonic time (immune to NTP adjustments), and process uptime in milliseconds.
A default timezone can be configured via the MCP_TZ environment variable (defaults to Australia/Perth). The server can be run via npx, global npm install, or local development, and integrates with Claude Code or Claude Desktop.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@datetime-mcpWhat's the current time in New York?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
datetime-mcp
A lightweight MCP server that exposes the host OS clock as date/time tools over stdio transport.
Quick Start
npx datetime-mcpOr install globally:
npm install -g datetime-mcpTools
datetime.now
Returns the current date/time from the host OS clock.
Parameter | Required | Description |
| no | IANA timezone (e.g. |
{
"tz": "Australia/Perth",
"utcIso": "2026-01-22T03:30:00.000Z",
"epochMs": 1737516600000,
"human": "Thu, 22 Jan 2026, 11:30:00 AWST"
}datetime.parse
Parses a date/time string and returns canonical forms.
Parameter | Required | Description |
| yes | Date/time string parseable by JS |
| no | IANA timezone for human-readable output |
{
"input": "2026-01-22",
"tz": "Australia/Perth",
"utcIso": "2026-01-22T00:00:00.000Z",
"epochMs": 1737504000000,
"human": "Thu, 22 Jan 2026, 08:00:00 AWST"
}datetime.health
Returns server health metrics including monotonic time (won't jump with NTP adjustments).
{
"wallEpochMs": 1737516600000,
"monotonicMs": 12345678,
"processUptimeMs": 5000
}Configuration
Claude Code
Add to ~/.claude/settings.json or project .mcp.json:
{
"mcpServers": {
"datetime": {
"command": "npx",
"args": ["-y", "datetime-mcp"],
"env": {
"MCP_TZ": "Australia/Perth"
}
}
}
}Claude Desktop
Add to your Claude Desktop MCP config:
{
"mcpServers": {
"datetime": {
"command": "npx",
"args": ["-y", "datetime-mcp"],
"env": {
"MCP_TZ": "Australia/Perth"
}
}
}
}Environment Variables
Variable | Default | Description |
|
| Default IANA timezone |
Development
pnpm install
pnpm dev # run with tsx (hot reload)
pnpm build # compile TypeScript
pnpm start # run compiled outputLicense
MIT
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/joshuaboys/datetime-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server