New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more β†’
Get Started

@strix-ai/currentdt

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@strix-ai/currentdt

A simple MCP tool that provides current date/time context to AI assistants in IDEs. strix-ai πŸ¦‰ - Wisdom in Every Line of Code

Source
npmnpm
Version
1.2.1
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
Β 
Created
Source

CurrentDT - MCP DateTime Tool

strix-ai πŸ¦‰
Wisdom in Every Line of Code
Engineered by AI, Empowering AI

npm version License: MIT Node.js CI

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

# Install globally via npm
npm install -g @strix-ai/currentdt

# Or install locally in your project
npm install @strix-ai/currentdt

Basic Usage

# Start the MCP server (default configuration)
currentdt start

# Start with custom configuration
currentdt start --config ./my-config.json

# Check server status
currentdt status

# Stop the server
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

SectionOptionTypeDefaultDescription
Serverhoststring"localhost"MCP server bind address
portnumber3000MCP server port
logLevelstring"info"Logging level (debug, info, warn, error, silent)
maxConnectionsnumber10Maximum concurrent connections
timeoutMsnumber5000Request timeout in milliseconds
DateTimeformatstring"iso"DateTime format (iso, readable, custom)
customFormatstringnullCustom format string (when format="custom")
timezonesarray["local", "utc"]Timezones to include in context
updateIntervalMsnumber60000Auto-update interval in milliseconds
includeMillisecondsbooleanfalseInclude milliseconds in timestamps
PrivacyenabledbooleanfalseEnable privacy mode (date-only sharing)
shareDatebooleantrueShare date information
anonymizeDatabooleanfalseAnonymize timezone/location data
logTimestampsbooleantrueInclude timestamps in logs
logRetentionDaysnumber7Days to retain log files
TimeSyncenabledbooleanfalseEnable network time synchronization
serversarray["time.nist.gov", ...]NTP/HTTP time servers
timeoutnumber5000Network timeout in milliseconds
retryAttemptsnumber3Number of retry attempts per server
userConsentbooleantrueRequire user consent for network access
fallbackToSystembooleantrueFallback to system time if sync fails

Creating a Configuration File

# Generate default configuration
currentdt config --init

# Edit configuration
currentdt config --edit

# Validate configuration
currentdt config --validate

Environment Variables

# Override configuration with 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

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:

# Check if CurrentDT is running
currentdt status

# Test datetime context
# Open Cursor and ask: "What time is it right now?"

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

IDESetup ComplexityAuto-DiscoveryCustom ConfigPerformance
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

# Server Configuration
export CURRENTDT_SERVER_HOST="localhost"
export CURRENTDT_SERVER_PORT="3000"
export CURRENTDT_SERVER_LOG_LEVEL="info"

# DateTime Configuration
export CURRENTDT_DATETIME_FORMAT="iso"
export CURRENTDT_DATETIME_UPDATE_INTERVAL="60000"
export CURRENTDT_DATETIME_TIMEZONES="local,utc"

# Privacy Configuration
export CURRENTDT_PRIVACY_ENABLED="false"
export CURRENTDT_PRIVACY_SHARE_DATE="true"

# Time Sync Configuration
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

# View logs
currentdt logs

# Follow logs in real-time
currentdt logs --follow

# Filter by log level
currentdt logs --level error

Health Check

# Basic health check
curl http://localhost:3000/health

# Detailed health information
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

# Test basic functionality
currentdt test

# Test with specific IDE
currentdt test --ide cursor

# Performance test
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

# Check if port is in use
netstat -an | grep 3000

# Try different port
currentdt start --port 3001

IDE Not Detecting Server

# Verify server is running
currentdt status

# Check IDE MCP configuration
currentdt config --ide-check

Incorrect Timezone

# Check system timezone
currentdt timezone --check

# Force timezone refresh
currentdt timezone --refresh

Debug Mode

# Start in debug mode
currentdt start --debug

# Verbose logging
currentdt start --log-level debug

Getting Help

# Show help
currentdt --help

# Show version
currentdt --version

# Run diagnostics
currentdt diagnose

πŸ”„ Updates & Maintenance

Updating CurrentDT

# Update to latest version
npm update -g @strix-ai/currentdt

# Check for updates
currentdt update --check

# Auto-update (if enabled)
currentdt update --auto

Maintenance Commands

# Clean temporary files
currentdt clean

# Reset configuration to defaults
currentdt reset

# Backup configuration
currentdt backup

# Restore configuration
currentdt restore

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Setup

# Clone repository
git clone https://github.com/strix-ai/currentdt.git
cd currentdt

# Install dependencies
npm install

# Run tests
npm test

# Start development server
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

Keywords

mcp

FAQs

Package last updated on 20 Aug 2025

Related posts