Skip to main content
Glama
biswajitpanday

currentdt-mcp

@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 License: MIT TypeScript Verified on MSeeP

πŸ“‘ Table of Contents

Related MCP server: DateTime MCP Server

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

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

# Configure your MCP client (see integration guides below)
# Start using current datetime in AI conversations!

User Flow

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ 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       β”‚
                           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Core Features

  • Zero Configuration - Works immediately after installation

  • Multiple Formats - ISO 8601, custom formats (YYYY-MM-DD, MM/DD/YYYY, etc.)

  • Provider System - Local system clock with remote fallback

  • MCP Compatible - Cursor, Claude Desktop, VS Code, Windsurf

  • TypeScript Native - Full type safety and IntelliSense

MCP Client Integration

Cursor IDE

npm install -g @strix-ai/currentdt-mcp

Add to ~/.cursor/mcp_servers.json:

{
  "mcpServers": {
    "currentdt": {
      "command": "npx",
      "args": ["@strix-ai/currentdt-mcp"]
    }
  }
}

Claude Desktop

npm install -g @strix-ai/currentdt-mcp

Add to ~/claude_desktop_config.json:

{
  "mcpServers": {
    "currentdt": {
      "command": "currentdt-mcp",
      "args": []
    }
  }
}

VS Code (with MCP Extension)

Install package and configure via MCP extension settings or add to VS Code settings:

{
  "mcp.servers": [
    {
      "name": "currentdt", 
      "command": "currentdt-mcp"
    }
  ]
}

Windsurf

Same configuration as Cursor IDE - add to Windsurf MCP settings file.

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:

{
  "tool": "get_current_datetime",
  "arguments": {
    "format": "YYYY-MM-DD-HHmmss",
    "provider": "local"
  }
}

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: ## [1.1.7] - 2025-08-26

API Reference

Tool: get_current_datetime

Parameters:

  • format (optional): "iso" (default) or custom format like "YYYY-MM-DD HH:mm:ss"

  • provider (optional): "local" (default) or "remote"

Returns: Formatted datetime string

Example:

{
  "tool": "get_current_datetime",
  "arguments": {
    "format": "YYYY-MM-DD HH:mm:ss",
    "provider": "local"
  }
}

Configuration (Optional)

Create currentdt-config.json for custom settings:

{
  "defaultFormat": "iso",
  "defaultProvider": "local",
  "providers": {
    "local": {
      "name": "local",
      "enabled": true,
      "priority": 1
    },
    "remote": {
      "name": "remote",
      "enabled": false,
      "priority": 2,
      "config": {
        "url": "https://worldtimeapi.org/api/timezone/UTC",
        "timeout": 5000
      }
    }
  },
  "customFormats": {
    "filename": "YYYY-MM-DD-HHmmss",
    "simple": "MM/DD/YYYY"
  },
  "cache": {
    "enabled": true,
    "ttl": 1000
  }
}

Common Format Patterns

  • "iso" β†’ 2025-08-26T14:30:00.000Z

  • "YYYY-MM-DD" β†’ 2025-08-26

  • "YYYY-MM-DD HH:mm:ss" β†’ 2025-08-26 14:30:00

  • "MM/DD/YYYY" β†’ 08/23/2025

  • "YYYY-MM-DD-HHmmss" β†’ 2025-08-26-143000

Troubleshooting

Tool Not Available

# Verify installation
npm list -g @strix-ai/currentdt-mcp

# Test server directly
npx @strix-ai/currentdt-mcp --test

Debug Mode

export CURRENTDT_DEBUG=true
npx @strix-ai/currentdt-mcp

Development

git clone https://github.com/biswajitpanday/CurrentDT-mcp.git
cd currentdt-mcp
npm install
npm run dev

npm Scripts

  • npm run build - Build TypeScript

  • npm test - Run all tests

  • npm run lint - ESLint check

  • npm run format - Prettier format

Documentation

Detailed documentation available in /docs:

Contributing

  1. Fork the repository

  2. Create a feature branch: git checkout -b feature/amazing-feature

  3. Commit changes: git commit -m 'Add amazing feature'

  4. Push to branch: git push origin feature/amazing-feature

  5. Open a Pull Request

License

MIT License - see LICENSE file for details.


Made with ❀️ by Biswajit Panday

Available Tools

1 tool
get_current_datetimeA

Get the current date and time with optional formatting and provider selection. Essential for creating timestamped files, logs, database migrations, and any time-sensitive development tasks. Supports ISO format (default) and custom formats using tokens like YYYY, MM, DD, HH, mm, ss, SSS.

ParametersJSON Schema
NameRequiredDescriptionDefault
formatNoDate format: "iso" for ISO 8601 (default), or custom format using tokens (YYYY, MM, DD, HH, mm, ss, SSS). Common examples: "iso", "YYYY-MM-DD", "YYYY-MM-DD HH:mm:ss", "MM/DD/YYYY", "YYYY-MM-DD-HHmmss"iso
providerNoDateTime provider: "local" for system clock (default), "remote" for network time servicelocal

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the burden of disclosing behavior. It mentions the ability to format output and select a provider, and implies a read-only operation with 'Get'. However, it does not clarify timezone behavior, potential latency with the remote provider, or safety characteristics. This is a moderate level of transparency, sufficient for a simple getter but with notable omissions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, with the action verb and resource front-loaded in the first sentence. The second sentence adds use cases and format details, all relevant and without fluff. Every part earns its place, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple, with all parameters fully described in the schema. The description explains the intended output (a formatted string, with default ISO) and provides sufficient context for use. Minor gaps like explicit timezone handling or exact return type are inferable from the schema and tool nature, making this adequately complete, though not perfect.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema descriptions are comprehensive: `format` describes the ISO default and token examples, and `provider` explains local/remote options. The tool description repeats key points (ISO default, tokens, provider selection) but adds no new meaning beyond what the schema already provides. With 100% schema coverage, baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description begins with 'Get the current date and time', which is a specific verb and resource. It also mentions optional formatting and provider selection, making the tool's purpose entirely clear. Though there are no sibling tools to differentiate, the description leaves no ambiguity about what the tool does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly lists use cases: 'timestamped files, logs, database migrations, and any time-sensitive development tasks', giving clear context for when to use this tool. It does not state when not to use it, but since there are no alternative tools listed, the guidance is adequate, though slightly below the 'explicit when/when-not' standard.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 1 tool updatev1.1.7
    • First observedget_current_datetime

TDQS

A4.2/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of confusion or overlap. The tool's purpose is crystal clear and distinct.

Naming Consistency5/5

The single tool name 'get_current_datetime' follows a clear verb_noun pattern, which is consistent and predictable even without other tools to compare against.

Tool Count4/5

The server has exactly one tool, which is slightly below the typical 3-15 range, but it is perfectly appropriate for the narrow scope of providing current datetime functionality. The tool is not trivial and fully serves the server's purpose.

Completeness5/5

The sole tool covers the entire domain of retrieving current datetime, including optional formatting and provider selection. There are no obvious gaps or missing operations for this single-purpose server.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    A Model Context Protocol server that provides tools to get the current date and time in various formats, supporting different timezones and custom formatting options.
    1
    14 npm
    1
    MIT
  • A
    license
    C
    quality
    D
    maintenance
    Provides current time and date information with timezone support and multiple formatting options. Enables AI assistants to answer time-related queries in different timezones with detailed temporal information.
    2
    7 npm
    MIT
  • A
    license
    A
    quality
    Not graded
    maintenance
    Provides AI assistants with real-time date, time, and timezone information, enabling them to access current temporal data, format dates, calculate day of week, and work with different timezones.
    4
    7 npm
    -