lotero-mcp

lotero-mcp

Provably fair on-chain slot machine: x402 spins in USDC on Base, Chainlink VRF results, winnings claimed to the human's wallet. Ships an enforced session spin limit as a responsible-gambling guardrail.

Category
访问服务器

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)

Item Value
Address 0xC4b88e90a73fA9ec588E504255A43d4Ccb82edE9
Token USDC. Bet 1 USDC, win up to 30 USDC.
VRF Chainlink VRF 2.5
Events SpinRequested, 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

Doc Description
DOCS/AGENT_FLOWS.md Flow diagrams (cron health, spin, claim)
DOCS/AGENT_API.md API reference, endpoints, env, constants
DOCS/DEPLOY_BASE.md Deploy contracts to Base
DOCS/RTP_MODEL.md RTP 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

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选