Current date and time for AI assistants: UTC, local+offset and epoch together. Any IANA zone.
Real-time date and time access for AI assistants via Model Context Protocol (MCP)
Built for AI, Built with AI - Enhancing AI assistant capabilities through intelligent tooling
@strix-ai/currentdt-mcp is an MCP server that provides AI assistants with instant access to current date and time information. Essential for generating timestamped code, migration files, and dated documentation.
# No install required -- point your MCP client at npx (see integration guides below)
npx -y @strix-ai/currentdt-mcp
# Or install globally
npm install -g @strix-ai/currentdt-mcp
Requires Node.js 18 or newer.
βββββββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββββββ
β User Asks for βββββΆβ AI Assistant βββββΆβ get_current_ β
β Timestamped Code β β β β datetime Tool β
βββββββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββββββ
β Timestamped Output ββββββ Current Time ββββββ CurrentDT MCP β
β Generated β β Returned β β Server β
βββββββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββ βββββββββββββββββββββββ
β Formatted ββββββ Local/Remote β
β DateTime β β Time Provider β
βββββββββββββββββββ βββββββββββββββββββββββ
timezone: "Asia/Tokyo" on the current time, and a
convert_timezone tool that is DST-correct for the date in questionYYYY-MM-DD HH:mm Z)structuredContent with a declared schema, plus plain text for older clientsnpx -y and go; Node 18+Every client below uses the same server entry. npx -y fetches the package on first
use and suppresses the install prompt, so nothing needs to be installed beforehand.
{
"command": "npx",
"args": ["-y", "@strix-ai/currentdt-mcp"]
}
Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json in a project:
{
"mcpServers": {
"currentdt": {
"command": "npx",
"args": ["-y", "@strix-ai/currentdt-mcp"]
}
}
}
One-click: download currentdt-mcp.mcpb from the
latest release and
open it -- Claude Desktop installs it as an extension. No Node, npm or config file needed.
Or by config: edit claude_desktop_config.json -- on macOS at
~/Library/Application Support/Claude/, on Windows at %APPDATA%\Claude\:
{
"mcpServers": {
"currentdt": {
"command": "npx",
"args": ["-y", "@strix-ai/currentdt-mcp"]
}
}
}
Add to .vscode/mcp.json in a workspace, or under "mcp" in user settings.json:
{
"servers": {
"currentdt": {
"command": "npx",
"args": ["-y", "@strix-ai/currentdt-mcp"]
}
}
}
Add to ~/.codeium/windsurf/mcp_config.json, same mcpServers shape as Cursor.
If you prefer a fixed install over npx, run npm install -g @strix-ai/currentdt-mcp
and use "command": "currentdt-mcp" with no args in any of the configs above.
User: "Create a migration to add user preferences table"
Result: Migration file named 2025-08-26-143000_add_user_preferences.sql with current timestamp
MCP Tool Call Example:
{
"tool": "get_current_datetime",
"arguments": {
"format": "YYYY-MM-DD-HHmmss",
"provider": "local"
}
}
User: "Generate a logger that includes timestamps"
Result: Logger implementation with current ISO datetime format
User: "Update the changelog with today's date"
Result: Changelog entry with current date: ## [Unreleased] - 2026-09-16
get_current_datetimeParameters:
format (optional): "iso" (default) or a token pattern like "YYYY-MM-DD HH:mm:ss"timezone (optional): IANA name, e.g. "Asia/Tokyo". Sets the zone for local,
offset, timezone and any token format. Defaults to the host's zone. iso/utc
are always UTC regardless.provider (optional): "local" (default) or "remote"Returns: the formatted string as text content, plus structuredContent stating the
same instant from every clock -- so there is never any doubt whether a value is UTC or local:
{
"formatted": "2026-09-16 16:01:08",
"iso": "2026-09-16T14:01:08.624Z",
"utc": "2026-09-16T14:01:08.624Z",
"local": "2026-09-16T16:01:08.624+02:00",
"offset": "+02:00",
"timezone": "Europe/Berlin",
"epochMs": 1789567268624,
"provider": "local"
}
Invalid input (a token-less format, an unknown timezone, a failed provider) comes
back as a tool error (isError: true) with a message written to be read by the model.
convert_timezoneRe-states a time in another zone, DST-correct for the date -- the case where a remembered offset is most likely wrong.
Parameters:
time (required): ISO 8601. With an offset ("2026-03-29T01:30:00+01:00", "...Z")
it pins an instant. Without one it is a wall-clock reading and from is required.from (optional): IANA zone the wall-clock time was read in.to (required): IANA zone to convert into.format (optional): token pattern for the text result, rendered in to.Returns: the same structured shape as above (minus provider), plus from and
dstTransition -- true when the instant is within an hour of a DST changeover in to.
{
"tool": "convert_timezone",
"arguments": { "time": "2026-07-15T09:00:00", "from": "America/New_York", "to": "Europe/Berlin" }
}
Result: local: "2026-07-15T15:00:00.000+02:00". The same call for a January date yields
+01:00, because the offset follows the calendar, not a constant.
A wall-clock time that never exists (the spring-forward gap) resolves to the instant
after the gap; one that exists twice (the autumn repeat) resolves to the first. An
offset-less time with no from is refused rather than guessed.
Example:
{
"tool": "get_current_datetime",
"arguments": {
"format": "YYYY-MM-DD HH:mm:ss",
"provider": "local"
}
}
Create currentdt-config.json for custom settings:
{
"defaultFormat": "iso",
"defaultProvider": "local",
"providers": {
"local": { "name": "local", "priority": 1 },
"remote": {
"name": "remote",
"priority": 2,
"config": {
"url": "https://worldtimeapi.org/api/timezone/UTC",
"timeout": 5000
}
}
},
"debug": false,
"logLevel": "error"
}
Environment variables override the file: CURRENTDT_FORMAT, CURRENTDT_PROVIDER,
CURRENTDT_DEBUG, CURRENTDT_CONFIG.
Timezone:
"iso"returns UTC. Every token pattern renders the wall clock intimezone(default: the host's zone). Add theZtoken to emit the real UTC offset -- never write a literalZinto a pattern, since that would label local digits as UTC.
For timezone: "Europe/Berlin" (UTC+02:00 in summer), at the instant 2025-08-26T14:30:00.123Z:
| format | output | zone |
|---|---|---|
"iso" | 2025-08-26T14:30:00.123Z | UTC |
"YYYY-MM-DD" | 2025-08-26 | local |
"YYYY-MM-DD HH:mm:ss" | 2025-08-26 16:30:00 | local |
"MM/DD/YYYY" | 08/26/2025 | local |
"YYYY-MM-DD-HHmmss" | 2025-08-26-163000 | local |
"YYYY-MM-DDTHH:mm:ss.SSSZ" | 2025-08-26T16:30:00.123+02:00 | local + offset |
Tokens: YYYY MM DD HH mm ss SSS Z (+02:00) ZZ (+0200).
Named patterns: filename, logdate, simple.
A pattern must contain at least one token. Free text such as "what time is it" is
rejected rather than echoed back.
# Verify installation
npm list -g @strix-ai/currentdt-mcp
# Test server directly
npx @strix-ai/currentdt-mcp --test
export CURRENTDT_DEBUG=true
npx @strix-ai/currentdt-mcp
git clone https://github.com/biswajitpanday/CurrentDT-mcp.git
cd currentdt-mcp
npm install
npm run dev
npm run build - Build TypeScriptnpm test - Run all testsnpm run lint - ESLint checknpm run format - Prettier formatgit checkout -b feature/amazing-featuregit commit -m 'Add amazing feature'git push origin feature/amazing-featureMIT License - see LICENSE file for details.
Made with β€οΈ by Biswajit Panday
Source-derived launch command. Check the maintainerβs required arguments and credentials before running:
npx -y @strix-ai/currentdt-mcpMerge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"io-github-biswajitpanday-currentdt-mcp": {
"command": "npx",
"args": [
"-y",
"@strix-ai/currentdt-mcp"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the clientβs tool list, then try a read-only example from its documentation.
Claude Desktop setup reference@strix-ai/currentdt-mcpnpmio.github.biswajitpanday/currentdt-mcp works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.