mcpField
L
lotero

lotero

ローカル
github.com/csacanamゲーム・エンタメ016 週間前に更新

lotero について

Loteroは、ユーザーやAIエージェント向けのオンチェーンスロットマシンです。Base上でUSDCを賭け、Chainlink VRF 2.5で乱数を生成します。エージェントAPIはスピンと報酬請求を中継し、フロントエンドは開発中です。

主な機能

  1. 01Base上でのUSDCスロット
  2. 02Chainlink VRF 2.5による乱数生成
  3. 03スピンと請求に対応するエージェントAPI
  4. 04ラウンドとプレイヤー残高の確認
  5. 05MCPサーバーのセッション別スピン上限

活用シーン

  1. 01エージェントに料金を払いラウンドをプレイ
  2. 02ラウンドの解決状況を確認
  3. 03プレイヤー残高を確認
  4. 04賞金や紹介報酬を請求

MCP 対応

MCPサーバーはspin、get_round、get_balances、claim、get_contract_healthの5つのツールを提供します。スピンはx402で支払い、セッションごとの上限を適用します。

設定

ローカルサーバーの設定はどのクライアントでも共通です。コピーしてクライアントの MCP 設定ファイルに貼り付けてください。

mcp.json · 共通設定
{
"mcpServers": {
"csacanam-lotero": {
"command": "npx",
"args": [
"-y",
"lotero-mcp"
],
"env": {
"LOTERO_WALLET_PRIVATE_KEY": "<LOTERO_WALLET_PRIVATE_KEY>",
"LOTERO_PLAYER_ADDRESS": "<LOTERO_PLAYER_ADDRESS>",
"LOTERO_MAX_SPINS_PER_SESSION": "<LOTERO_MAX_SPINS_PER_SESSION>"
}
}
}
}
起動コマンドnpx -y lotero-mcp
設定が必要な環境変数
LOTERO_WALLET_PRIVATE_KEYシークレットDedicated wallet with USDC on Base — pays spins/claims via x402. Required only for spin/claim.
LOTERO_PLAYER_ADDRESSDefault player — the human's wallet, where winnings accrue and get claimed.
LOTERO_MAX_SPINS_PER_SESSIONEnforced responsible-gambling spin limit per session (default 10).

ローカルサーバーにはマシン上の実行環境(Node.js 18 以上など)が必要です。設定ファイルの場所はクライアントごとに異なります。

パッケージ
npmlotero-mcp0.1.0

ツール

5

掲載時のツール一覧 · 2 週間前に更新

パラメーター型必須説明
playerstringいいえプレイヤーのウォレット(人間のアドレス。デフォルトは LOTERO_PLAYER_ADDRESS)
referralstringいいえ任意の紹介アドレス(賭け金の 1% を獲得)

README(原文)English

プロジェクトの README より

この README の日本語訳はまだありません。以下は英語の原文です。日本語の紹介はページ上部をご覧ください。

🎰 Lotero

A Provably Fair Casino for AI Agents

A provably fair, on-chain slot machine with Chainlink VRF 2.5. Designed for autonomous agents: clients pay in USDC via x402, execution is gasless.

Overview

Lotero lets users (or AI agents) bet USDC and win prizes when three matching symbols appear on the reels. The game uses Chainlink VRF 2.5 for provably fair randomness.

  • RTP ~93% — DOCS/RTP_MODEL.md
  • Max win: 30× — Bet 1 USDC, win up to 30 USDC (three BTC)
  • Symbols — DOGE 5×, BNB 14×, ETH 20×, BTC 30×
  • Referral — 1% commission on referred players' bets
  • Dev fee — 5% of each bet to the team

⚠️ Frontend in development — The web app in packages/frontend is incomplete. The contracts and agent are production-ready.


Smart Contract

SlotMachineV2 (Base mainnet)
ItemValue
Address0xC4b88e90a73fA9ec588E504255A43d4Ccb82edE9
TokenUSDC. Bet 1 USDC, win up to 30 USDC.
VRFChainlink VRF 2.5
EventsSpinRequested, SpinResolved

Core functions

  • playFor(player, referringUserAddress, amountToPlay) — Pay on behalf of another address; the player receives the round, wins, and stats.
  • claimPlayerEarnings(userAddress) — Claim winnings and referral earnings.
  • isResolved(requestId) — Check if a round has been resolved.

Agents

Lotero Agent

Stateless HTTP API that sells spins and claims as a service. Clients pay via x402 (1.1 USDC spin, 0.1 USDC claim); the agent relays playFor and claimPlayerEarnings onchain. Two-agent system: Lotero Agent (Express API) + Ops Agent (external cron calling GET /cron/health). See packages/agent/README.md.

  • POST /spinWith1USDC — Paid (x402). Execute spin for player.
  • POST /claim — Paid (x402). Claim player earnings (gasless).
  • GET /round?requestId=..., GET /player/:address/balances, GET /contract/health — Read-only.
  • GET /cron/health — Ops Agent: system status, may execute transfers and Telegram alerts.
yarn agent        # Start agent
yarn agent:dev    # Dev with watch

Documentation: DOCS/AGENT_FLOWS.md | DOCS/AGENT_API.md

For AI agents:

  • MCP server (lotero-mcp on npm, listed on the official Model Context Protocol registry as io.github.csacanam/lotero): exposes 5 MCP tools over stdio — spin (paid via x402), get_round, get_balances, claim and get_contract_health — built with the official MCP TypeScript SDK (@modelcontextprotocol/sdk), with an enforced session spin limit as a responsible-gambling guardrail. Install:

    claude mcp add lotero -- npx -y lotero-mcp
    

    See mcp/README.md for configuration and tool reference.

  • Agent skill: npx skills add csacanam/lotero-core (or read it at lotero.xyz/skill.md) — wallet setup, x402 spin/poll/claim flow, payouts, budget guardrails.

  • LLM index: lotero.xyz/llms.txt.


Project Structure

packages/
├── agent/         # Lotero Agent — x402 + onchain relay
├── contracts/     # Smart contracts, tests, deploy scripts
│   ├── contracts/   SlotMachine.sol, SlotMachineV2.sol
│   ├── deploy/
│   └── test/
└── frontend/      # Web app (in development)

Documentation

DocDescription
DOCS/AGENT_FLOWS.mdFlow diagrams (cron health, spin, claim)
DOCS/AGENT_API.mdAPI reference, endpoints, env, constants
DOCS/DEPLOY_BASE.mdDeploy contracts to Base
DOCS/RTP_MODEL.mdRTP math and reel layout

Requirements


Quick Start

1. Install dependencies

git clone https://github.com/csacanam/lotero-core.git
cd lotero-core
yarn install

2. Run local chain

yarn chain

3. Deploy contracts (new terminal)

yarn deploy

4. Run tests

yarn contracts:test

5. Start the frontend (optional, in development)

yarn start

App runs at http://localhost:3000.


Production

For Base mainnet: see DOCS/DEPLOY_BASE.md. Contract address above. Fund the VRF subscription with LINK.


License

MIT

コメント

MCP は初めてですか?

プロトコルの概要から最初のサーバーの導入まで、よくある疑問にまとめて答えます。

AI アプリケーションが外部のツールやデータソースに統一的な方法で接続するためのオープンなプロトコルです。クライアントはモデルとの対話を担い、MCP サーバーはツール・リソース・プロンプトテンプレートを提供します。標準メッセージでやり取りするため、1 つのサーバーを複数のクライアントで再利用できます。