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"] } } }
伺服器配置
{
"mcpServers": {
"mcp-random-number": {
"command": "node",
"args": [
"/ABSOLUTE/PATH/TO/mcp-random-number/build/index.js"
]
}
}
}