Drand
Visit ProjectFetch verifiable random numbers from the drand network.
Visit ProjectCategory
Tags
What is drand-mcp-server?
Drand-mcp-server is a server that integrates with the Model Context Protocol (MCP) to fetch verifiable random numbers from the drand network. It allows AI applications to use secure, verifiable randomness as an input seed for model-driven flows.
How to use drand-mcp-server?
- Installation: The server can be run using
npx
or by building from source locally.- VS Code Integration: Configure the server in
.vscode/mcp.json
with the npx command. - Claude Desktop Integration: Add the server to Claude's config.
- VS Code Integration: Configure the server in
- Usage: Use the provided tools (e.g.,
get-randomness-latest
,get-randomness-by-time
,get-randomness-by-round
) to fetch random numbers based on different criteria. - Building from Source: Clone the repo, install dependencies, build, and run the application.
Key Features of drand-mcp-server?
- Integration with drand network to fetch verifiable random numbers.
- Supports MCP for seamless integration with AI applications.
- Tools to fetch randomness by time, round, or the latest available beacon.
- Configurable for use with VS Code and Claude Desktop.
Use Cases of drand-mcp-server?
- Repeatable, random sampling of input data for AI models.
- Verifiable interaction with other MCP servers (e.g., for reward distribution).
- Validating the output of random processes using historical drand beacons.
FAQ from drand-mcp-server?
-
Is randomness truly verifiable?
Yes, drand uses distributed randomness generation across multiple parties to ensure verifiability.
-
Can I select items from a list with this server?
A roadmap item mentions this feature, but it is not yet implemented.
-
What versions of Node.js are supported?
Node.js v21 or later is required to use the
fetch
API.
drand-mcp-server 🎲
Use verifiable randomness in your AI application. This Model Context Protocol (MCP) server enables you to get a random value from the drand network, verify its validity and use it as an input seed to your model-driven flows!
Use Cases
- repeatable, random sampling of input data
- interaction with other MCP servers in a verifiable manner (e.g. paying out rewards based on a prompt)
- verifying the output of another random process using historical drand beacons
Prerequisites
- a relatively recent version of node (v21+ -
fetch
is required)
Installation
You can run the MCP server either using npx or after building locally.
Usage with VS Code
Create a file called .vscode/mcp.json
in your workspace (or in your home directory) and add the following code:
{
"servers": {
"drand": {
"command": "npx",
"args": [
"drand-mcp-server"
]
}
}
}
For additional info, see the VS Code docs on MCP
Usage with Claude
You can run the drand-mcp-server alongside claude desktop by adding the following to your config:
{
"mcpServers": {
"drand": {
"command": "npx",
"args": [
"drand-mcp-server"
]
}
}
}
Tools
The following tools are available from the MCP server
Name | Params | Description |
---|---|---|
get-randomness-latest | none | fetches the latest available beacon from drand quicknet |
get-randomness-by-time | time in milliseconds | fetches the randomness beacon emitted at or just before the time |
provided | ||
get-randomness-by-round | round | fetches the randomness beacon emitted with a given round number |
Building from source
- install dependencies with
npm install
- build the application with
npm run build
- run the application with either
npm start
ornode ./dist/index.mjs
You can also configure VS Code and Claude as above, replacing the command/args with the following:
"command": "node",
"args": ["/path/to/my/project/drand-mcp-server/dist/index.mjs"]
Roadmap
- [x] fetch latest randomness
- [x] fetch randomness by round
- [x] fetch randomness by time
- [ ] select items from a list