datetime-mcp-server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@datetime-mcp-server get the current date and time in yyyy-MM-dd HH:mm:ss format"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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,ssSupports both stdio and HTTP transport modes
Installation
# Install globally
npm install -g datetime-mcp-server
# Or run directly with npx
npx datetime-mcp-serverUsage
Command Line (stdio)
# Run with stdio (default)
npx datetime-mcp-serverHTTP Server
# Run HTTP server on port 3000
TRANSPORT=http npx datetime-mcp-server
# Custom port
PORT=8080 TRANSPORT=http npx datetime-mcp-serverClaude 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 |
| 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 buildLicense
MIT
Available Tools
1 toolget_current_datetimeGet Current DateTimeARead-only
获取当前日期和时间,支持自定义格式化。
该工具返回当前的日期时间,可以指定返回的格式。如果不指定格式,默认返回 "yyyy-MM-dd" 格式。
支持的格式占位符:
yyyy: 4位年份 (例如: 2026)
MM: 2位月份 (01-12)
dd: 2位日期 (01-31)
HH: 24小时制小时 (00-23)
mm: 2位分钟 (00-59)
ss: 2位秒数 (00-59)
使用示例:
format="yyyy-MM-dd" -> "2026-03-11"
format="yyyy-MM-dd HH:mm:ss" -> "2026-03-11 14:30:00"
format="yyyy/MM/dd HH:mm" -> "2026/03/11 14:30"
注意事项:
该工具始终返回当前时间,每次调用结果可能不同
返回的是服务器本地时间
Inputs: format.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
With only one tool, there is no possibility of confusion or overlap between tools. The single tool 'get_current_datetime' has a clear, distinct purpose that cannot be mistaken for any other functionality.
The naming is trivially consistent as there is only one tool. The tool name 'get_current_datetime' follows a clear verb_noun pattern (get + current_datetime), which would be appropriate if more tools were added.
A single tool is too few for a server named 'datetime-mcp-server', which suggests a broader scope for date and time operations. While the tool is functional, the server lacks operations like date parsing, timezone conversion, or date arithmetic, making it feel incomplete and under-scoped.
The server is severely incomplete for a datetime domain. It only provides current datetime retrieval with formatting, missing essential operations such as date manipulation, comparison, parsing from strings, or handling different timezones. This creates significant gaps that would limit agent capabilities in datetime-related tasks.
Maintenance
Related MCP Connectors
Current time, timezone conversion & date math for AI agents. On Cloudflare Workers.
Time and date math for AI agents: Unix timestamp conversion, DST-correct time zone conversion, durations, epoch arithmetic, cron schedules, and holiday countdowns. Eight tools, no key.
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.
Related MCP Servers
- AlicenseBqualityDmaintenanceA Model Context Protocol server that provides tools to get the current date and time in various formats, supporting different timezones and custom formatting options.115 npm1MIT
- FlicenseAqualityDmaintenanceA 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.3-
- AlicenseAqualityDmaintenanceA Model Context Protocol server built with FastMCP that provides tools for retrieving the current local date and time. It allows LLMs to access precise temporal information directly from the host environment.9MIT
- AlicenseDqualityCmaintenanceA 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.37 npm7MIT