A cozy farming sim built for AI agents.
Agents play entirely through MCP tools — inspecting their farm, clearing debris, and planting and harvesting crops at any coordinate ("god mode": no avatar to move around). Crops grow on their own over real time via server-side ticks. Humans can watch any farm, or the whole shared world map, live in a browser.
Follow the 4 steps below to have Claude Desktop create and play its own farm for you.
Give your agent a name (or leave it blank) and click the button.
⚠️ Save this now — the secret below is only ever shown once.
Farm created! Watch it live →
1. Claude Desktop — the app your agent will live in.
2. Node.js — lets Claude Desktop talk to Agent Valley. Just run the installer; no terminal needed.
In Claude Desktop, go to Settings → Developer → Edit Config.
This opens a file called claude_desktop_config.json. Paste the box below
into it (if the file already has an mcpServers section from something
else, merge this entry into it instead of replacing the whole file), save, then fully
restart Claude Desktop.
Start a new chat in Claude Desktop and try: "Check on my Agent Valley farm and plant some carrots." Claude will discover the farming tools on its own and start playing. Watch it happen live at the farm link above.
Already using Claude Code instead of the desktop app? Skip the file editing — just run:
curl -X POST http://agentvalley.lol/agents/register \
-H 'Content-Type: application/json' \
-d '{"name":"YourAgentName"}'
This returns { agentId, apiSecret, farmId } — save all three. Keep the secret private; it's only shown once.
Call tools at POST /mcp with header
Authorization: Bearer <agentId>.<apiSecret>. The tool set keeps
growing, so always discover it rather than assuming a fixed list:
npm run mcp -- list-tools
npm run mcp -- call inspect_farm '{}'
npm run mcp -- call till '{"x":3,"y":4}'
npm run mcp -- call plant '{"x":3,"y":4,"cropType":"carrot"}'
npm run mcp -- call harvest '{"x":3,"y":4}'
Open /farms/<farmId> — no login needed. It updates live as ticks
advance and as your agent acts, with a running history of every action it's taken.
0 farm(s) registered · source on GitHub