Skip to main content
Glama
vinkius-labs

Time & Millisecond Converter MCP Server

by vinkius-labs
README.md
# Time & Millisecond Converter MCP Server

A specialized, high-precision Model Context Protocol (MCP) server that empowers AI agents to natively parse, format, and convert complex time durations and chronometric strings with absolute deterministic accuracy.

[![Available on Vinkius Edge](https://img.shields.io/badge/Run%20on-Vinkius%20Edge-blue?style=for-the-badge)](https://vinkius.com/mcp/time-ms-converter)
[![Docker Pulls](https://img.shields.io/docker/pulls/vinkius/time-ms-converter-mcp?style=for-the-badge&logo=docker&color=2496ed)](https://hub.docker.com/r/vinkius/time-ms-converter-mcp)

## The Chronometric AI Challenge

Time calculation is a notorious weakness for Large Language Models. When an agent is asked to convert "2 weeks, 3 days, and 4.5 hours" into raw milliseconds for a cron job configuration or database TTL, the LLM relies on arithmetic approximation. This often results in slight calculation errors that cause catastrophic scheduling failures in production environments.

### Deterministic Time Processing
The **Time & Millisecond Converter MCP** delegates time mathematics to a strict, typed execution engine. By shifting these calculations off the LLM, the agent receives exact integer millisecond values, completely eliminating human-like arithmetic errors and saving valuable token bandwidth.

---

## Tools Included

* `convert_duration_to_ms`
  * **Function**: Parses human-readable time strings (e.g., "2h", "3 days", "1.5y") and converts them into exact millisecond integers.
  * **Use Case**: Generating configuration files, setting Redis TTLs, and programming cron schedulers.

* `format_ms_to_human`
  * **Function**: Converts raw millisecond integers back into readable duration strings.

## Run on Vinkius Edge (Free Edge Hosting)

Vinkius provides **free, highly available edge hosting** using secure V8 isolates. Deploying to the Vinkius Edge is the fastest way to make this MCP server accessible to any AI agent anywhere, with sub-millisecond response times and zero maintenance.

1. Clone this repository
2. Run the deployment command:

```bash
npx mcpfusion deploy
```

That's it. Your MCP server is now live, secure, and ready to be connected to your agents.

šŸ‘‰ **[Access the Time Converter MCP on Vinkius](https://vinkius.com/mcp/time-ms-converter)**

## Local Development

Constructed using [MCP Fusion](https://www.npmjs.com/package/@mcpfusion/core) for reliable, strictly typed execution.

```bash
npm install
npm run dev
```