Skip to main content
Glama
Coin Flip MCP Server

Coin Flip MCP Server

by TeglonLabs

コインフリップMCPサーバー

random.orgの乱数APIを用いて、真にランダムなコイン投げを提供するMCPサーバーです。このサーバーは、設定可能なサイドを持つランダムな結果を生成するツールを提供することで、モデルコンテキストプロトコル(MCP)のデモンストレーションを行います。

特徴

ツール

  • flip_coin - 設定可能な面数でコインを投げる

    • オプションのsidesパラメータ(デフォルト: 2)

    • random.org の真のランダム性を使用

    • エッジケース(0、1、または負の側)の特別な処理

    • 2面の場合:「表」または「裏」を返します

    • 3面の場合:「表」、「裏」、または「_」を返します

    • n>3 面の場合: 「X 面に着地しました」を返します。

Related MCP server: MCP Lottery Demo

発達

依存関係をインストールします:

npm install

サーバーを構築します。

npm run build

自動リビルドを使用した開発の場合:

npm run watch

インストール

Claude Desktop で使用するには、サーバー設定を追加します。

MacOSの場合: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows の場合: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "coin-flip": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-coin-flip"]
    }
  }
}

使用例

Claude DesktopなどのMCPクライアントに接続すると、自然言語を使ってコイントスツールを操作できるようになります。例えば:

  • 「コインを投げる」

  • 「6面サイコロを振る」

  • 「1から20までのランダムな数字をください」

サーバーは random.org からの真のランダム性を使用して結果を生成します。

デバッグ

MCPサーバーはstdio経由で通信するため、デバッグが困難になる場合があります。MCP Inspectorの使用をお勧めします。

npx @modelcontextprotocol/inspector node build/index.js

貢献

貢献を歓迎します!お気軽にプルリクエストを送信してください。

ライセンス

マサチューセッツ工科大学

Available Tools

1 tool
flip_coinB

Flip a coin with n sides using true randomness from random.org. For 3-sided coins, try creative side names like:

  • past/present/future (temporal analysis)

  • true/unknown/false (epistemic states)

  • win/draw/lose (outcome evaluation)

  • rock/paper/scissors (cyclic relationships)

  • less/same/more (abstraction levels)

  • below/within/above (hierarchical positioning)

  • predecessor/current/successor (ordinal progression)

Meta-usage patterns:

  1. Use less/same/more to guide abstraction level of discourse

  2. Use past/present/future to determine temporal focus

  3. Chain multiple flips to create decision trees

  4. Use predecessor/current/successor for ordinal analysis

Ordinal Meta-patterns:

  • Use predecessor to refine previous concepts

  • Use current to stabilize existing patterns

  • Use successor to evolve into new forms

Default ternary values are -/0/+

Inputs: sideNames, sides.

Tool Schema Changelog

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

    TDQS

    B3.3/5.0

    Scored across 1 tool

    Disambiguation5/5

    With only one tool, there is no possibility of confusion or overlap between tools. The tool 'flip_coin' has a single, clearly defined purpose.

    Naming Consistency5/5

    Since there is only one tool, naming consistency is inherently perfect. The tool name 'flip_coin' follows a clear verb_noun pattern.

    Tool Count2/5

    A single tool is too few for a server's purpose, as it limits functionality and suggests an incomplete or overly narrow scope. While the tool is versatile, the server would benefit from additional tools to support more complex operations.

    Completeness2/5

    The server's domain appears to be random generation or decision-making, but with only one tool, there are significant gaps. For example, there are no tools for setting parameters, retrieving results, or managing multiple flips in a structured way, which limits agent workflows.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables random selection tools including lottery drawing from option lists, dice rolling with customizable sides and counts, and coin flipping. Supports both single and multiple draws with duplicate control options.
      3
      2
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Provides dice rolling and coin flipping functionality for AI assistants via the Model Context Protocol. It enables users to roll single or multiple dice with configurable sides and perform randomized coin tosses.
      1
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides true random generation tools for AI agents, including coin flip, dice roller, random numbers, and wheel of fortune, enabling decisions and TTRPG sessions.
      7 npm
      MIT

    Appeared in Searches