About MCP Current Datetime Server
MCP Current Datetime Server is a small MCP server that returns the current time in ISO 8601 format. It offers both stdio and HTTP transports for MCP clients.
Key features
- 01Current datetime in ISO 8601
- 02stdio transport
- 03HTTP transport
Use cases
- 01Providing the current timestamp to an MCP client
- 02Connecting through a local stdio process
- 03Sending MCP requests over HTTP
MCP support
Exposes the `get-current-datetime` tool, which returns the current datetime as an ISO 8601 string. MCP clients can connect over stdio or HTTP.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEMCP Current Datetime Server
This project implements a Model Context Protocol (MCP) server that provides the current datetime in ISO 8601 format. It supports communication over standard input/output (stdio) and HTTP.
✨ Features
- Tool:
get-current-datetime— Returns the current datetime as a string in ISO format. - Transport Modes: You can run the MCP server as stdio or http transport layer using arguments:
--stdio: Communicate over stdin/stdout (default).--http: Start an HTTP server that listens for JSON-RPC 2.0 requests.
🚀 Getting Started
Prerequisites
- Node.js (v16 or higher recommended)
- npm (Node package manager)
Installation
npm install
Building the Project
npm run build
🏁 Running the Server
STDIO Mode (default)
node build/index.js
HTTP Mode
node build/index.js --http
The HTTP server will listen on port 3000 by default and accept MCP requests via POST on / or /mcp.
🛠️ Tool: get-current-datetime
- Description: Returns the current datetime in ISO 8601 format.
- Parameters: None
- Response Format:
{
"content": [
{
"type": "text",
"text": "2025-06-01T12:34:56.789Z"
}
]
}
⚙️ Integration Examples
Claude Desktop App Config (STDIO)
"currentDatetime": {
"command": "node",
"args": [
"<FULL-PATH-TO-PROJECT>/build/index.js"
]
}
VS Code Copilot Config (STDIO)
{
"mcp": {
"servers": {
"currentDatetime": {
"type": "stdio",
"command": "node",
"args": [
"<FULL-PATH-TO-PROJECT>/build/index.js"
]
}
}
}
}
HTTP Integration (for Web or Localhost Clients)
Send a POST request to http://localhost:3000/ or /mcp with a valid MCP JSON-RPC request.
🔒 CORS
CORS is enabled for all origins in HTTP mode to simplify local testing and cross-origin integration.
📄 License
See LICENSE for details.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.