Mcp Dice Roller — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Mcp Dice Roller (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
A Model Context Protocol (MCP) server for rolling dice using standard RPG dice notation. This server provides a tool that can roll various-sized dice and return detailed results.
npm install
npm run build# Run all tests
npm test
# Run tests in watch mode
npm run test:watch
# Run tests with coverage report
npm run test:coverageThe project includes a comprehensive test suite with 75 tests covering:
Test Suites: 2 passed, 2 total
Tests: 75 passed, 75 total
Coverage: 100% statements, 100% branches, 100% functions, 100% linesThe server communicates via stdio and can be integrated with MCP-compatible clients.
node dist/index.jsTo use this MCP server with Claude Code, add the following configuration to your Claude Code settings file (.claude/claude_code_config.json or global settings):
{
"mcpServers": {
"dice-roller": {
"command": "node",
"args": ["dist/index.js"],
"cwd": "${workspaceFolder}/mcp-test-server"
}
}
}Update the cwd path to point to the root directory of this project. The dist/index.js path is relative to the cwd.
After adding the configuration:
npm run buildroll_dice tool will be available for useRoll dice using standard dice notation.
Parameters:
notation (string): Dice notation in the format "NdS" where N is the number of dice and S is the number of sidesExamples:
d6 - Roll one 6-sided died20 - Roll one 20-sided die3d6 - Roll three 6-sided dice2d10 - Roll two 10-sided dice4d8 - Roll four 8-sided diceResponse Format:
The tool returns two text items:
Example response for "3d6":
Rolled 3d6: [4, 2, 5] = 11
{
"rolls": [4, 2, 5],
"total": 11,
"notation": "3d6",
"count": 3,
"sides": 6
}The server supports standard RPG dice notation:
| Notation | Description |
|---|---|
d4 | Roll one 4-sided die |
d6 | Roll one 6-sided die |
d8 | Roll one 8-sided die |
d10 | Roll one 10-sided die |
d12 | Roll one 12-sided die |
d20 | Roll one 20-sided die |
d100 | Roll one 100-sided die (percentile) |
3d6 | Roll three 6-sided dice |
2d10 | Roll two 10-sided dice |
NdS | Roll N dice with S sides each |
NdS or dSThe server provides clear error messages for invalid inputs:
mcp-dice-roller-server/
├── src/
│ ├── diceRoller.ts # Core dice rolling logic
│ └── index.ts # MCP server implementation
├── tests/
│ ├── diceRoller.test.ts # Core functionality tests
│ └── mcpServer.test.ts # MCP integration tests
├── dist/ # Compiled JavaScript output
├── package.json
├── tsconfig.json
├── jest.config.js
└── README.mdnpm run buildnpm run watchThe test suite uses Jest with ts-jest for TypeScript support. Tests cover:
If you see this error:
ReferenceError: exports is not defined in ES module scopeSolution: The TypeScript compiler must be configured to output ES modules. Ensure tsconfig.json has:
{
"compilerOptions": {
"module": "ES2020"
}
}Then rebuild:
npm run buildIf tests fail after modifying the TypeScript or Jest configuration:
rm -rf dist npm run build npm testclaude_desktop_config.json is absoluteIf you see import errors, ensure:
npm installnpm run buildpackage.json has "type": "module"tsconfig.json has "module": "ES2020"MIT
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.