- Home
- MCP servers
- Time
Time
- javascript
0
GitHub Stars
javascript
Language
6 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"pierregode-timemcp": {
"command": "node",
"args": [
"timeserver.js"
]
}
}
}You can run a lightweight MCP time server locally to retrieve current time and date information in multiple formats and timezones. This server uses the MCP transport and exposes simple tools to get the exact time, date, or formatted timestamps, making it easy to integrate time data into client apps or automation tasks.
How to use
Start by running the time MCP server locally using a standard MCP client to connect through stdio. The server provides four main tools you can call from your MCP client: get_current_time, get_current_date, get_datetime_info, and format_timestamp. Use these tools to fetch the current moment in various formats, pull date information with timezone context, or format any Unix timestamp for display or logging.
How to install
Prerequisites you need before installation:
- Node.js and npm are installed on your system
- A working MCP client setup for stdio transport
Steps to install and run the server locally:
Additional notes and configuration
The MCP time server runs using the stdio transport, which means it communicates over standard input/output with an MCP client. To integrate with a client like Claude Desktop, you add a time server entry to your MCP configuration. The following configuration example shows how to run the server with Node and a local file path.
{
"mcpServers": {
"time_mcp": {
"command": "node",
"args": ["timeserver.js"],
"env": {}
}
}
}
Usage notes for tools
Each tool accepts a small set of parameters to tailor the output to your needs. You can adjust formats and timezones to match your display requirements or logging standards. The server includes error handling for invalid timezones, invalid timestamps, and malformed format strings to help you diagnose issues quickly.
Available tools
get_current_time
Returns the current time in various formats such as iso, local, utc, or unix timestamp, with optional timezone specification.
get_current_date
Returns the current date in formats including iso, local, short, long, or custom; can apply a specific timezone.
get_datetime_info
Provides a comprehensive snapshot of date/time information including timezone details.
format_timestamp
Formats a given Unix timestamp into a readable string according to the chosen format and timezone.