Skip to main content
Glama
mcp-dice

mcp-dice

by yamaton

mcp-dice: サイコロを振るためのMCPサーバー

鍛冶屋のバッジ スクリーンショット

大規模言語モデル(LLM)がサイコロを振れるようにするモデルコンテキストプロトコル(MCP)サーバー。標準的なサイコロ表記(例: 1d20 )を受け付け、個々の出目とその合計を返します。

特徴

  • 標準的なサイコロ表記法3d6サポート(例: 1d20``2d8+1 )

  • 個々のロールと合計の両方を返します

  • Claude Desktopとの簡単な統合

  • デバッグ用のMCP Inspectorと互換性あり

Related MCP server: Globalping

インストール

Smithery経由でインストール

Smithery経由で Claude Desktop 用の Dice Roller を自動的にインストールするには:

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

uvを利用できるようにします: https://docs.astral.sh/uv/getting-started/installation/

使用法

基本的なコマンドラインの使用法

# Using uvx
uvx mcp-dice

入力形式

サーバーは、 notationフィールドを持つ JSON オブジェクトを受け入れます。

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

応答例:

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

クロードデスクトップ構成

位置

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

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

例

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

注: zshログイン シェルに置き換えます。

開発とデバッグ

開発依存関係のインストール

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

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

テストの実行

uv run pytest

MCPインスペクターの使用

MCP Inspectorは、MCPサーバーのデバッグに役立つツールです。npmを使ってインストールして実行してください。

npx @modelcontextprotocol/inspector uvx mcp-dice

開発のためのClaudeデスクトップ構成

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

注: path/to/mcp-dice-repoファイルシステム上のリポジトリへのパスに置き換えます。

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

注: zshログインシェルに置き換えてください。また、 path/to/mcp-dice-repo 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