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

A simple Model Context Protocol (MCP) tool that automatically provides current date and time context to AI assistants in supported IDEs.
π― What is CurrentDT?
CurrentDT is an 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.
ποΈ 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
β¨ Key Features
- π Real-time DateTime: Provides current local and UTC timestamps
- π Timezone Aware: Supports both local system timezone and UTC
- π Auto-refresh: Updates datetime context automatically
- β‘ Zero Config: Works out of the box with sensible defaults
- π‘οΈ Privacy Conscious: Optional privacy modes and clear data usage
- ποΈ Configurable: Flexible formatting and update intervals
- π Lightweight: Minimal performance impact
- π IDE Agnostic: Works with any MCP-supported IDE
π 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
Once installed, CurrentDT automatically integrates with supported IDEs. The AI assistant will have access to current datetime context in every conversation.
Example of what the AI sees:
Current DateTime Context:
- Local: 2024-01-15T14:30:25-05:00 (EST)
- UTC: 2024-01-15T19:30:25Z
- Day: Monday
π 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 (Recommended)
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)
Verification:
currentdt status
VSCode with MCP Extension
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
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
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
| Cursor | β Very Easy | β
Yes | β
Optional | βββββ Excellent |
| VSCode + MCP | ββ Easy | β Manual | β
Required | ββββ Very Good |
| Claude Desktop | ββ Easy | β Manual | β
Required | ββββ Very Good |
| Windsurf | βββ Medium | β Manual | β
Required | βββ Good |
| Generic MCP | βββ Medium | β Manual | β
Required | βββ Good |
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