Lottery MCP Server
Provides tools to query Chinese lottery results, check prizes, and update data for 双色球 (Double Color Ball) and 大乐透 (Super Lotto).
README
Lottery MCP Server
A Model Context Protocol (MCP) server for Chinese lottery data query and prize checking. Supports 双色球 (Double Color Ball) and 大乐透 (Super Lotto).
Features
- 🔄 Update lottery data - Fetch latest lottery results from official sources
- 🔍 Query results - Search lottery results by date range
- 🎯 Check prizes - Check if your numbers won any prizes
- 📊 Get latest results - Quick access to recent lottery draws
Installation
pip install mcp requests
MCP Tools
| Tool | Description |
|---|---|
update_lottery |
Update lottery data to local database |
query_lottery |
Query lottery results by date range |
check_prize |
Check winning status for given numbers |
get_latest_results |
Get recent lottery results |
Configuration
Add to your MCP config (e.g., .kiro/settings/mcp.json):
{
"mcpServers": {
"lottery": {
"command": "python",
"args": ["/path/to/lottery_mcp_server.py"],
"env": {
"LOTTERY_DATA_DIR": "/path/to/data"
},
"disabled": false,
"autoApprove": ["update_lottery", "query_lottery", "check_prize", "get_latest_results"]
}
}
}
Environment Variables
| Variable | Description | Default |
|---|---|---|
LOTTERY_DATA_DIR |
Directory to store lottery data | ~/lottery_data |
Usage Examples
Update lottery data
update_lottery("double_ball", "2025-12-01", "2026-01-18")
update_lottery("super_lotto", "2025-12-01", "2026-01-18")
Query results
query_lottery("double_ball", "2025-12-01", "2026-01-18")
Check prize (Double Color Ball: 6 red + 1 blue)
check_prize("double_ball", "2025-12-01", "2026-01-18", [3, 11, 14, 19, 29, 30, 15])
Check prize (Super Lotto: 5 front + 2 back)
check_prize("super_lotto", "2025-12-01", "2026-01-18", [8, 13, 27, 30, 32, 2, 3])
Get latest results
get_latest_results("double_ball", 5)
get_latest_results("super_lotto", 10)
Lottery Types
| Type | ID | Description | Numbers |
|---|---|---|---|
double_ball |
双色球 | Double Color Ball | 6 red (1-33) + 1 blue (1-16) |
super_lotto |
大乐透 | Super Lotto | 5 front (1-35) + 2 back (1-12) |
Prize Levels
Double Color Ball (双色球)
| Level | Red Match | Blue Match |
|---|---|---|
| 一等奖 | 6 | ✓ |
| 二等奖 | 6 | ✗ |
| 三等奖 | 5 | ✓ |
| 四等奖 | 5 or 4+blue | - |
| 五等奖 | 4 or 3+blue | - |
| 六等奖 | 0-2 | ✓ |
Super Lotto (大乐透)
| Level | Front Match | Back Match |
|---|---|---|
| 一等奖 | 5 | 2 |
| 二等奖 | 5 | 1 |
| 三等奖 | 5 | 0 |
| 四等奖 | 4 | 2 |
| 五等奖 | 4 | 1 |
| 六等奖 | 3 | 2 |
| 七等奖 | 4+0 or 3+1 | - |
| 八等奖 | Various combinations | - |
Data Source
Data is fetched from 中国福彩网:
- 双色球: https://www.zhcw.com/kjxx/ssq/
- 大乐透: https://www.zhcw.com/kjxx/dlt/
License
MIT License
Disclaimer
This tool is for educational and entertainment purposes only. Please gamble responsibly.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.