Skip to main content
Glama
uid-generator-mcp

uid-generator-mcp

by tanbopiao

uid-generator-mcp

Standalone MCP server that issues globally unique 64-bit IDs (snowflake layout). Inspired by baidu/uid-generator (Apache-2.0), preserved and re-implemented in pure Python — no JVM needed.

Layout

sign(1) | timestamp(41, ms since 2026-01-01) | worker(10) | sequence(12)
  • 4096 IDs per ms per worker, 1024 workers, ~69 years of headroom.

  • Clock-rollback policy follows the upstream spirit: small rollbacks (≤5 ms) spin-wait; larger rollbacks are refused with ClockRollbackError instead of risking duplicates.

  • Worker IDs auto-allocate against a local lease file so multiple processes on one machine do not collide; override with UID_MCP_WORKER_ID.

Related MCP server: UUID AI MCP

Tools

tool

purpose

issue_id

issue one unique ID

issue_batch

issue 1–1000 IDs, increasing in issue order

decode

parse an ID back to timestamp / worker / sequence

worker_info

show worker id and bit layout

Run

pip install -e .
python run_server.py          # stdio transport

Tests

python3 -m unittest discover tests -v

Covers: single-thread burst uniqueness (5000 IDs), 8-thread concurrency uniqueness (4000 IDs), monotonicity, decode round-trip, worker range and lease allocation.

License

Apache-2.0. The upstream project is preserved under tanbopiao/uid-generator.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      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.
      Eclipse Public 2.0
    • A
      license
      B
      quality
      C
      maintenance
      Generates UUID, ULID, and NanoID identifiers via MCP protocol.
      5
      7 npm
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables generation and parsing of time-sortable unique IDs (ULIDs) without keys, offline.
      71 npm
      MIT
    • A
      license
      Not graded
      quality
      Not graded
      maintenance
      Enables generation of UUIDs (v4, v7) and ULIDs, UTC time retrieval, and customizable random string creation with options for length, case, numbers, and special characters.
      MIT