vimday
MCP Servervimdaypublic

mcp mad lucky

Use the Model Context Protocol (MCP) to build the Monad on-chain AI lottery prediction market. This makes it easier for massive adoption.

Repository Info

0
Stars
0
Forks
0
Watchers
0
Issues
TypeScript
Language
-
License

About This Server

Use the Model Context Protocol (MCP) to build the Monad on-chain AI lottery prediction market. This makes it easier for massive adoption.

Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.

Documentation

mcp-mad-lucky

Use the Model Context Protocol (MCP) to build the Monad on-chain AI lottery prediction market. This makes it easier for massive adoption.

(this is just an idea, the code is not production ready)

After ready to use, User can just type:

'help me buy 100 mon ticket for AI-STRATEGY-100 pool'

'help me get the result of AI-STRATEGY-100 pool'

'help me get the history of AI-STRATEGY-100 pool'

'help me get my account balance'

and the AI will help you to bet on the lottery and get the result.

What is MCP?

The Model Context Protocol (MCP) is a standard that allows AI models to interact with external tools and services.

Prerequisites

  • Node.js (v16 or later)
  • npm or yarn
  • Claude Desktop

Getting Started

  1. Clone this repository
git clone https://github.com/vimda/mcp-mad-lucky
  1. Install dependencies:
npm install
  1. Configure private key in env file
cp .env.example .env

Building the MCP server

Monad Testnet related configuration is already added to index.ts in the src folder.

Define the server instance

// Create a new MCP server instance
const server = new McpServer({
  name: "mad-lucky-mcp",
  version: "0.0.1",
  // Array of supported tool names that clients can call
  capabilities: ["get-lottery-result","get-lottery-history","bet-lottery","get-account-balance"]
});

Defining the tools

Scaffold of the bet-lottery tool:

server.tool(
    // Tool ID 
    "bet-lottery",
    // Description of what the tool does
    "Bet on the given lottery",
    // Input schema
    {
        lotteryName: z.string().describe("Lottery name to bet on"),
        amount: z.string().describe("Amount to bet"),
        lotteryNumber: z.string().describe("Lottery number to bet on"),
        lotteryDate: z.string().describe("Lottery date to bet on"),
    },
    // Tool implementation
    async ({ lotteryName, amount, lotteryNumber, lotteryDate }) => {
        // call mad-lucky-client to bet on the given lottery
        // mad-lucky-client is a client that is used to bet on the given lottery. which is also not production ready
    }
);

Scaffold of the get-lottery-result tool:

server.tool(
    // Tool ID 
    "get-lottery-result",
    // Description of what the tool does
    "Get lottery result for a given lottery",
    // Input schema
    {
        lotteryName: z.string().describe("Lottery name to get result for"),
        lotteryNumber: z.string().describe("Lottery number to get result for"),
        lotteryDate: z.string().describe("Lottery date to get result for"),
    },
    // Tool implementation
    async ({ lotteryName, lotteryNumber, lotteryDate }) => {
        // call mad-lucky-client to get lottery result
    }
);

Scaffold of the get-lottery-history tool:

server.tool(
    // Tool ID 
    "get-lottery-history",
    // Description of what the tool does
    "Get lottery history for a given lottery",
    // Input schema
    {
        lotteryName: z.string().describe("Lottery name to get history for"),
    },
    // Tool implementation  
    async ({ lotteryName }) => {
        // call mad-lucky-client to get lottery history
    }
);

Scaffold of the get-account-balance tool:

server.tool(
    // Tool ID 
    "get-account-balance",
    // Description of what the tool does
    "Get account balance for an address",
    // Input schema
    {
        address: z.string().describe("Monad testnet address to check balance for"),
    },
    // Tool implementation
    async ({ address }) => {
        // call public client to get account all token balance
    }
);

Initialize the transport and server from the main function

(still working on it)

Build the project

npm run build

The server is now ready to use!

Adding the MCP server to Claude Desktop

  1. Open "Claude Desktop"

!claude desktop

  1. Open Settings

Claude > Settings > Developer

!claude settings

  1. Open claude_desktop_config.json

!claude config

  1. Add details about the MCP server and save the file.
{
  "mcpServers": {
    ...
    "mad-lucky-mcp": {
      "command": "node",
      "args": [
        "/<path-to-project>/build/index.js"
      ]
    }
  }
}
  1. Restart "Claude Desktop"

Using the MCP server

not production ready yet

Further Resources

  • Monad MCP Resources
  • Model Context Protocol Documentation
  • Monad Documentation
  • Viem Documentation

Quick Start

1

Clone the repository

git clone https://github.com/vimday/mcp-mad-lucky
2

Install dependencies

cd mcp-mad-lucky
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Ownervimday
Repomcp-mad-lucky
LanguageTypeScript
License-
Last fetched8/10/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation