npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

betting-method-mcp

v0.1.0

Published

MCP server for calculating various betting methods (Monte Carlo, Martingale, etc.)

Readme

Betting Method MCP Server

CI npm version

An MCP (Model Context Protocol) server that provides calculations for various betting methods. Can be used with Claude Desktop and other MCP-compatible applications.

✨ Now supports 10 betting methods!

🎲 Supported Betting Methods

  • Monte Carlo Method - Sequence-based betting strategy
  • Martingale Method - Double on loss (high risk)
  • Labouchere (Cancellation System) - Flexible sequence strategy
  • Oscar's Grind - Conservative profit-targeting system
  • Cocomo Method - 3x payout Fibonacci progression
  • Goodman (1-2-3-5) - Fixed progression system
  • Fibonacci Method - Fibonacci sequence betting
  • Paroli System - Reverse Martingale (double on wins)
  • D'Alembert Method - Gradual increase/decrease
  • Fixed Percentage Betting - Bankroll percentage strategy (e.g., 10% method)

📦 Installation

Option 1: Install from npm (Recommended)

npm install -g betting-method-mcp

Option 2: Use with npx (No installation needed)

npx betting-method-mcp

Option 3: Install from GitHub

git clone https://github.com/yusakuvol/betting-method-mcp.git
cd betting-method-mcp
npm install
npm run build

🚀 Usage

Claude Desktop Configuration

Edit your claude_desktop_config.json:

If installed via npm:

{
  "mcpServers": {
    "betting-method": {
      "command": "betting-method-mcp"
    }
  }
}

If using npx:

{
  "mcpServers": {
    "betting-method": {
      "command": "npx",
      "args": ["betting-method-mcp"]
    }
  }
}

If installed from GitHub:

{
  "mcpServers": {
    "betting-method": {
      "command": "node",
      "args": ["/path/to/betting-method-mcp/build/index.js"]
    }
  }
}

Usage Examples

You can ask Claude Desktop questions like these:

Start a Monte Carlo session with base unit 10
Initialize Martingale with base bet 10, max bet 1000
Start a Fibonacci betting session with base unit 5
Record a win and tell me the next bet amount
Check the current status

🎯 Available Tools

Each betting method provides 4 MCP tools:

  • {method}_init - Initialize a new betting session
  • {method}_record - Record a win/loss and get the next bet amount
  • {method}_status - Check current state (bet amount, profit/loss, etc.)
  • {method}_reset - Reset the session to initial state

Method Names

  • montecarlo - Monte Carlo Method
  • martingale - Martingale Method
  • labouchere - Labouchere (Cancellation System)
  • oscarsgrind - Oscar's Grind
  • cocomo - Cocomo Method
  • goodman - Goodman (1-2-3-5)
  • fibonacci - Fibonacci Method
  • paroli - Paroli System
  • dalembert - D'Alembert Method
  • percentage - Fixed Percentage Betting

📖 Method Details

Monte Carlo Method

Sequence-based betting strategy that manages bet amounts using a number sequence.

How it works:

  1. Set an initial sequence (e.g., [1, 2, 3])
  2. Bet amount = (first number + last number) × base unit
  3. On win: Remove first and last numbers from the sequence
  4. On loss: Add the lost bet amount (in units) to the end of the sequence
  5. Session completes when the sequence has 0 or 1 numbers

Martingale Method

Doubles the bet amount after each loss. High risk strategy.

⚠️ Warning: Bet amounts increase exponentially during losing streaks. Always set limits!

Labouchere (Cancellation System)

Flexible sequence-based strategy where you can set your target profit.

Oscar's Grind

Conservative system that increases bets only after wins, targeting small consistent profits.

Cocomo Method

Fibonacci-style progression designed for 3x payout games.

Goodman (1-2-3-5)

Fixed progression system: 1 → 2 → 3 → 5 units on consecutive wins.

Fibonacci Method

Uses the Fibonacci sequence (1, 1, 2, 3, 5, 8, 13...) to determine bet amounts.

Paroli System (Reverse Martingale)

Doubles bet on wins instead of losses. Less risky than Martingale.

D'Alembert Method

Gradual progression: +1 unit on loss, -1 unit on win.

Fixed Percentage Betting

Bet a fixed percentage of your bankroll (e.g., 10% of current bankroll).

🛠️ Development

Build

npm run build

Development Mode (watch mode)

npm run watch

Local Testing

npm run dev

Testing

This project uses Vitest for testing with 234+ tests across 10 test files.

# Run all tests
npm test

# Run tests in watch mode
npm run test:watch

# Run tests with UI
npm run test:ui

# Run tests with coverage
npm run test:coverage

Code Quality

This project uses Biome for linting and formatting.

# Lint check
npm run lint

# Lint with auto-fix
npm run lint:fix

# Format code
npm run format

# Check formatting
npm run format:check

# Run all checks (lint + format)
npm run check

🤖 AI-Assisted Development

This project includes context files for various AI coding assistants:

Claude Code Custom Command

This project includes a custom /implement command for automatically implementing new betting methods based on GitHub issues.

Usage:

/implement <issue_number>

This will automatically:

  1. Fetch the issue details from GitHub
  2. Generate the method implementation
  3. Add the State interface
  4. Register MCP tools
  5. Create comprehensive tests
  6. Build and run tests

📁 Project Structure

betting-method-mcp/
├── src/
│   ├── index.ts                    # MCP server entry point
│   ├── types.ts                    # Common type definitions
│   └── methods/
│       ├── __tests__/              # Vitest test files (10 files)
│       ├── montecarlo.ts
│       ├── martingale.ts
│       ├── labouchere.ts
│       ├── oscarsgrind.ts
│       ├── cocomo.ts
│       ├── goodman.ts
│       ├── fibonacci.ts
│       ├── paroli.ts
│       ├── dalembert.ts
│       └── percentage.ts
├── .docs/                          # Method specifications (Japanese)
├── build/                          # Compiled files
└── ...

📄 License

MIT

⚠️ Disclaimer

This tool is provided for educational and research purposes only. Use in actual gambling is at your own risk. Betting strategies do not guarantee profits. Please gamble responsibly.