Betting Method MCP Server
An MCP server that provides calculations for 11 betting methods including Martingale, Fibonacci, and Kelly Criterion. Enables users to initialize sessions, record wins/losses, and get next bet amounts through natural language.
README
Betting Method MCP Server
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 11 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)
- Kelly Criterion - Mathematically optimal bet sizing for long-term growth
📦 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
Some methods also provide:
{method}_statistics- Get detailed session statistics (win rate, ROI, streaks, risk metrics)
Method Names
montecarlo- Monte Carlo Methodmartingale- Martingale Methodlabouchere- Labouchere (Cancellation System)oscarsgrind- Oscar's Grindcocomo- Cocomo Methodgoodman- Goodman (1-2-3-5)fibonacci- Fibonacci Methodparoli- Paroli Systemdalembert- D'Alembert Methodpercentage- Fixed Percentage Bettingkelly- Kelly Criterion
📖 Method Details
Monte Carlo Method
Sequence-based betting strategy that manages bet amounts using a number sequence.
How it works:
- Set an initial sequence (e.g.,
[1, 2, 3]) - Bet amount = (first number + last number) × base unit
- On win: Remove first and last numbers from the sequence
- On loss: Add the lost bet amount (in units) to the end of the sequence
- 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).
Kelly Criterion
Mathematically optimal betting strategy that calculates the ideal bet size to maximize long-term bankroll growth.
How it works:
- Formula:
f* = (bp - q) / bf*= optimal bet fraction (percentage of bankroll)b= payout odds (profit multiplier)p= win probabilityq= loss probability (1 - p)
- Fractional Kelly: Use a fraction (0.25, 0.5, etc.) of full Kelly to reduce volatility
- Dynamic adjustment: After 30+ games, uses actual win rate instead of estimated probability
- Automatically adjusts bet size based on current bankroll and performance
⚠️ Note: Full Kelly (1.0) can be very volatile. Half Kelly (0.5) or Quarter Kelly (0.25) are recommended for practical use.
🤝 Contributing
We welcome contributions! Please see CONTRIBUTING.md for detailed guidelines.
Quick Start for Contributors
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/betting-method-mcp.git - Install dependencies:
npm install - Create a branch:
git checkout -b feature/your-feature-name - Make your changes and add tests
- Ensure all checks pass:
npm run build && npm test && npm run check - Commit following Conventional Commits
- Push and create a Pull Request
Issue Templates
When reporting issues or suggesting features, please use the appropriate template:
- Bug Report: For reporting bugs or unexpected behavior
- Feature Request: For suggesting new features or improvements
- Betting Method: For proposing new betting strategies
See our Issue Templates for more details.
🛠️ 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 380+ tests across 15 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.md - Comprehensive context for Claude AI assistants
- AGENT.md - General context for any AI agent
- .github/copilot-instructions.md - GitHub Copilot instructions
- .cursorrules - Cursor AI rules
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:
- Fetch the issue details from GitHub
- Generate the method implementation
- Add the State interface
- Register MCP tools
- Create comprehensive tests
- Build and run tests
📁 Project Structure
betting-method-mcp/
├── src/
│ ├── index.ts # MCP server entry point
│ ├── types.ts # Common type definitions
│ ├── helpers/ # MCP response & tool definition helpers
│ │ ├── __tests__/ # Helper test files
│ │ ├── mcp-response.ts # Response formatting utilities
│ │ ├── statistics-handler.ts # Statistics response builder
│ │ └── tool-definitions.ts # Tool schema factory functions
│ ├── utils/
│ │ └── statistics.ts # Statistics calculation utilities
│ └── methods/
│ ├── __tests__/ # Method test files (11 files)
│ ├── montecarlo.ts
│ ├── martingale.ts
│ ├── labouchere.ts
│ ├── oscarsgrind.ts
│ ├── cocomo.ts
│ ├── goodman.ts
│ ├── fibonacci.ts
│ ├── paroli.ts
│ ├── dalembert.ts
│ ├── percentage.ts
│ └── kelly.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.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。