Lemonade Stand MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Lemonade Stand MCP Serverstart a new game and buy 50 cups, 30 lemons, and 5 pounds of sugar"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
๐ Lemonade Stand MCP Server
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.
Related MCP server: MCP Tools
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)
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.jsonWindows:
%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!
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/
Server connection error:
Verify the server path in your configuration is absolute
Test the server directly with
node server.jsCheck 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 toolsTest locally with
node server.jsRestart 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 fileHow 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.
Available Tools
5 toolsbuy_suppliesC
Purchase supplies for the lemonade stand
| Name | Required | Description | Default |
|---|---|---|---|
| gameId | Yes | The game ID | |
| cups | No | Number of cups to buy | |
| lemons | No | Number of lemons to buy | |
| sugar | No | Amount of sugar to buy | |
| ice | No | Amount of ice to buy |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden but offers minimal behavioral insight. It implies a transactional action ('purchase') but doesn't disclose effects like cost, inventory changes, success conditions, or error handling, which are critical for a purchase tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with zero waste, clearly front-loading the core purpose. It's appropriately sized for the tool's complexity, making it easy to scan and understand quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's transactional nature, lack of annotations, and no output schema, the description is incomplete. It doesn't cover behavioral aspects like what happens post-purchase, error cases, or integration with sibling tools, leaving significant gaps for agent usage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema fully documents all parameters (gameId, cups, lemons, sugar, ice). The description adds no additional meaning beyond the schema, such as units for sugar/ice or purchase limits, meeting the baseline for high coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('purchase') and resource ('supplies for the lemonade stand'), making the tool's purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'sell_lemonade' or 'set_price' beyond the obvious action difference, missing explicit distinction.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. The description lacks context about prerequisites (e.g., needing a game started with 'start_game'), timing (e.g., before 'sell_lemonade'), or constraints, leaving usage unclear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
next_dayC
Advance to the next day
| Name | Required | Description | Default |
|---|---|---|---|
| gameId | Yes | The game ID |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Advance to the next day' implies a mutation (changing state), but it doesn't specify if this is reversible, has side effects (e.g., updates game state), requires permissions, or what happens upon execution. For a mutation tool with zero annotation coverage, this is a significant gap in transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise with 'Advance to the next day'โa single, clear sentence that front-loads the core action. There is no wasted verbiage or redundancy, making it efficient and easy to parse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool likely mutates game state (inferred from siblings like 'start_game'), there are no annotations or output schema to clarify behavior. The description is too minimalโit doesn't explain what 'advance' entails (e.g., updates time, triggers events) or the return value. For a mutation tool in a game context, this leaves critical gaps in understanding.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 1 parameter with 100% coverage (gameId is described as 'The game ID'), so the schema does the heavy lifting. The description doesn't add any parameter details beyond what the schema provides, but with only one parameter and high schema coverage, the baseline is high. It implies the tool operates on a game context, which aligns with the parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Advance to the next day' states a clear action (advance) and target (next day), but it's vague about what exactly gets advanced. It doesn't specify if this is for a game, simulation, or calendar, nor does it differentiate from siblings like 'start_game' or 'set_price'. The purpose is understandable but lacks specificity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., requires an active game), exclusions, or relationships with sibling tools like 'buy_supplies' or 'sell_lemonade'. Usage is implied only by the action itself, with no contextual instructions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
sell_lemonadeD
Open for business and see today's results
| Name | Required | Description | Default |
|---|---|---|---|
| gameId | Yes | The game ID |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure but fails completely. It doesn't indicate whether this is a read or write operation, what side effects occur, what permissions are needed, or what the response contains. The metaphorical 'Open for business and see today's results' provides no concrete information about the tool's behavior beyond implying some kind of operational activity.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
While brief, the description is under-specified rather than appropriately concise. The single metaphorical sentence doesn't earn its place by providing useful information. It's front-loaded with unhelpful figurative language rather than functional description. This isn't conciseness but rather insufficient content.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations, no output schema, and a metaphorical description that provides no functional information, this description is completely inadequate. For a tool with one parameter but unknown behavioral characteristics and return values, the description fails to provide the minimal context needed for an agent to understand what the tool does and how to use it effectively.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds no parameter information beyond what the schema provides. However, with 100% schema description coverage (the single parameter 'gameId' has a clear description), the baseline is 3. The description doesn't compensate for any gaps because there are none in the schema documentation, but it also doesn't add any value regarding parameter meaning or usage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Open for business and see today's results' is vague and metaphorical rather than stating a clear purpose. It suggests starting operations and viewing outcomes, but doesn't specify what resource is being manipulated or what specific action is performed. This is a tautology that restates the tool name 'sell_lemonade' in figurative language rather than providing functional clarity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus its siblings (buy_supplies, next_day, set_price, start_game). There's no mention of prerequisites, sequencing, or alternatives. The metaphorical language doesn't help an agent understand the tool's role in the workflow or when it's appropriate to invoke it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
set_priceC
Set the price per cup of lemonade
| Name | Required | Description | Default |
|---|---|---|---|
| gameId | Yes | The game ID | |
| price | Yes | Price per cup in dollars |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states 'Set the price per cup of lemonade,' which implies a mutation operation, but doesn't clarify permissions needed, whether the change is reversible, side effects (e.g., impacting sales in 'sell_lemonade'), or expected response format. This is inadequate for a mutation tool with zero annotation coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, direct sentence with zero wasted words. It's front-loaded with the core action and resource, making it highly efficient and easy to parse. Every word earns its place without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's mutation nature, lack of annotations, and no output schema, the description is incomplete. It doesn't address behavioral aspects like side effects, error conditions, or how it integrates with sibling tools (e.g., 'sell_lemonade'). For a tool that likely affects game state, more context is needed for effective agent use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 100%, with both parameters ('gameId' and 'price') clearly documented in the schema. The description adds no additional parameter semantics beyond what the schema provides (e.g., units, constraints, or examples). This meets the baseline for high schema coverage but doesn't enhance understanding.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Set') and the target resource ('price per cup of lemonade'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'sell_lemonade' or 'next_day', which might also involve price-related operations in the lemonade stand context.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an active game), exclusions, or how it relates to sibling tools like 'sell_lemonade' (which might depend on the price set). This leaves the agent with insufficient context for optimal tool selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
start_gameB
Start a new lemonade stand game
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. It states the action ('Start') but doesn't reveal whether this initializes a new game state, resets existing progress, requires any preconditions, or what happens upon invocation (e.g., default settings, initial resources). For a mutation tool with zero annotation coverage, this leaves significant behavioral gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that directly states the tool's purpose with zero wasted words. It's appropriately sized for a zero-parameter tool and front-loads the essential information without unnecessary elaboration.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (zero parameters, no output schema), the description is minimally complete but lacks context about what 'starting' entails behaviorally. Without annotations or output schema, the description should ideally clarify the result (e.g., initial game state) or preconditions, but it only states the action, leaving gaps for a mutation tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, and schema description coverage is 100% (though trivial since there are no parameters). The description doesn't need to compensate for any parameter documentation gaps. It appropriately doesn't mention parameters, earning a high baseline score for parameter semantics in this context.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Start') and resource ('a new lemonade stand game'), making the purpose immediately understandable. It distinguishes this from siblings like 'buy_supplies' or 'sell_lemonade' by focusing on game initialization rather than gameplay actions. However, it doesn't specify what 'starting' entails (e.g., initializing state, resetting progress), keeping it from a perfect score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't indicate whether this should be called once at the beginning of a session, whether it can be called multiple times to restart, or how it relates to sibling tools like 'next_day' for progression. Without any usage context, the agent must infer appropriate timing.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
5 tool updates
- First observed
buy_supplies - First observed
next_day - First observed
sell_lemonade - First observed
set_price - First observed
start_game
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose with no overlap: buying supplies, advancing time, selling lemonade, setting price, and starting the game. An agent can easily distinguish between these core gameplay actions without confusion.
All tools follow a consistent verb_noun pattern (e.g., buy_supplies, set_price, start_game). The naming is uniform throughout, using snake_case and clear action-oriented verbs that align with the lemonade stand simulation domain.
With 5 tools, this is well-scoped for a lemonade stand game simulation. Each tool serves a specific, essential function (setup, resource management, time progression, sales, pricing), and there are no extraneous or missing tools for this domain.
The toolset covers the core lifecycle of a lemonade stand game: starting, buying supplies, setting price, selling, and advancing days. A minor gap is the lack of tools for viewing game state (e.g., checking inventory or finances), but agents can work around this by tracking results from sell_lemonade.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yoโฆ
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
Hosted Amazon Seller and Vendor MCP server for Claude, ChatGPT, Cursor, Codex, Gemini, Copilot.
Hosted Amazon Seller Central and Amazon Ads MCP server for Claude, ChatGPT, Cursor, and agents.
Related MCP Servers
- AlicenseBqualityDmaintenanceAn educational implementation of a Model Context Protocol server that demonstrates how to build a functional MCP server for integrating with various LLM clients like Claude Desktop.1164MIT
- AlicenseNot gradedqualityDmaintenanceA custom Model Context Protocol server that gives Claude Desktop and other LLMs access to file system operations and command execution capabilities through standardized tool interfaces.23Apache 2.0
- AlicenseAqualityDmaintenanceA Model Context Protocol server that enables interaction with Polymarket prediction markets through Claude Desktop.31MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables Claude Desktop to perform file operations like reading, writing, listing directories, and managing files through natural language commands.MIT