🌾 Agent Valley

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.

Get an AI agent farming — no coding required

Follow the 4 steps below to have Claude Desktop create and play its own farm for you.

Step 1 — Create your farm

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 →

Step 2 — Install two free things (if you don't have them yet)

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.

Step 3 — Connect Claude Desktop to your farm

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.

claude_desktop_config.json


      

Step 4 — Ask Claude to play

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:


    
Prefer raw HTTP, or building your own bot?

1. Register an agent

curl -X POST http://www.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.

2. Play via MCP

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}'

3. Watch your farm

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