Lottery (Brazil)
Caixa Econômica Federal lottery draws as MCP tools for Claude. Mega Sena, Lotofácil,
Quina, Lotomania, and Dupla Sena. Every draw is fetched from Caixa’s public API,
fingerprinted, and signed by signed-data.org.
Endpoint: https://lottery.mcp.signed-data.org/mcp
Domain spec: lottery.brazil
Quick start
Section titled “Quick start”Add to your Claude Desktop config (~/.config/claude/claude_desktop_config.json):
{ "mcpServers": { "signeddata-lottery": { "url": "https://lottery.mcp.signed-data.org/mcp" } }}Or test via curl:
curl -X POST https://lottery.mcp.signed-data.org/mcp \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'pip install signeddata-cdspip install signeddata-mcp-lotterysigneddata-mcp-lotteryThen in ~/.config/claude/claude_desktop_config.json:
{ "mcpServers": { "signeddata-lottery": { "command": "signeddata-mcp-lottery", "env": { "CDS_PRIVATE_KEY_PATH": "/path/to/keys/private.pem", "CDS_PUBLIC_KEY_PATH": "/path/to/keys/public.pem", "CDS_ISSUER": "signed-data.org" } } }}git clone https://github.com/signed-data/cds.git && cd cdspip install -e sdk/pythonpip install -e mcp/lotterypython mcp/lottery/server.py # stdiopython mcp/lottery/server.py --transport sse --port 8001 # SSE| Tool | Description |
|---|---|
get_mega_sena_latest | Latest draw — numbers, prizes, acumulado |
get_mega_sena_by_concurso | Specific draw by number |
get_mega_sena_recent | Last N draws (up to 20) |
check_mega_sena_ticket | Check if a set of numbers won |
get_mega_sena_statistics | Frequency analysis over the last N draws |
Resources
Section titled “Resources”| URI | Description |
|---|---|
lottery://mega-sena/latest | Latest result as JSON |
lottery://mega-sena/schema | CDS content type + payload schema |
| Game | Numbers | Draws | Content type |
|---|---|---|---|
| Mega Sena | 6 from 1–60 | Wed, Sat | vocab/lottery-brazil/mega-sena-result |
| Lotofácil | 15 from 1–25 | Mon–Fri | vocab/lottery-brazil/lotofacil-result |
| Quina | 5 from 1–80 | Mon–Fri | vocab/lottery-brazil/quina-result |
| Lotomania | 20 of 100 | Mon, Wed, Fri | vocab/lottery-brazil/lotomania-result |
| Dupla Sena | 2 × 6 from 1–50 | Mon, Fri | vocab/lottery-brazil/dupla-sena-result |
Data source
Section titled “Data source”Official Caixa Econômica Federal API — no authentication required.
GET https://servicebus2.caixa.gov.br/portaldeloterias/api/megasena/GET https://servicebus2.caixa.gov.br/portaldeloterias/api/megasena/{concurso}Environment variables
Section titled “Environment variables”| Variable | Description | Default |
|---|---|---|
CDS_PRIVATE_KEY_PATH | Path to RSA private key for signing | (unsigned if not set) |
CDS_PUBLIC_KEY_PATH | Path to RSA public key for verification | (skip verification) |
CDS_ISSUER | Issuer URI in signed events | signed-data.org |