A Model Context Protocol server that enables Claude Desktop to play the classic Lemonade Stand business simulation game with dynamic weather, pricing strategies, and inventory management.
A simple, working example of a Model Context Protocol (MCP) server that lets you play the classic Lemonade Stand game through Claude Desktop.
Model Context Protocol (MCP) is an open standard that enables AI models like Claude to interact with external data sources and tools. This server demonstrates how MCP works by implementing the classic Lemonade Stand game as a set of tools that Claude can use.
Clone this repository:
git clone https://github.com/yourusername/Lemonade-Stand-MCP-Server.git cd Lemonade-Stand-MCP-Server
Install dependencies:
npm install
Find your Claude Desktop configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
Configure Claude Desktop:
{ "mcpServers": { "lemonade-stand": { "command": "node", "args": [ "/absolute/path/to/Lemonade-Stand-MCP-Server/server.js" ] } } }
Restart Claude Desktop
You should now see a hammer icon in Claude Desktop, indicating the MCP server is connected!
Once the server is connected, simply start a new chat with Claude and say:
"Play a complete game of Lemonade Stand using the MCP tools available."
Claude will then:
The server exposes these MCP tools to Claude:
start_game
: Begin a new game sessionget_game_state
: Check current status, money, inventory, and weatherbuy_supplies
: Purchase cups, lemons, sugar, and iceset_price
: Set the price per cup of lemonadesell_lemonade
: Open for business and see daily resultsnext_day
: Advance to the next day{ "mcpServers": { "lemonade-stand": { "command": "wsl.exe", "args": [ "/home/username/.nvm/versions/node/v20.11.1/bin/node", "/home/username/projects/Lemonade-Stand-MCP-Server/server.js" ] } } }
{ "mcpServers": { "lemonade-stand": { "command": "npx", "args": [ "/path/to/Lemonade-Stand-MCP-Server/server.js" ] } } }
No hammer icon in Claude Desktop:
%APPDATA%\Claude\logs\
~/Library/Logs/Claude/
Server connection error:
node server.js
WSL-specific issues:
To modify the server:
server.js
to change game mechanics or add new toolsnode server.js
Lemonade-Stand-MCP-Server/
โโโ server.js # Main MCP server implementation
โโโ package.json # Node.js dependencies
โโโ README.md # This file
This MCP server implements a simple game loop:
This demonstrates how MCP can be used to create interactive experiences where AI models can maintain state, make decisions, and interact with complex systems.
Feel free to open issues or submit pull requests if you have ideas for improvements or find bugs.
MIT
Built as an example of the Model Context Protocol in action.
Discover shared experiences
Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!