DateTime MCP Server
Integrates with GitHub for version control, release management, and hosting the repository, with support for automated releases through personal access tokens.
Includes automated NPM publishing workflow via GitHub Actions that triggers on new tags to build the project and publish it to NPM.
Provides a Model Context Protocol server implementation in Node.js for retrieving current date and time in various formats with timezone support and custom formatting options.
Provides packaging and distribution through NPM, enabling installation via the npx command with configurable environment variables for customizing date/time output.
Implements a Model Context Protocol server in TypeScript that demonstrates how to build MCP servers using the TypeScript SDK, with tools for date and time operations.
Click on "Install 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 Serverwhat's the current time in Tokyo?"
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
A Model Context Protocol (MCP) server that provides tools to get the current date and time in various formats. This is a TypeScript implementation of the datetime MCP server, demonstrating how to build MCP servers using the TypeScript SDK.
Features
Get current date and time in multiple formats (ISO, Unix timestamp, human-readable, etc.)
Configurable output format via environment variables
Timezone support
Custom date format support
Simple tool:
get_current_time
Related MCP server: Time MCP Server
Usage
Choose one of these examples based on your needs:
Basic usage (ISO format):
{
"mcpServers": {
"datetime": {
"command": "npx",
"args": ["-y", "@takanarishimbo/datetime-mcp-server"]
}
}
}Human-readable format with timezone:
{
"mcpServers": {
"datetime": {
"command": "npx",
"args": ["-y", "@takanarishimbo/datetime-mcp-server"],
"env": {
"DATETIME_FORMAT": "human",
"TIMEZONE": "America/New_York"
}
}
}
}Unix timestamp format:
{
"mcpServers": {
"datetime": {
"command": "npx",
"args": ["-y", "@takanarishimbo/datetime-mcp-server"],
"env": {
"DATETIME_FORMAT": "unix",
"TIMEZONE": "UTC"
}
}
}
}Custom format:
{
"mcpServers": {
"datetime": {
"command": "npx",
"args": ["-y", "@takanarishimbo/datetime-mcp-server"],
"env": {
"DATETIME_FORMAT": "custom",
"DATE_FORMAT_STRING": "YYYY/MM/DD HH:mm",
"TIMEZONE": "Asia/Tokyo"
}
}
}
}Configuration
The server can be configured using environment variables:
DATETIME_FORMAT
Controls the default output format of the datetime (default: "iso")
Supported formats:
iso: ISO 8601 format (2024-01-01T12:00:00.000Z)unix: Unix timestamp in secondsunix_ms: Unix timestamp in millisecondshuman: Human-readable format (Mon, Jan 1, 2024 12:00:00 PM)date: Date only (2024-01-01)time: Time only (12:00:00)custom: Custom format using DATE_FORMAT_STRING environment variable
DATE_FORMAT_STRING
Custom date format string (only used when DATETIME_FORMAT="custom") Default: "YYYY-MM-DD HH:mm:ss"
Supported tokens:
YYYY: 4-digit yearYY: 2-digit yearMM: 2-digit monthDD: 2-digit dayHH: 2-digit hour (24-hour)mm: 2-digit minutess: 2-digit second
TIMEZONE
Timezone to use (default: system timezone) Examples: "UTC", "America/New_York", "Asia/Tokyo"
Available Tools
get_current_time
Get the current date and time
Parameters:
format(optional): Output format, overrides DATETIME_FORMAT env vartimezone(optional): Timezone to use, overrides TIMEZONE env var
Development
Clone this repository
git clone https://github.com/TakanariShimbo/npx-datetime-mcp-server.git cd npx-datetime-mcp-serverInstall dependencies
npm ciBuild the project
npm run buildTest with MCP Inspector (optional)
npx @modelcontextprotocol/inspector node dist/index.js
Publishing to NPM
This project includes automated NPM publishing via GitHub Actions. To set up publishing:
1. Create NPM Access Token
Log in to NPM (create account if needed)
npm loginCreate Access Token
Click "Generate New Token"
Select "Automation" (for CI/CD usage)
Choose "Publish" permission level
Copy the generated token (starts with
npm_)
2. Add Token to GitHub Repository
Navigate to Repository Settings
Go to your GitHub repository
Click "Settings" tab
Go to "Secrets and variables" → "Actions"
Add NPM Token
Click "New repository secret"
Name:
NPM_TOKENValue: Paste your NPM token from step 1
Click "Add secret"
3. Setup GitHub Personal Access Token (for release script)
The release script needs to push to GitHub, so you'll need a GitHub token:
Create GitHub Personal Access Token
Click "Generate new token" → "Generate new token (classic)"
Set expiration (recommended: 90 days or custom)
Select scopes:
✅
repo(Full control of private repositories)
Click "Generate token"
Copy the generated token (starts with
ghp_)
Configure Git with Token
# Option 1: Use GitHub CLI (recommended) gh auth login # Option 2: Configure git to use token git config --global credential.helper store # Then when prompted for password, use your token instead
4. Release New Version
Use the included release script to automatically version, tag, and trigger publishing:
# Increment patch version (0.1.0 → 0.1.1)
npm run release patch
# Increment minor version (0.1.0 → 0.2.0)
npm run release minor
# Increment major version (0.1.0 → 1.0.0)
npm run release major
# Set specific version
npm run release 1.2.35. Verify Publication
Check GitHub Actions
Go to "Actions" tab in your repository
Verify the "Publish to npm" workflow completed successfully
Verify NPM Package
Visit: https://www.npmjs.com/package/@takanarishimbo/datetime-mcp-server
Or run:
npm view @takanarishimbo/datetime-mcp-server
Release Process Flow
release.shscript updates version in all filesCreates git commit and tag
Pushes to GitHub
GitHub Actions workflow triggers on new tag
Workflow builds project and publishes to NPM
Package becomes available globally via
npm install
Creating Desktop Extension (DXT)
Desktop Extensions (.dxt) enable one-click installation of MCP servers in Claude Desktop. To create a DXT file for this server:
1. Initialize DXT Manifest
Run this command in the project root directory:
npx @anthropic-ai/dxt initThis will guide you through creating a manifest.json file. Here are the answers for this project:
✔ Extension name: @takanarishimbo/datetime-mcp-server
✔ Author name: TakanariShimbo
✔ Display name (optional): datetime
✔ Version: 0.3.0
✔ Description: A Model Context Protocol server that returns the current date and time
✔ Add a detailed long description? no
✔ Author email (optional):
✔ Author URL (optional):
✔ Homepage URL (optional): https://github.com/TakanariShimbo/npx-datetime-mcp-server
✔ Documentation URL (optional): https://github.com/TakanariShimbo/npx-datetime-mcp-server
✔ Support URL (optional): https://github.com/TakanariShimbo/npx-datetime-mcp-server
✔ Icon file path (optional, relative to manifest): icon.png
✔ Add screenshots? no
✔ Server type: Node.js
✔ Entry point: dist/index.js
✔ Does your MCP Server provide tools you want to advertise (optional)? yes
✔ Tool name: get_current_time
✔ Tool description (optional): Get the current date and time in various formats
✔ Add another tool? no
✔ Does your server generate additional tools at runtime? no
✔ Does your MCP Server provide prompts you want to advertise (optional)? no
✔ Add compatibility constraints? no
✔ Add user-configurable options? no
✔ Keywords (comma-separated, optional): datetime
✔ License: MIT
✔ Add repository information? yes
✔ Repository URL: git+https://github.com/TakanariShimbo/npx-datetime-mcp-server.git2. Create DXT Package
npx @anthropic-ai/dxt packThis creates a .dxt file that users can install in Claude Desktop with a single click.
Project Structure
npx-datetime-mcp-server/
├── src/
│ └── index.ts # Main server implementation
├── package.json # Package configuration
├── package-lock.json # Dependency lock file
├── tsconfig.json # TypeScript configuration
├── scripts/
│ └── release.sh # Release automation script
├── .github/
│ └── workflows/
│ └── npm-publish.yml # NPM publish workflow
├── manifest.json # MCP server manifest for DXT file
├── icon.png # icon for DXT file
├── datetime.dxt # DXT file
├── .gitignore # Git ignore file
├── docs/
├── README.md # English documentation
└── README_ja.md # Japanese documentationLicense
MIT
Available Tools
1 toolget_current_timeB
Get the current date and time in various formats
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | Output format for the datetime (optional, defaults to "iso" from env) | |
| timezone | No | Timezone to use (optional, defaults to "UTC" from env) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the tool returns data in 'various formats' but doesn't specify what those formats are, whether there are rate limits, authentication requirements, or how errors are handled. This leaves significant behavioral gaps for an agent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that directly states the tool's core functionality without any wasted words. It's appropriately sized and front-loaded with the essential information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity (simple time retrieval with 2 optional parameters) and 100% schema coverage, the description is minimally adequate. However, with no output schema and no annotations, it should ideally provide more context about return values and behavioral constraints to be fully complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 100%, so the schema already fully documents both parameters (format with enum values and timezone). The description adds no additional parameter semantics beyond what's in the schema, meeting the baseline for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose with a specific verb ('Get') and resource ('current date and time'), and mentions the key capability of providing 'various formats'. However, it doesn't distinguish from siblings since there are none, so it can't achieve the full 5-point differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives, prerequisites, or specific use cases. It simply states what the tool does without contextual usage information.
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. Dates show when Glama detected each change.
1 tool update
- First observed
get_current_time
TDQS
With only one tool, there is no possibility of ambiguity or overlap between tools. The single tool has a clear and distinct purpose.
A single tool inherently has perfect naming consistency, as there are no other tools to compare it against. The naming follows a clear verb_noun pattern.
A single tool for a DateTime server feels thin and under-scoped. While it covers the basic function of getting the current time, it lacks other common date/time operations like parsing, formatting, or calculations, making the server incomplete for typical use cases.
The server is severely incomplete for a DateTime domain. It only provides current time retrieval, missing essential operations such as date parsing, timezone conversions, date arithmetic, or formatting options beyond 'various formats', which limits its utility.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
A real clock for AI agents: current time, timezone conversion, and DST facts from the IANA tzdb.
Convert and compare dates and times across any timezone with flexible, locale-aware formatting. Ad…
Timezone MCP — wraps WorldTimeAPI (free, no auth)
Current time, timezone conversion & date math for AI agents. On Cloudflare Workers.
Related MCP Servers
- AlicenseAqualityDmaintenanceA Model Context Protocol server for time manipulation tasks, enabling AI models to get the current date/time and calculate duration between timestamps.72MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol server that provides time and timezone conversion capabilities, enabling LLMs to get current time information and perform timezone conversions using IANA timezone names.2MIT
- AlicenseNot gradedqualityCmaintenanceThe Time MCP Server is a Model Context Protocol (MCP) server that provides AI assistants and other MCP clients with standardized tools to perform time and date-related operations. This server acts as a bridge between AI tools and a robust time-handling back18425MIT
- AlicenseBqualityFmaintenanceA Model Context Protocol server that provides current time in ISO8601 format with timezone support.120MIT
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/TakanariShimbo/npx-datetime-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server