Skip to main content
Glama
lottery-mcp

lottery-mcp

by ishuen

Lottery MCP Server

This MCP (Model Context Protocol) server enables retrieval of Taiwan lottery data for a specified month. It currently supports four games: Super Lotto 638 (威力彩), Lotto 649 (大樂透), Daily Cash 539 (今彩539), and Lotto 4D (4星彩).

Requirements

  • Python 3.9+

  • uv (Python package manager)

Related MCP server: roc-cwa-mcp

Usage

Install uv if you don't have it:

curl -LsSf https://astral.sh/uv/install.sh | sh

Start the server:

uv run main.py

Running Locally with Claude App

To use this MCP server with Claude App, follow these steps:

  1. Open Settings > Developer in Claude App.

  2. Add or update your configuration as shown below, replacing <absolute_path_to_the_folder> with the full path to your project directory:

    {
      "mcpServers": {
        "lottery": {
          "command": "uv",
          "args": [
            "--directory",
            "<absolute_path_to_the_folder>",
            "run",
            "main.py"
          ]
        }
      }
    }
  3. After connecting, a blue running tag will appear next to your server name in the Local MCP servers list.

  4. Access the server's tools by clicking the Search and tools button in the chat interface.

This confirms the MCP server is running and integrated with Claude App.

Troubleshoot

Available Tools

4 tools
get_daily_cash_monthB

Get lottery, daily cash (今彩539), data in the specified month Args: year: target year, e.g. 2024 month: target month, e.g. 5

Inputs: year (required), month (required). Returns: result

get_lotto_4d_monthC

Get lottery, lotto 4d (4星彩), data in the specified month Args: year: target year, e.g. 2024 month: target month, e.g. 5

Inputs: year (required), month (required). Returns: result

get_lotto_649_monthC

Get lottery, super lotto 649 (大樂透), data in the specified month Args: year: target year, e.g. 2024 month: target month, e.g. 5

Inputs: year (required), month (required). Returns: result

get_super_lotto_monthB

Get lottery, super lotto 638 (威力彩), data in the specified month Args: year: target year, e.g. 2024 month: target month, e.g. 5

Inputs: year (required), month (required). Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool targets a distinct lottery game (super lotto 638, lotto 649, daily cash, lotto 4d) with no overlap. The game name in the tool name and description makes the purpose unambiguous.

    Naming Consistency5/5

    All four tools follow a consistent get_<game>_month pattern. The naming is predictable and clearly indicates the action and resource.

    Tool Count4/5

    Four tools is reasonable given the server covers four distinct lottery games. The scope is narrow but well-defined, and each tool earns its place.

    Completeness3/5

    The surface only provides monthly data retrieval for each game. There are no tools for fetching individual draws, latest results, or time ranges, which are common needs. CRUD operations are not applicable, but the read-only surface is limited to a single granularity.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      A
      quality
      Not graded
      maintenance
      Enables users to search and retrieve detailed information about Taiwan government procurement tenders through the Government Electronic Procurement System API. It supports searching tenders by keyword, category code, date, and government unit.
      6
      -
    • A
      license
      A
      quality
      D
      maintenance
      Enables to access Taiwan Central Weather Administration data, including 3-day and 1-week weather forecasts for counties/cities and historical rainfall data.
      3
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Provides tools to query Chinese lottery results, check prizes, and update data for 双色球 (Double Color Ball) and 大乐透 (Super Lotto).
      4
      1
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Provides Taiwan stock market data through FinMind v4 API, including daily OHLCV, monthly revenue, institutional investors, margin trading, dividends, and financial statements. Enables MCP clients like ChatGPT or Codex to query Taiwan financial datasets via simple tools.
      -