UUID MCP 提供程序
一个简单的模型上下文协议 (MCP) 服务器,每当 LLM 调用它时,它都会提供基于时间戳的 UUID。
特征
- 提供单一工具:
generateUuid
- 使用 UUID v7 作为基于时间戳的唯一标识符
- 界面简单,无需输入参数
- 轻松与 Claude 和其他 LLM 整合
安装
用法
您可以直接运行服务器:
与 Claude Desktop 集成
要与 Claude Desktop 集成,请将其添加到您的 Claude Desktop 配置文件中:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
将/absolute/path/to/uuid-mcp/build/index.js
替换为您构建的 index.js 文件的绝对路径。
更新配置后,重新启动Claude Desktop即可看到可用的UUID生成工具。
工作原理
此服务器使用官方uuid
包生成 UUID v7 标识符。UUID v7 专门设计为基于时间戳,同时保持强大的唯一性保证:
- 包含毫秒精度的 Unix 时间戳
- 添加随机数据以确保即使在同一毫秒内生成多个 ID 也能保持唯一性
- 遵循最新的 UUID 生成 RFC 标准
- 提供按时间顺序排序的标识符
- 防止分布式系统中的碰撞
这种方法比自定义 UUID 实现更可靠,即使在高负载下也能消除重复的可能性。
依赖项
@modelcontextprotocol/sdk
:用于 MCP 服务器实现uuid
:用于符合 RFC 标准的 UUID 生成- TypeScript 和相关开发工具
例子
调用时,该工具返回一个如下所示的 UUID v7 字符串:
UUID 的第一部分包含时间戳,使得这些标识符可以按时间顺序排序,同时仍保持标准 UUID 格式。
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Tools
一个简单的模型上下文协议服务器,当被 LLM 调用时会生成基于时间戳的 UUID(v7),提供按时间顺序排序的唯一标识符,无需输入参数。
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityA Model Context Protocol server that provides LLM Agents with a comprehensive toolset for IP geolocation, network diagnostics, system monitoring, cryptographic operations, and QR code generation.Last updated -1656610TypeScriptApache 2.0
- -securityAlicense-qualityA Model Context Protocol server that enables LLMs to read, search, and analyze code files with advanced caching and real-time file watching capabilities.Last updated -2020JavaScriptMIT License
- -securityFlicense-qualityA Model Context Protocol server that enables LLMs to extract and use content from unstructured documents across a wide variety of file formats.Last updated -6Python
- -securityAlicense-qualityA Model Context Protocol server that enables LLMs to interact with databases (currently MongoDB) through natural language, supporting operations like querying, inserting, deleting documents, and running aggregation pipelines.Last updated -TypeScriptMIT License