Get the FREE Ultimate OpenClaw Setup Guide →

Lemonade-Stand

A simple, working example of a Model Context Protocol (MCP) server that lets you play the classic Lemonade Stand game through Claude Desktop.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio jimmcq-lemonade-stand-mcp-server node /absolute/path/to/Lemonade-Stand-MCP-Server/server.js \
  --env PORT="Port the MCP server listens on (default 8080)" \
  --env LOG_LEVEL="info|debug|error"

How to use

Lemonade Stand MCP Server exposes a playable lemonade stand game through Claude Desktop by implementing a set of MCP tools. The server maintains a simple in-memory game state and exposes actions such as starting a new game, buying supplies, setting a price per cup, selling lemonade, and advancing to the next day. Claude can call these tools in sequence to simulate a complete 14-day game cycle, with weather, inventory, pricing, and daily profits influencing the outcome. The available tools are start_game, get_game_state, buy_supplies, set_price, sell_lemonade, and next_day. Use these tools to iterate through days, analyze weather conditions, adjust strategy, and track profits and inventory as the game progresses.

To use the server, connect it to Claude Desktop by configuring the mcpServers entry in Claude’s config to point to the server.js file. Once connected, initiate a new chat and instruct Claude to play a complete game. Claude will automatically call the tools in the proper sequence to simulate days of sales, weather effects, and inventory management, returning results after each action for review and strategic decisions.

How to install

Prerequisites:

  • Node.js (v20.11.1 or higher recommended)
  • npm (comes with Node.js)
  • Claude Desktop installed

Installation steps:

  1. Clone the repository: git clone https://github.com/yourusername/Lemonade-Stand-MCP-Server.git cd Lemonade-Stand-MCP-Server

  2. Install dependencies: npm install

  3. Start the MCP server locally (example): node server.js

    or if you prefer npm script (if defined in package.json):

    npm run start

  4. Configure Claude Desktop:

    • Locate Claude Desktop configuration file (macOS or Windows)
    • Add or update the mcpServers entry with the path to your local server as shown in the Quick Start section of the README.
  5. Restart Claude Desktop and verify the hammer icon appears, indicating the MCP server is connected.

Additional notes

Tips and common issues:

  • Ensure the path to server.js is absolute in your Claude Desktop config.
  • If you don’t see the hammer icon, verify Node.js is installed and that the server process starts without errors (check terminal output or logs).
  • The server uses an in-memory game state; if you restart the server, any ongoing game will be reset.
  • If you want to customize game parameters (weather dynamics, pricing sensitivity, etc.), modify server.js and restart Claude Desktop to load changes.
  • For WSL users or non-standard environments, make sure Node.js is accessible within the environment you configure in Claude Desktop.

Related MCP Servers

Sponsor this space

Reach thousands of developers