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.
Описание
A simple, working example of a Model Context Protocol (MCP) server that lets you play the classic Lemonade Stand game through Claude Desktop.
README
A simple, working example of a Model Context Protocol (MCP) server that lets you play the classic Lemonade Stand game through Claude Desktop.
What is MCP?
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.
Features
- 🌤️ Dynamic weather system affecting sales
- 💰 Business simulation with supply and demand
- 📊 Strategic pricing and inventory management
- 🏁 14-day game cycle with profit tracking
- 🎮 Fully playable through Claude Desktop
Prerequisites
- Node.js (v20.11.1 or higher recommended)
- Claude Desktop
- npm (comes with Node.js)
Quick Start
Clone this repository:
git clone https://github.com/yourusername/Lemonade-Stand-MCP-Server.git cd Lemonade-Stand-MCP-ServerInstall dependencies:
npm installFind your Claude Desktop configuration file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
- macOS:
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!
Playing the Game
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:
- Start a new game
- Analyze the weather conditions
- Make strategic decisions about supplies and pricing
- Report daily results
- Continue until Day 14 or your business fails
Game Mechanics
- Weather System: Temperature and conditions affect customer traffic
- Supply Chain: Buy cups, lemons, sugar, and ice at different prices
- Price Strategy: Set your price per cup to balance profit and demand
- Inventory Management: Ice melts daily; manage your supplies wisely
- Customer Demand: Based on weather, price, and available inventory
Available Tools
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
Configuration Examples
For WSL Users
{
"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"
]
}
}
}
Using NPX
{
"mcpServers": {
"lemonade-stand": {
"command": "npx",
"args": [
"/path/to/Lemonade-Stand-MCP-Server/server.js"
]
}
}
}
Troubleshooting
No hammer icon in Claude Desktop:
- Ensure Claude Desktop is up to date
- Check that the configuration file path is correct
- Verify Node.js is installed and accessible
- Check Claude Desktop logs in:
- Windows:
%APPDATA%\Claude\logs\ - macOS:
~/Library/Logs/Claude/
- Windows:
Server connection error:
- Verify the server path in your configuration is absolute
- Test the server directly with
node server.js - Check for any errors in the Claude Desktop logs
WSL-specific issues:
- Ensure Node.js is installed in WSL
- Use the full path to the Node.js binary
- Check WSL is properly installed and running
Development
To modify the server:
- Edit
server.jsto change game mechanics or add new tools - Test locally with
node server.js - Restart Claude Desktop to load changes
Project Structure
Lemonade-Stand-MCP-Server/
├── server.js # Main MCP server implementation
├── package.json # Node.js dependencies
└── README.md # This file
How It Works
This MCP server implements a simple game loop:
- The server maintains game state in memory
- Each tool represents a game action (buy, sell, etc.)
- When Claude calls a tool, the server updates the game state
- Results are returned to Claude as JSON
- Claude analyzes the results and decides the next action
This demonstrates how MCP can be used to create interactive experiences where AI models can maintain state, make decisions, and interact with complex systems.
Contributing
Feel free to open issues or submit pull requests if you have ideas for improvements or find bugs.
License
MIT
Built as an example of the Model Context Protocol in action.
Установка Lemonade Stand
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/jimmcq/Lemonade-Stand-MCP-ServerFAQ
Lemonade Stand MCP бесплатный?
Да, Lemonade Stand MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Lemonade Stand?
Нет, Lemonade Stand работает без API-ключей и переменных окружения.
Lemonade Stand — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Lemonade Stand в Claude Desktop, Claude Code или Cursor?
Открой Lemonade Stand на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
Fetch
Web content fetching and conversion for efficient LLM usage.
AWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
автор: modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
автор: xuzexin-hzCompare Lemonade Stand with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории ai
