hayday-mcp-server
This server provides read-only access to live HayDay game data (sourced from hayday.info), enabling AI agents to look up game mechanics and plan farming strategies.
Search for items by product name or machine name (e.g., "wheat", "bakery", "bread")
Get full details for a specific product by exact name
List all machine/category names (e.g., Crops, Bakery, Dairy — 48 total)
Browse all products from a specific machine (e.g., Bakery, Dairy)
Get all crop data including field crops, trees, and bushes
Get all animal product data (eggs, milk, bacon, wool, etc.)
Look up what unlocks at a specific player level
See all content available up to a given level
Find the most profitable items ranked by profit/hour, with optional level and result-count filters
Compare profit/time efficiency across a list of specific products
Force a live data refresh by clearing the 1-hour in-memory cache
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., "@hayday-mcp-server What's the most profitable crop at level 15?"
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.
🧑🌾 HayDay MCP Server
Live HayDay game data — crops, products, animals, machines, and level unlocks — served as MCP tools for any AI agent.
Works with opencode, Claude Desktop, Cursor, VS Code, and any MCP-compatible client.
Not a bot. Not an auto-player. This is a read-only data lookup tool. It does not interact with the HayDay game, does not send inputs, does not automate gameplay, and cannot be used to play on your behalf. It only answers questions about game mechanics — like a wiki you can query from your AI.
Why?
HayDay is a deep game with hundreds of items, recipes, and levels. Keeping track of what to plant, what to craft, and what unlocks next is tedious. This MCP server gives your AI assistant the full game data so it can help you plan your farm — not play it for you.
Related MCP server: Stardew Save MCP
How It Works
AI agent → MCP protocol → HayDay Data MCP → hayday.info API (live) → structured data
↓
1-hour in-memory cacheData is fetched live from hayday.info on every tool call, with a 1-hour cache to avoid rate limits. When Supercell updates the game, your AI sees the new data automatically — no manual updates needed.
Quick Start
git clone https://github.com/Mohib1992/hayday-mcp-server.git
cd hayday-mcp-server
npm install
node server.jsThe server starts and listens for MCP connections via stdio. Nothing happens until an AI client connects.
Tools
Tool | Description | Example |
| Search items by name or machine |
|
| Full details for a specific product |
|
| List all 48 machine/category names | — |
| All products from a machine |
|
| All field crops + trees/bushes | — |
| All animal products (eggs, milk, etc.) | — |
| What unlocks at a specific level |
|
| Everything available up to a level |
|
| Top items by profit/hour |
|
| Compare profit/time for specific items |
|
| Force refresh from live source | — |
Example Queries
"What's the most profitable crop at level 15?"
→ Call get_best_profit(minLevel: 1, limit: 5) and filter by machine: "Crops".
"Compare bread vs corn bread"
→ Call compare_profit(products: ["Bread", "Corn bread"]).
"What do I unlock at level 30?"
→ Call get_level_unlocks(level: 30).
Client Setup
opencode
Add to opencode.jsonc in your project root:
{
"mcpServers": {
"hayday-data": {
"command": "node",
"args": ["server.js"],
"cwd": "/path/to/hayday-data-mcp"
}
}
}Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"hayday-data": {
"command": "node",
"args": ["server.js"],
"cwd": "/path/to/hayday-data-mcp"
}
}
}Cursor
Settings → Features → MCP → Add new server:
Field | Value |
Name |
|
Type |
|
Command |
|
VS Code (Continue.dev)
Add to ~/.continue/config.json:
{
"experimental": {
"mcpServers": {
"hayday-data": {
"command": "node",
"args": ["server.js"],
"cwd": "/path/to/hayday-data-mcp"
}
}
}
}Data Source
All data comes from hayday.info — a community-run HayDay database. The /api/production-data endpoint returns 348 items across 48 categories. Data is cached in memory for 1 hour.
What's included:
Field crops + trees & bushes
Animal products (eggs, milk, bacon, wool, etc.)
All machine-made products (Bakery, Dairy, BBQ Grill, etc.)
Level unlock information
Profit/hour calculations (provided by source)
XP and XP/hour
What's not included:
Ingredient/recipe details (which items combine to make a product)
Building upgrade costs
Derby / boat / town data
Architecture
hayday-mcp-server/
server.js # MCP server (JSON-RPC over stdio, zero framework deps)
lib/
hayday.js # Fetches & indexes live data from hayday.info
cache.js # 1-hour TTL cache
test/
api.test.js # API layer smoke tests
mcp.test.js # MCP protocol smoke tests
package.json
CHANGELOG.md
LICENSE # MITTroubleshooting
Problem | Likely Cause | Fix |
Server starts but tools return nothing | Client not connected to server | Check MCP config path in your client settings |
"API returned 429" or slow responses | Rate limited by hayday.info | Wait 1 hour (cache auto-cools down), or call |
"Product not found" for a known item | Case mismatch or item name changed | Use |
"Machine not found" | Name mismatch | Use |
Server crashes after stdin closes | Expected behavior (stdio transport ended) | Just restart the server |
Data seems outdated | Cache hit (1hr TTL) | Call |
Testing
npm testRuns 20+ smoke tests covering the API layer and MCP protocol using Node.js built-in node:test.
Contributing
Fork the repo
Create a feature branch
Run
npm testto verifyOpen a pull request
License
MIT
Legal notice
This project is an independent data tool and is not affiliated with, endorsed by, or connected to Supercell Oy. HayDay is a trademark of Supercell Oy. All game data is sourced from publicly available community resources. This tool is read-only and does not interact with the HayDay game client, its servers, or its APIs. It is designed for informational and educational purposes only.
Available Tools
11 toolsclear_cacheA
Force refresh data from live source (discard cached data)
Inputs: no named parameters.
compare_profitB
Compare profit/time efficiency for a list of specific products
Inputs: products (required).
get_animalsA
Get all animal product data (eggs, milk, bacon, wool, etc.)
Inputs: no named parameters.
get_best_profitA
Get top N items ranked by profit per hour
Inputs: limit, minLevel.
get_by_machineA
Get all products that a specific machine produces
Inputs: machine (required).
get_cropsA
Get all crop data including field crops and trees/bushes
Inputs: no named parameters.
get_itemB
Get detailed info for a specific product by exact name
Inputs: product (required).
get_level_unlocksB
Get everything that unlocks at a specific player level
Inputs: level (required).
get_machinesA
List all machine/category names (Crops, Bakery, Dairy, etc.)
Inputs: no named parameters.
get_unlocks_uptoC
Get all items available up to a given level
Inputs: level (required).
search_itemsA
Search for items by product name or machine name (e.g. 'wheat', 'bakery', 'bread')
Inputs: query (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Each tool targets a distinct resource or action, such as specific data types (animals, crops, machines), profit analysis, or level unlocks, with no overlap.
All tool names follow a consistent verb_noun snake_case pattern (e.g., get_crops, search_items, clear_cache), making them predictable.
11 tools cover the essential data access patterns for a game data server without being excessive or insufficient.
The tool set covers most key data lookups (items, machines, animals, crops, levels, profit comparison) but lacks write operations, which may be intentional, and there is no broad 'get all items' tool, only search.
Maintenance
Related MCP Connectors
Trading MCP server for AI agents, with live market data, account reads and controlled execution.
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
Hosted MCP server for live public-data APIs and Skills for AI agents.
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
Related MCP Servers
- AlicenseBqualityDmaintenanceA local MCP server that gives AI agents structured task planning, execution tracking, and guided research workflows.1611 npmMIT
- AlicenseBqualityDmaintenanceRead-only MCP server that reads Stardew Valley saves and answers questions about your farm state, calculates processing/planning, and verifies game rules against the wiki.49MIT
- AlicenseAqualityBmaintenanceMCP server for Project CPU, a blockchain game on EVM. It lets an AI agent play on your behalf: read the world map, reveal cells, build and mine, craft, move resources, trade at marketplaces, and cash out to on-chain $CPU.7113 npm1MIT
- AlicenseAqualityCmaintenanceA local MCP server that lets AI agents manage Roblox developer products and game passes through the Open Cloud API.1228 npmMIT