Skip to main content
Glama
lvdaxianer

datetime-mcp-server

by lvdaxianer

datetime-mcp-server

中文版

Overview

datetime-mcp-server is a Model Context Protocol (MCP) server that provides a tool for getting the current date and time with customizable format.

Related MCP server: Utility MCP Server

Features

  • Get current datetime with customizable format

  • Default format: yyyy-MM-dd (e.g., "2026-03-11")

  • Supports various format placeholders: yyyy, MM, dd, HH, mm, ss

  • Supports both stdio and HTTP transport modes

Installation

# Install globally
npm install -g datetime-mcp-server

# Or run directly with npx
npx datetime-mcp-server

Usage

Command Line (stdio)

# Run with stdio (default)
npx datetime-mcp-server

HTTP Server

# Run HTTP server on port 3000
TRANSPORT=http npx datetime-mcp-server

# Custom port
PORT=8080 TRANSPORT=http npx datetime-mcp-server

Claude Code Integration

Add to your ~/.claude.json:

{
  "mcpServers": {
    "datetime": {
      "command": "npx",
      "args": ["-y", "datetime-mcp-server"]
    }
  }
}

Available Tool

get_current_datetime

Get the current date and time with custom format.

Parameters:

Parameter

Type

Required

Default

Description

format

string

No

yyyy-MM-dd

Date format string

Format Placeholders:

Placeholder

Description

Example

yyyy

4-digit year

2026

MM

2-digit month

01-12

dd

2-digit day

01-31

HH

24-hour hour

00-23

mm

2-digit minute

00-59

ss

2-digit second

00-59

Examples:

{
  "name": "get_current_datetime",
  "arguments": {}
}
// Returns: "2026-03-11"

{
  "name": "get_current_datetime",
  "arguments": {
    "format": "yyyy-MM-dd HH:mm:ss"
  }
}
// Returns: "2026-03-11 14:30:45"

{
  "name": "get_current_datetime",
  "arguments": {
    "format": "yyyy/MM/dd HH:mm"
  }
}
// Returns: "2026/03/11 14:30"

Development

# Install dependencies
npm install

# Run tests
npm test

# Build
npm run build

License

MIT

Install Server
A
license - permissive license
A
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

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.
    Last updated
    4
    1
    19
    1
    MIT
  • F
    license
    A
    quality
    D
    maintenance
    A general-purpose MCP server providing time-related utilities such as fetching current time, Unix timestamps, and formatting services. It supports both local stdio and remote SSE communication modes for versatile AI client integration.
    Last updated
    3
  • A
    license
    D
    quality
    C
    maintenance
    A lightweight MCP server that provides date and time tools, including the ability to retrieve current timestamps and parse date strings with IANA timezone support. It enables AI models to interact with the host OS clock and perform temporal calculations via stdio transport.
    Last updated
    3
    8
    7
    MIT

View all related MCP servers

Related MCP Connectors

  • A real clock for AI agents: current time, timezone conversion, and DST facts from the IANA tzdb.

  • Wall-clock awareness for LLM agents. Two tools: elapsed-time-between-turns + day rollover detection.

  • A time server that keeps your AI honest about time. Real clock + drift guard, zero dependencies.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lvdaxianer/datetime-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server