# Duration

> Duration is a freemium MCP server for time utilities. Parses and formats ISO 8601 durations via an MCP server, for developers and agents. It can run locally on your machine or as a hosted remote server.

- **Kind:** MCP server
- **Pricing:** Freemium
- **Starting price:** $49 a month
- **Platforms:** API, CLI, self-hosted
- **Website:** https://pipeworx.io/packs/duration
- **Repository:** https://github.com/pipeworx-io/mcp-duration
- **MCP Registry name:** io.github.pipeworx-io/duration
- **Categories:** [time utilities](https://ai-powered.com/categories/time-utilities)
- **Listing updated:** 2026-11-18

## About

The Duration server gives AI clients two tools for working with ISO 8601 duration strings. One tool takes a string such as PT1H30M or P1Y2M10DT2H and returns its components along with an approximate total in seconds. The other goes the reverse way, turning a number of seconds into an ISO 8601 string plus a readable form. The README notes that months are estimated as 30 days and years as 365 days in the total.

The README describes the package as a local stdio bridge that forwards calls to a Pipeworx gateway endpoint, so the tools need network access and there is no offline mode, even though the page describes the conversions as offline. The endpoint is also reachable directly over streamable HTTP, and it can be added to Claude, Cursor, VS Code or Claude Code with a single config entry.

The server suits developers who handle durations in APIs, scheduling or media metadata and want an agent to do the conversion rather than writing the parsing code themselves. Calls are anonymous by default with a daily cap, and a free Pipeworx key raises that cap.

## Features

- **Parse ISO 8601 durations:** Breaks a duration string into its components and gives an approximate total in seconds.
- **Format seconds as durations:** Converts a count of seconds into an ISO 8601 string and a human-readable form.
- **Remote and local transports:** Available as a streamable HTTP endpoint or as an npm stdio package.
- **Optional API key:** Anonymous calls are capped daily; a free Pipeworx key raises the limit.

## Good for

- Converting ISO 8601 duration fields from an API response into seconds
- Turning a number of seconds into a readable length for display
- Checking how a duration string such as P1Y2M10DT2H is interpreted by an agent
- Adding duration conversion to an MCP client without writing a parser

## Install

### Claude Code (Terminal)

```sh
claude mcp add --transport http duration https://gateway.pipeworx.io/duration/mcp
```

### Claude Desktop (Settings → Connectors → Add custom connector)

```sh
https://gateway.pipeworx.io/duration/mcp
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "duration": {
      "url": "https://gateway.pipeworx.io/duration/mcp"
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "duration": {
      "type": "http",
      "url": "https://gateway.pipeworx.io/duration/mcp"
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "duration": {
      "serverUrl": "https://gateway.pipeworx.io/duration/mcp"
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "duration": {
      "type": "http",
      "url": "https://gateway.pipeworx.io/duration/mcp"
    }
  }
}
```

## Tools

- `parse_duration`: Parse an ISO 8601 duration string into components and an approximate total in seconds.
- `format_duration`: Convert a number of seconds into an ISO 8601 duration string and a human-readable form.

## FAQ

### How are months and years counted in the total?

The README says months are estimated as 30 days and years as 365 days for the approximate total in seconds.

### Does the server need an API key?

No. The README says calls work without a key but are capped at 50 per day; a free account raises the cap to 200 per day.

### Which tools does the server provide?

The README lists parse_duration and format_duration. Each endpoint also lists shared Pipeworx meta-tools alongside them.

### Is Duration free?

Duration has a free plan, with paid plans for more usage or features. Paid plans start at $49 a month.

### How do I add Duration to Claude Code?

Run this command in your terminal: claude mcp add --transport http duration https://gateway.pipeworx.io/duration/mcp

### What are the best alternatives to Duration?

The closest alternatives to Duration are Datecalc, Timestamp, ISO 8601 duration shape, Timeapi Io and UTC ISO time only.

## Where this comes from

- Description: written from the project's README, the project's website and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Datecalc](https://ai-powered.com/mcp/datecalc): Datecalc is a freemium MCP server for time utilities.
- [Timestamp](https://ai-powered.com/mcp/timestamp): Timestamp is a freemium MCP server for time utilities.
- [ISO 8601 duration shape](https://ai-powered.com/mcp/iso-8601-duration-shape): ISO 8601 duration shape is an MCP server for time utilities.
- [Timeapi Io](https://ai-powered.com/mcp/timeapi-io): Timeapi Io is a freemium MCP server for time utilities.
- [UTC ISO time only](https://ai-powered.com/mcp/utc-iso-time-only): UTC ISO time only is an open-source MCP server for time utilities.
- [UTC ISO semester 1-2](https://ai-powered.com/mcp/utc-iso-semester-1-2): UTC ISO semester 1-2 is an MCP server for time utilities.
- [UTC ISO date](https://ai-powered.com/mcp/utc-iso-date): UTC ISO date is an MCP server for time utilities.
- [Timeapi MCP](https://ai-powered.com/mcp/timeapi-mcp): Timeapi MCP is an open-source MCP server for time utilities.

---
Source: https://ai-powered.com/mcp/duration
