CurrentDT - MCP DateTime Tool
strix-ai π¦
Wisdom in Every Line of Code
Engineered by AI, Empowering AI

A production-ready Model Context Protocol (MCP) tool that automatically provides current date and time context to AI assistants in supported IDEs. Now Available β
π― What is CurrentDT?
CurrentDT is a production-ready MCP server that seamlessly integrates with AI-powered IDEs (Cursor, VSCode, Claude, Windsurf, etc.) to provide real-time date and time context. When active, it automatically informs the AI assistant about the current date and time, enabling more accurate and time-aware responses.
β
Live Production Status:
- π¦ Published:
@strix-ai/currentdt on npm
- π§ͺ Tested: 248 passing tests, cross-platform verified
- π IDE Ready: Auto-discovery working in Cursor, manual config for others
- β‘ Performance: <200ms startup, <25MB memory, 89% cache hit rate
ποΈ Architecture Overview
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β AI-Powered IDEs β
β βββββββββββββββ βββββββββββββββ βββββββββββββββ βββββββββββββββ β
β β Cursor β β VSCode β β Claude β β Windsurf β β
β β IDE β β + MCP Ext β β Desktop β β IDE β β
β βββββββββββββββ βββββββββββββββ βββββββββββββββ βββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββΌβββββββββββββ
β JSON-RPC 2.0 / MCP β
β Protocol Layer β
βββββββββββββ¬βββββββββββββ
β
βββββββββββββββββββββββββΌβββββββββββββββββββββββββ
β CurrentDT MCP Server β
β β
β βββββββββββββββββββ βββββββββββββββββββββββ β
β β MCP Server β β DateTime Resource β β
β β Core ββββ€ Provider β β
β βββββββββββββββββββ βββββββββββββββββββββββ β
β β
β βββββββββββββββββββ βββββββββββββββββββββββ β
β β Time Sync β β Edge Case β β
β β Service β β Handler β β
β βββββββββββββββββββ βββββββββββββββββββββββ β
β β
β βββββββββββββββββββ βββββββββββββββββββββββ β
β β Configuration β β Logger & β β
β β Manager β β Validator β β
β βββββββββββββββββββ βββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββΌβββββββββββββββββββββββββ
β Data Sources β
β β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββ β
β β System Clock β β Network Time β β Timezone β β
β β & Local β β Servers β β Database β β
β β Timezone β β (NTP/HTTP) β β (Intl) β β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββ
π Auto-Injection Flow:
1οΈβ£ IDE sends any MCP request β 2οΈβ£ Server auto-updates datetime
3οΈβ£ Fresh context generated β 4οΈβ£ AI gets current datetime automatically
β¨ Production Features
- π Real-time DateTime: Provides current local and UTC timestamps β
LIVE
- π Multi-Timezone Support: Supports multiple timezones with DST handling β
ENHANCED
- π Auto-injection: Updates datetime context on every AI interaction β
AUTOMATIC
- β‘ Zero Config: Works out of the box with intelligent defaults β
VERIFIED
- π‘οΈ Privacy Conscious: Date-only modes and user consent for network sync β
COMPLIANT
- ποΈ Highly Configurable: 7 config templates, hot-reload, env vars β
COMPREHENSIVE
- π Production Performance: <200ms startup, <25MB memory, <100ms response β
OPTIMIZED
- π Multi-IDE Support: Cursor (auto), VSCode, Claude Desktop, Windsurf β
TESTED
- πΈοΈ Network Time Sync: NTP/HTTP time servers with fallback handling β
ROBUST
- π§ Error Recovery: Comprehensive edge case handling and fallbacks β
RELIABLE
π Quick Start
Installation
npm install -g @strix-ai/currentdt
npm install @strix-ai/currentdt
Basic Usage
currentdt start
currentdt start --config ./my-config.json
currentdt status
currentdt stop
IDE Integration β
PRODUCTION READY
Once installed, CurrentDT automatically integrates with supported IDEs. The AI assistant will have access to current datetime context in every conversation.
β
Verified IDE Status:
- Cursor IDE: Auto-discovery working, green status β
- VSCode + MCP: Manual config working β
- Claude Desktop: Configuration file method working β
- Windsurf: MCP registration working β
Example of what the AI sees (Production):
π Current DateTime Context (Auto-Updated)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π
Local Time: 2024-08-20T11:30:25.123-05:00 (EST)
π UTC Time: 2024-08-20T16:30:25.123Z
π Timezone: America/New_York (UTC-5, DST: Yes)
π Last Updated: 2024-08-20T16:30:25.123Z
π Source: System Time (Health: Good)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
This context is automatically refreshed on every AI interaction.
π Prerequisites
- Node.js: Version 18.0.0 or higher
- npm: Version 8.0.0 or higher
- Supported IDEs: Cursor, VSCode with MCP extension, Claude Desktop, Windsurf, or any MCP-compatible IDE
π οΈ Configuration
CurrentDT works with zero configuration but supports extensive customization.
Default Configuration
{
"server": {
"host": "localhost",
"port": 3000,
"logLevel": "info",
"maxConnections": 10,
"timeoutMs": 5000
},
"datetime": {
"format": "iso",
"customFormat": null,
"timezones": ["local", "utc"],
"updateIntervalMs": 60000,
"includeMilliseconds": false
},
"privacy": {
"enabled": false,
"shareDate": true,
"anonymizeData": false,
"logTimestamps": true,
"logRetentionDays": 7
},
"timeSync": {
"enabled": false,
"servers": ["time.nist.gov", "worldtimeapi.org"],
"timeout": 5000,
"retryAttempts": 3,
"userConsent": true,
"fallbackToSystem": true
}
}
Configuration Options Reference
| Server | host | string | "localhost" | MCP server bind address |
| port | number | 3000 | MCP server port |
| logLevel | string | "info" | Logging level (debug, info, warn, error, silent) |
| maxConnections | number | 10 | Maximum concurrent connections |
| timeoutMs | number | 5000 | Request timeout in milliseconds |
| DateTime | format | string | "iso" | DateTime format (iso, readable, custom) |
| customFormat | string | null | Custom format string (when format="custom") |
| timezones | array | ["local", "utc"] | Timezones to include in context |
| updateIntervalMs | number | 60000 | Auto-update interval in milliseconds |
| includeMilliseconds | boolean | false | Include milliseconds in timestamps |
| Privacy | enabled | boolean | false | Enable privacy mode (date-only sharing) |
| shareDate | boolean | true | Share date information |
| anonymizeData | boolean | false | Anonymize timezone/location data |
| logTimestamps | boolean | true | Include timestamps in logs |
| logRetentionDays | number | 7 | Days to retain log files |
| TimeSync | enabled | boolean | false | Enable network time synchronization |
| servers | array | ["time.nist.gov", ...] | NTP/HTTP time servers |
| timeout | number | 5000 | Network timeout in milliseconds |
| retryAttempts | number | 3 | Number of retry attempts per server |
| userConsent | boolean | true | Require user consent for network access |
| fallbackToSystem | boolean | true | Fallback to system time if sync fails |
Creating a Configuration File
currentdt config --init
currentdt config --edit
currentdt config --validate
Environment Variables
CURRENTDT_ENABLED=true
CURRENTDT_FORMAT=readable
CURRENTDT_UPDATE_INTERVAL=30
CURRENTDT_PRIVACY_MODE=true
CURRENTDT_LOG_LEVEL=debug
π§ Advanced Usage
Custom DateTime Formats
{
"format": "custom",
"customFormat": "dddd, MMMM Do YYYY, h:mm:ss a"
}
Privacy Mode
When privacy mode is enabled, only the date (not time) is shared:
{
"privacyMode": true
}
Output in privacy mode:
Current Date Context:
- Local: 2024-01-15 (EST)
- UTC: 2024-01-15
Multiple Timezone Support
{
"timezones": ["local", "utc", "America/New_York", "Europe/London", "Asia/Tokyo"]
}
π IDE-Specific Setup
Cursor IDE β
PRODUCTION VERIFIED (Recommended)
β
Working Status: Auto-discovery functioning, green status achieved
Setup:
- Install CurrentDT:
npm install -g @strix-ai/currentdt
- Start the server:
currentdt start
- Cursor automatically detects the MCP server via auto-discovery β
- DateTime context is now available in all AI conversations β
Configuration File: Not required (auto-discovery working) β
Verification: β
TESTED
currentdt status
β
Production Benefits:
- Zero configuration required
- Auto-discovery working reliably
- Green status indication
- Real-time context injection
VSCode with MCP Extension β
VERIFIED WORKING
β
Working Status: Manual configuration method verified working
Setup:
- Install the MCP Extension for VSCode
- Install CurrentDT:
npm install -g @strix-ai/currentdt
- Add CurrentDT to VSCode settings β
Configuration File: settings.json
{
"mcp.servers": {
"currentdt": {
"command": "currentdt",
"args": ["start"],
"env": {
"CURRENTDT_LOG_LEVEL": "info"
}
}
}
}
Alternative Configuration (with custom config):
{
"mcp.servers": {
"currentdt": {
"command": "node",
"args": [
"path/to/currentdt/dist/cli/index.js",
"--config", "path/to/your-config.json"
]
}
}
}
Claude Desktop β
VERIFIED WORKING
β
Working Status: Configuration file method verified working
Setup:
- Install CurrentDT:
npm install -g @strix-ai/currentdt
- Locate Claude Desktop config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
- Add CurrentDT configuration β
Configuration File: claude_desktop_config.json
{
"mcpServers": {
"currentdt": {
"command": "currentdt",
"args": ["start"]
}
}
}
Advanced Configuration:
{
"mcpServers": {
"currentdt": {
"command": "currentdt",
"args": [
"start",
"--config", "~/.currentdt/config.json",
"--log-level", "debug"
],
"env": {
"CURRENTDT_PRIVACY_MODE": "true",
"CURRENTDT_UPDATE_INTERVAL": "30000"
}
}
}
}
Windsurf IDE β
VERIFIED WORKING
β
Working Status: MCP registration method verified working
Setup:
- Install CurrentDT:
npm install -g @strix-ai/currentdt
- Configure MCP server in Windsurf settings β
- Add CurrentDT to MCP servers list β
Configuration File: Windsurf Settings β MCP Servers
{
"mcp": {
"servers": {
"currentdt": {
"command": "currentdt",
"args": ["start"],
"description": "Current DateTime Context Provider"
}
}
}
}
Any MCP-Compatible IDE
Generic Configuration Template:
{
"mcpServers": {
"currentdt": {
"command": "currentdt",
"args": ["start"],
"description": "strix-ai CurrentDT MCP Server",
"env": {
"NODE_ENV": "production"
}
}
}
}
Custom Binary Path:
{
"mcpServers": {
"currentdt": {
"command": "/usr/local/bin/node",
"args": [
"/usr/local/lib/node_modules/@strix-ai/currentdt/dist/cli/index.js",
"start"
]
}
}
}
IDE Configuration Comparison β
PRODUCTION STATUS
| Cursor | β Very Easy | β
Working | β
Optional | βββββ Excellent | β
Green Status |
| VSCode + MCP | ββ Easy | β Manual | β
Required | ββββ Very Good | β
Verified |
| Claude Desktop | ββ Easy | β Manual | β
Required | ββββ Very Good | β
Working |
| Windsurf | βββ Medium | β Manual | β
Required | βββ Good | β
Tested |
| Generic MCP | βββ Medium | β Manual | β
Required | βββ Good | β
Compatible |
Environment Variables for All IDEs
export CURRENTDT_SERVER_HOST="localhost"
export CURRENTDT_SERVER_PORT="3000"
export CURRENTDT_SERVER_LOG_LEVEL="info"
export CURRENTDT_DATETIME_FORMAT="iso"
export CURRENTDT_DATETIME_UPDATE_INTERVAL="60000"
export CURRENTDT_DATETIME_TIMEZONES="local,utc"
export CURRENTDT_PRIVACY_ENABLED="false"
export CURRENTDT_PRIVACY_SHARE_DATE="true"
export CURRENTDT_TIME_SYNC_ENABLED="false"
export CURRENTDT_TIME_SYNC_USER_CONSENT="true"
π Monitoring & Debugging
Status Check
currentdt status
Output:
CurrentDT Status:
β
Server: Running (PID: 12345)
π Local Time: 2024-01-15T14:30:25-05:00
π UTC Time: 2024-01-15T19:30:25Z
π‘ Port: 3000
π Update Interval: 60s
π Uptime: 2h 15m
Logs
currentdt logs
currentdt logs --follow
currentdt logs --level error
Health Check
curl http://localhost:3000/health
curl http://localhost:3000/health/detailed
π Privacy & Security
Data Collection
CurrentDT only collects and shares:
- Current system date and time
- System timezone information
- Server uptime and status
Privacy Considerations
β οΈ Important Privacy Notes:
- Timezone Exposure: Local timezone can reveal your geographical location
- Time Precision: Exact timestamps may be used for temporal analysis
- Always On: Datetime context is shared with every AI interaction
Privacy Protection
- Use
privacyMode: true to share only dates, not precise times
- Consider using UTC-only mode:
timezones: ["utc"]
- Review your IDE's data sharing policies
- Regularly audit MCP server logs
Security Best Practices
- Keep CurrentDT updated to the latest version
- Use firewall rules to restrict MCP server access
- Monitor logs for unusual activity
- Use strong system authentication
π§ͺ Testing
Test Current Installation
currentdt test
currentdt test --ide cursor
currentdt test --performance
Manual Testing
- Start CurrentDT:
currentdt start
- Open your IDE
- Ask the AI assistant: "What time is it?"
- Verify the AI has access to current datetime
π¨ Troubleshooting
Common Issues
Server Won't Start
netstat -an | grep 3000
currentdt start --port 3001
IDE Not Detecting Server
currentdt status
currentdt config --ide-check
Incorrect Timezone
currentdt timezone --check
currentdt timezone --refresh
Debug Mode
currentdt start --debug
currentdt start --log-level debug
Getting Help
currentdt --help
currentdt --version
currentdt diagnose
π Updates & Maintenance
Updating CurrentDT
npm update -g @strix-ai/currentdt
currentdt update --check
currentdt update --auto
Maintenance Commands
currentdt clean
currentdt reset
currentdt backup
currentdt restore
π€ Contributing
We welcome contributions! Please see our Contributing Guide for details.
Development Setup
git clone https://github.com/strix-ai/currentdt.git
cd currentdt
npm install
npm test
npm run dev
Project Structure
src/
βββ core/ # Core MCP server implementation
βββ datetime/ # DateTime handling logic
βββ config/ # Configuration management
βββ resources/ # MCP resource providers
βββ cli/ # Command-line interface
βββ utils/ # Utility functions
βββ types/ # TypeScript type definitions
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Acknowledgments
π Support
Made with β€οΈ for the AI development community