
Currentdt Mcp
io.github.biswajitpanday由 GitHub 帳號 biswajitpanday 發布v2.0.3更新於 Oct 24, 2026
Current date and time for AI assistants: UTC, local+offset and epoch together. Any IANA zone.
概覽
本機 MCP 伺服器,讓助理取得目前日期時間(UTC、含位移的本機時間與 epoch),並支援任意 IANA 時區轉換。
- 可以做什麼
- 取得目前日期時間,同時以 UTC、含真實位移的本機時間與 epoch 毫秒回傳,支援 ISO 或 YYYY-MM-DD HH:mm:ss 等樣式,可指定 IANA 時區,預設使用主機時區。在 IANA 時區之間轉換指定時間,依日期正確處理日光節約時間,並標示該時刻是否接近日光節約時間切換。可選擇改用遠端時間提供者而非本機時鐘,透過設定檔或環境變數設定。
- 適用情境
- 適合助理需要可靠目前時間戳記的情境,例如命名遷移檔案、寫入含日期的變更記錄或產生含時間戳記的日誌,也適合跨時區換算且日光節約時間會影響結果的場合。
- 執行需求
- 透過 stdio 在本機執行;需要 Node.js 18 或更新版本,可用 npx 啟動或全域安裝。未宣告帳號、API 金鑰或請求標頭。可選設定檔或 CURRENTDT_* 環境變數;啟用遠端提供者時需要網路存取。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Currentdt Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
@strix-ai/currentdt-mcp
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
[npm version] [node] [License: MIT] [TypeScript]
[MSeeP.ai Security Assessment Badge]📑 Table of Contents
- Overview
- Quick Start
- User Flow
- Core Features
- MCP Client Integration
- Real-World Usage Examples
- API Reference
- Configuration
- Common Format Patterns
- Troubleshooting
- Development
- Support & Links
- Contributing
- License
Overview
@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.
Quick Start
Requires Node.js 18 or newer.
User Flow
Core Features
- Never ambiguous about timezone - every response states the same instant as UTC, as local time with its real offset, and as epoch milliseconds
- Any IANA timezone -
timezone: "Asia/Tokyo"on the current time, and aconvert_timezonetool that is DST-correct for the date in question - Multiple Formats - ISO 8601, named patterns, token patterns (
YYYY-MM-DD HH:mm Z) - Structured output -
structuredContentwith a declared schema, plus plain text for older clients - Zero Configuration -
npx -yand go; Node 18+ - MCP Compatible - Cursor, Claude Desktop, VS Code, Windsurf
MCP Client Integration
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.
Cursor
Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json in a project:
Claude Desktop
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\:
VS Code
Add to .vscode/mcp.json in a workspace, or under "mcp" in user settings.json:
Windsurf
Add to ~/.codeium/windsurf/mcp_config.json, same mcpServers shape as Cursor.
Installed globally instead
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.
Real-World Usage Examples
1. SQL Migration Files
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:
2. Timestamped Logging
User: "Generate a logger that includes timestamps"
Result: Logger implementation with current ISO datetime format
3. Dated Documentation
User: "Update the changelog with today's date"
Result: Changelog entry with current date: ## [Unreleased] - 2026-09-16
API Reference
Tool: get_current_datetime
Parameters:
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 forlocal,offset,timezoneand any token format. Defaults to the host's zone.iso/utcare 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:
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.
Tool: convert_timezone
Re-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 andfromis required.from(optional): IANA zone the wall-clocktimewas read in.to(required): IANA zone to convert into.format(optional): token pattern for the text result, rendered into.
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.
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:
Configuration (Optional)
Create currentdt-config.json for custom settings:
Environment variables override the file: CURRENTDT_FORMAT, CURRENTDT_PROVIDER,
CURRENTDT_DEBUG, CURRENTDT_CONFIG.
Common Format Patterns
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:
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.
Troubleshooting
Tool Not Available
Debug Mode
Development
npm Scripts
npm run build- Build TypeScriptnpm test- Run all testsnpm run lint- ESLint checknpm run format- Prettier format
Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
Support & Links
- Issues: GitHub Issues
- Documentation: GitHub Repository
- npm Package: @strix-ai/currentdt-mcp
- Author: Biswajit Panday - AI-Assisted Development Enthusiast
- Contributor: Abdullah Saleh Robin [email protected]
License
MIT License - see LICENSE file for details.
Made with ❤️ by Biswajit Panday
來源:README.md,提交 7d81c04
工具
0版本歷史
1- v2.0.3最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分