Skip to main content
Glama
TeglonLabs

Coin Flip MCP Server

by TeglonLabs

Coin Flip MCP Server

An MCP server that provides true random coin flips using random.org's randomness API. This server demonstrates the Model Context Protocol by providing a tool for generating random outcomes with configurable sides.

Features

Tools

  • flip_coin - Flip a coin with configurable number of sides

    • Optional sides parameter (default: 2)

    • Uses true randomness from random.org

    • Special handling for edge cases (0, 1, or negative sides)

    • For 2 sides: Returns "Heads" or "Tails"

    • For 3 sides: Returns "Heads", "Tails", or "_"

    • For n>3 sides: Returns "It landed on side X"

Related MCP server: MCP Lottery Demo

Development

Install dependencies:

npm install

Build the server:

npm run build

For development with auto-rebuild:

npm run watch

Installation

To use with Claude Desktop, add the server config:

On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json

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

Example Usage

Once connected to an MCP client like Claude Desktop, you can use natural language to interact with the coin flip tool. For example:

  • "Flip a coin"

  • "Roll a 6-sided die"

  • "Give me a random number between 1 and 20"

The server will use true randomness from random.org to generate the result.

Debugging

Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector:

npx @modelcontextprotocol/inspector node build/index.js

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT

Install Server
F
license - not found
B
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Tools

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Enables interaction with the Scryfall API, allowing users to search for Magic: The Gathering card details, retrieve card rulings, and access pricing information using the Model Context Protocol.
    Last updated
    7
    24
    33
    MIT
  • F
    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.
    Last updated
    3
    2
  • F
    license
    -
    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.
    Last updated
    1
  • A
    license
    A
    quality
    D
    maintenance
    Provides search, trending, odds, arbitrage, and category browsing for prediction markets (Polymarket & Kalshi) via the Model Context Protocol, enabling AI agents to access live market data without API keys.
    Last updated
    5
    1
    MIT

View all related MCP servers

Related MCP Connectors

  • Calibrated world model for AI agents. 40 tools: world state, markets, trading. Kalshi + Polymarket.

  • x402-paid agent tools: 18 over HTTP, 14 over stdio. USDC per call, no API key.

  • A Model Context Protocol server for Wix AI tools

View all MCP Connectors

Appeared in Searches

Latest Blog Posts

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/TeglonLabs/coin-flip-mcp'

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