Skip to main content
Glama
mcp-dice

mcp-dice

by yamaton

mcp-dice: Un servidor MCP para tirar dados

insignia de herrería captura de pantalla

Un servidor de Protocolo de Contexto de Modelo (MCP) que permite a los Modelos de Lenguaje Grandes (LLM) lanzar dados. Acepta la notación de dados estándar (p. ej., 1d20 ) y devuelve tanto las tiradas individuales como su suma.

Características

  • Admite notación de dados estándar (por ejemplo, 1d20 , 3d6 , 2d8+1 )

  • Devuelve tanto los rollos individuales como la suma total

  • Fácil integración con Claude Desktop

  • Compatible con MCP Inspector para depuración

Related MCP server: Globalping

Instalación

Instalación mediante herrería

Para instalar Dice Roller para Claude Desktop automáticamente a través de Smithery :

npx @smithery/cli install mcp-dice --client claude

Hacer que uv esté disponible: https://docs.astral.sh/uv/getting-started/installation/

Uso

Uso básico de la línea de comandos

# Using uvx
uvx mcp-dice

Formato de entrada

El servidor acepta un objeto JSON con un campo notation :

{
  "notation": "2d6+3"
}

Ejemplos de respuestas:

{
  "rolls": [
    3,
    1
  ],
  "sum": 4,
  "modifier": 3,
  "total": 7,
  "notation": "2d6+3",
  "timestamp": "2024-12-03T16:36:38.926452"
}

Configuración del escritorio de Claude

Ubicación

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Ventanas: %APPDATA%/Claude/claude_desktop_config.json

Ejemplos

{
  "mcpServers": {
    "dice": {
      "command": "uvx",
      "args": ["mcp-dice"]
    }
  }
}
{
  "mcpServers": {
    "dice": {
      "command": "wsl",
      "args": [
        "-e",
        "zsh",
        "-lc",
        "uvx mcp-dice"
      ]
    }
  }
}

Nota: reemplace zsh con su shell de inicio de sesión.

Desarrollo y depuración

Instalación de dependencias de desarrollo

# Clone the repository
git clone https://github.com/yourusername/mcp-dice
cd mcp-dice

# Install development dependencies
uv pip install -e ".[dev]"

Ejecución de pruebas

uv run pytest

Uso del inspector MCP

El Inspector MCP es una herramienta útil para depurar su servidor MCP. Instálelo y ejecútelo con npm:

npx @modelcontextprotocol/inspector uvx mcp-dice

Configuración de escritorio de Claude para desarrollo

{
  "mcpServers": {
    "dice": {
      "command": "uv",
      "args": [
        "run",
        "--directory",
        "path/to/mcp-dice-repo",
        "mcp-dice"
      ]
    }
  }
}

Nota: Reemplace path/to/mcp-dice-repo con la ruta al repositorio en su sistema de archivos.

{
  "mcpServers": {
    "dice": {
      "command": "wsl",
      "args": [
        "-e",
        "zsh",
        "-lc",
        "uv run --directory path/to/mcp-dice-repo mcp-dice"
      ]
    }
  }
}

Nota: Reemplace zsh con su shell de inicio de sesión. Además, reemplace path/to/mcp-dice-repo con la ruta al repositorio en su sistema de archivos WSL.

Available Tools

1 tool
roll_diceA

Roll dice using standard notation (e.g., '2d6+3', '1d20-2')

Inputs: notation (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 1 tool

    Disambiguation5/5

    With only one tool, there is no possibility of ambiguity or overlap between tools. The single tool 'roll_dice' has a clearly distinct purpose that cannot be confused with any other tool in this set.

    Naming Consistency5/5

    The naming follows a consistent verb_noun pattern with 'roll_dice', and since there is only one tool, there is no inconsistency to evaluate. The naming is clear and predictable for this single-tool server.

    Tool Count2/5

    A single tool is generally too few for most server purposes, as it limits functionality and can feel thin. For a dice-rolling server, while the core operation is covered, additional tools like rolling multiple dice types or retrieving roll history could enhance completeness, making the count borderline inappropriate.

    Completeness3/5

    The tool covers the basic dice-rolling functionality well, but there are notable gaps. For example, there are no tools for listing available dice types, saving roll results, or performing statistical analysis on rolls, which could be expected in a more comprehensive dice-rolling domain.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers