Mcp 随机数
概览
MCP 随机数概述
MCP 随机数是一个与 [MCP (模型上下文协议)] 兼容的服务器,提供来自 random.org 的 真实随机数,这些随机数源自 大气噪声。它旨在帮助 LLM(如 GPT、Claude 等)克服其确定性特性,在需要时生成无偏见的、真正随机的值。
为什么使用它?
LLM 通常难以生成真正的随机数,因为它们基于模式的特性。这个服务器通过从一个可信的、富含熵的源获取随机性来解决这个问题。 对多个 LLM 生成的 100 个随机数(1–100)的测试运行显示出显著的分布偏差——与这个服务器不同,它确保了真正的随机性。
安装与设置
- 克隆并构建项目:
git clone https://github.com/maxbogo/mcp-random-number.git
cd mcp-random-number
npm install
npm run build
- 将其配置为 MCP 服务器:
在您的配置文件中添加以下内容,将 /ABSOLUTE/PATH/TO/
替换为实际的构建路径:
{
"mcpServers": {
"mcp-random-number": {
"command": "node",
"args": ["/ABSOLUTE/PATH/TO/mcp-random-number/build/index.js"]
}
}
}
附加内容
包括一个 分布图,比较流行 LLM 的输出与此服务器的输出,以直观地突出在 AI 应用中使用真实随机性的必要性。
详情
MCP Random Number
An MCP (Model Context Protocol) server that provides true random numbers from atmospheric noise via random.org.
Why?
LLMs struggle with generating truly random numbers. This chart shows the distribution bias of 100 random numbers (range 1-100) from 3 popular LLMs:
Installation
-
Copy, Install, Build:
git clone https://github.com/maxbogo/mcp-random-number.git cd mcp-random-number npm install npm run build
-
Connect to the MCP server:
Add the below json to your configuration with the appropriate
/ABSOLUTE/PATH/TO/
value:{ "mcpServers": { "mcp-random-number": { "command": "node", "args": ["/ABSOLUTE/PATH/TO/mcp-random-number/build/index.js"] } } }
Server配置
{
"mcpServers": {
"mcp-random-number": {
"command": "node",
"args": [
"/ABSOLUTE/PATH/TO/mcp-random-number/build/index.js"
]
}
}
}