Skip to main content
Glama
Pyroxin

unique-id-generator

by Pyroxin
README.md
# Unique ID Generator MCP Server

A simple MCP server that provides tools for generating unique IDs in several formats. Useful for
when you need an LLM to create data containing new IDs.

## Tools

All tools except the timestamp tool can produce batches of IDs.

- `generate_cuid` - v2 CUIDs (configurable length)
- `generate_nanoid` - NanoIDs (configurable length)
- `generate_ulid` - ULIDs (time-ordered)
- `generate_uuid` - UUID v4 or v7 (optional URN format)
- `generate_iso_timestamp` - Current time as ISO 8601 timestamp (can select seconds, milliseconds, microseconds, or nanoseconds as precision)

## Installation

You can run the server directly from GitHub via `npx`:

```bash
npx github:Pyroxin/mcp-server-unique-id-generator
```

To use with Claude Desktop, add the server config:

On MacOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
On Windows: `%APPDATA%/Claude/claude_desktop_config.json`

```json
{
  "mcpServers": {
    "unique-id-generator": {
      "command": "npx",
      "args": ["github:Pyroxin/mcp-server-unique-id-generator"]
    }
  }
}
```

## Development

Install dependencies:
```bash
npm install
```

Build the server:
```bash
npm run build
```

For development with auto-rebuild:
```bash
npm run watch
```

### Debugging

Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the [MCP Inspector](https://github.com/modelcontextprotocol/inspector), which is available as a package script:

```bash
npm run inspector
```

The Inspector will provide a URL to access debugging tools in your browser.