About Unix Timestamps MCP Server
Unix Timestamps MCP Server is a small server for converting ISO 8601 date-time strings into Unix timestamps. It is intended for MCP clients that need a timestamp calculated from a supplied date, with basic validation and error reporting.
Key features
- 01Converts ISO 8601 strings to Unix timestamps
- 02Returns timestamps in seconds since the epoch
- 03Validates date strings with JavaScript Date parsing
- 04Reports invalid date input
Use cases
- 01Convert a date-time string for an API request
- 02Calculate epoch seconds from an ISO 8601 date
- 03Check whether a supplied date string can be parsed
MCP support
Exposes the `iso8601_to_unix` tool to MCP clients. The tool accepts an ISO 8601 string and returns the Unix timestamp or an error for invalid input.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEUnix Timestamps MCP Server
A lightweight MCP server for converting ISO 8601 date/time strings to Unix timestamps.
Features
- ISO 8601 to Unix Timestamp Conversion: Provides a tool (
iso8601_to_unix) to convert standard ISO 8601 date/time strings into Unix timestamps (seconds since the epoch). - Input Validation: Basic check to ensure the input string is a valid date recognized by JavaScript's
Dateparser. - Error Handling: Returns an error message if the input string is not a valid ISO 8601 date/time.
Installation
Prerequisites
- Node.js (version 18 or higher recommended)
npmornpx(usually included with Node.js)
Client Configuration (Claude Desktop)
To use this server with a client like Claude Desktop, add the following configuration to your client's settings file (e.g., claude_desktop_config.json):
{
"mcpServers": {
"unix_timestamps_mcp": {
"command": "npx",
"args": ["-y", "github:Ivor/unix-timestamps-mcp"]
}
}
}
Usage
This server provides tools accessible via an MCP client.
Available Tools
Tool: iso8601_to_unix(iso8601: string)
Converts an ISO 8601 formatted date/time string into a Unix timestamp (seconds since epoch).
-
Input Parameter:
iso8601(string) - The date/time string in ISO 8601 format (e.g.,"2024-07-26T10:00:00Z","2024-07-26T12:00:00+02:00"). -
Output: Text containing the calculated Unix timestamp and confirmation of the parsed date. Example:
Unix Timestamp: 1721988000 Original ISO8601: 2024-07-26T10:00:00Z Parsed as: Fri, 26 Jul 2024 10:00:00 GMT -
Error Handling: Returns an error message if the input string is not a valid ISO 8601 date/time.
Examples in Claude Desktop
- Configure the server as shown in the Installation section.
- Use the
iso8601_to_unixtool in your prompts:- "Convert '2023-03-15T12:00:00Z' to a Unix timestamp:
iso8601_to_unix(iso8601: '2023-03-15T12:00:00Z')" - "What is the Unix timestamp for '2024-01-01T00:00:00-05:00'?
iso8601_to_unix(iso8601: '2024-01-01T00:00:00-05:00')"
- "Convert '2023-03-15T12:00:00Z' to a Unix timestamp:
License
This project is licensed under the MIT License. See the LICENSE file for details. (Please create a LICENSE file or update this section if using a different license).
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.