# random MCP server

> Generates statistically accurate random integers, floating-point numbers, and probability distribution samples via Web Crypto API.

- Repository: https://github.com/eldesh/random-mcp
- Page: https://hostedmcp.org/servers/eldesh/random-mcp
- Transport: remote
- Stars: 0
- License: MIT
- Latest version: 2.1.0

## Install

### Claude Code

```sh
claude mcp add --transport http random-mcp https://random-mcp.eldesh-tools.workers.dev/mcp
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "random-mcp": {
      "url": "https://random-mcp.eldesh-tools.workers.dev/mcp"
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "random-mcp": {
      "type": "http",
      "url": "https://random-mcp.eldesh-tools.workers.dev/mcp"
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"random-mcp","type":"http","url":"https://random-mcp.eldesh-tools.workers.dev/mcp"}'
```

### Codex

```sh
codex mcp add random-mcp --url https://random-mcp.eldesh-tools.workers.dev/mcp
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.random-mcp]
url = "https://random-mcp.eldesh-tools.workers.dev/mcp"
```

### Gemini CLI

```sh
gemini mcp add -s user --transport http random-mcp https://random-mcp.eldesh-tools.workers.dev/mcp
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "random-mcp": {
      "url": "https://random-mcp.eldesh-tools.workers.dev/mcp",
      "type": "http"
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `COOKIE_ENCRYPTION_KEY` | no | no |  |
| `GITHUB_CLIENT_ID` | no | no |  |
| `GITHUB_CLIENT_SECRET` | no | no |  |
| `GLAMA_MAINTAINER_EMAIL` | no | no |  |

## FAQ

### Why should I use this instead of letting the AI generate random numbers?

Language models tend to have biases in their training data, causing them to prefer certain numbers (like 7) over others. This server uses the Web Crypto API to ensure true statistical randomness.

### Is this server suitable for generating cryptographic keys?

No, the server is intended for statistical sampling and not for generating cryptographic keys or authentication tokens.

### How do I connect this to Notion AI?

In Notion, go to Settings > Connections > MCP > Custom MCP, enter the official server URL, select OAuth for authentication, and complete the GitHub sign-in process.
