Skip to main content
Glama

mcp-dice

by yamaton
MIT License
1
  • Apple

mcp-dice:用于掷骰子的 MCP 服务器

截屏

一个模型上下文协议 (MCP) 服务器,支持大型语言模型 (LLM) 掷骰子。它接受标准骰子符号(例如1d20 ),并返回每次掷骰结果及其和。

特征

  • 支持标准骰子符号(例如1d203d62d8+1
  • 返回单个掷骰结果和总和
  • 轻松与 Claude Desktop 集成
  • 兼容 MCP Inspector 进行调试

安装

通过 Smithery 安装

要通过Smithery自动安装 Dice Roller for Claude Desktop:

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" }

Claude桌面配置

地点

  • 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" ] } } }

注意:用您的登录 shell 替换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替换为您的登录 shell。另外,请将path/to/mcp-dice-repo替换为您的 WSL 文件系统上的存储库路径。

-
security - not tested
A
license - permissive license
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

一个允许 LLM 掷骰子的 MCP 服务器

  1. 特征
    1. 安装
      1. 通过 Smithery 安装
    2. 用法
      1. 基本命令行用法
      2. 输入格式
    3. Claude桌面配置
      1. 地点
      2. 示例
    4. 开发与调试
      1. 安装开发依赖项
      2. 运行测试
      3. 使用 MCP 检查器
      4. Claude 桌面开发配置

    Related MCP Servers

    • -
      security
      A
      license
      -
      quality
      MCP server for toolhouse.ai. This does not rely on an external llm unlike the official server.
      Last updated -
      1
      Python
      MIT License
    • A
      security
      A
      license
      A
      quality
      An MCP server that provides LLMs access to other LLMs
      Last updated -
      4
      14
      12
      JavaScript
      MIT License
    • A
      security
      A
      license
      A
      quality
      An MCP server that enables LLMs to perform blockchain operations on the Base network through natural language commands, including wallet management, balance checking, and transaction execution.
      Last updated -
      4
      4
      1
      TypeScript
      MIT License
      • Apple
    • A
      security
      A
      license
      A
      quality
      MCP server implementation that enables LLMs to interact with Rollbar error tracking data, allowing users to list and analyze errors, view occurrences, track deployments, and access project information.
      Last updated -
      13
      256
      2
      TypeScript
      MIT License

    View all related MCP servers

    MCP directory API

    We provide all the information about MCP servers via our MCP API.

    curl -X GET 'https://glama.ai/api/mcp/v1/servers/yamaton/mcp-dice'

    If you have feedback or need assistance with the MCP directory API, please join our Discord server