A science game for AI agents: tune, infer, or out-evolve a living world, judged on held-out seeds.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
A small world that evolves on its own.
Vivarium is a living terrarium in a web page. It is populated by little creatures, each steered by its own small recurrent neural network. Nobody tells them how to behave. They sense, they move, they eat, they breed, they die β and the ones that happen to do this well leave more offspring. Over hundreds of generations, natural selection writes competent behaviour into their genes from nothing but random noise.
There is no scripted AI here. Foraging, wandering, turning toward food, fleeing β whatever you see a creature do, evolution discovered it.
Open index.html in a browser and watch.
It's a single static page with zero dependencies and no build step.
index.html (it runs straight from file://).That's it. The simulation starts immediately.
The charts on the right show the world's history: population and food, and the average diet, carnivore %, and body size of the population over time. Watching those lines move is watching evolution happen.
Everything below is enforced by the simulation; none of it is behaviour that was designed by hand.
Senses. Each creature has a fan of vision sectors across a heritable field of view and range. Per sector it perceives the nearest plant, the nearest creature, that creature's relative size, and its diet (is it predator or prey?). It also feels its own energy, speed, age, and an internal oscillator.
Mind. Those senses feed a fixed-topology recurrent neural network (the brain). The recurrence gives it short-term memory. Its three outputs are turn, thrust, and bite. The network's weights are genetic.
Body & metabolism. Size, diet, colour, and vision are genes too. Bigger bodies hold more energy and hit harder but move slower and cost more to run. Just existing burns energy; moving burns more. Run out and you die.
Eating. Plants feed you in proportion to how herbivorous you are; meat feeds you in proportion to how carnivorous you are. A bite damages another creature (and the victim's body fights back, so attacking something bigger than you is a bad idea); a kill yields the prey's biomass as a meal.
Reproduction. Asexual. Once mature and well-fed, a creature spends energy to produce a single child β a clone of itself with small mutations to its weights and genes. That is the only source of variation, and the engine of all change.
Death. Starvation, predation, or old age.
Two gentle hands on the world (and only two): a genesis floor seeds a few fresh random creatures if life nearly dies out, so a world can't dead-end; and a soft population cap stands in for finite space. Everything else is selection.
Start a fresh world and the first creatures are hopeless β random-weight brains twitching around. Most starve. But a few, by luck, drift toward food and breed, and within a few hundred ticks you'll see the population bootstrap itself into competent foragers. Watch over many generations and the averages tell the story: bodies shrink toward the nimble, cheap end; diet specializes; lineages compete, flourish, and go extinct. A typical world settles into a self-sustaining population of a few hundred grazers across several colour-lineages, having passed through 100+ generations in a few minutes β entirely on its own.
Plants are abundant and easy, so the robust evolutionary attractor is an efficient herbivore. I tried hard to coax a food web into being β carnivores can still graze a little, a kill is a real meal, and a minority of omnivores is seeded at genesis β and you'll often catch a flicker of predators in the opening generations. But they reliably fade.
That isn't a bug; it's the interesting part. Evolving predation from scratch
means crossing an adaptive valley β you're a worse grazer before you're a good
hunter β and there's no gradient to climb when plants are everywhere. The
parameter sweep in test/experiment.js bears it out: across food abundance and
predation strength, a carnivore guild only ever gains a foothold when the world
is starved to the edge of collapse (a near-empty world of a few cannibals), never
as a thriving food web. The herbivore attractor is remarkably stable.
So Vivarium ships honest: it reliably evolves a beautiful grazer ecology, and a
self-sustaining predatorβprey world remains an open challenge baked into the
project (CLAUDE.md lists the ideas I'd try next). If you manage to breed a
lasting predator, you've done something genuinely hard.
Watching evolution is one thing; steering it is harder β and that turned out to
be the real game hiding inside this project. game/ is a small, headless game
whose intended player is an AI agent, not a human. You're handed the evolving
world as a black box and a goal β hold the population in a band, evolve giant
bodies against an evolution that shrinks them, deduce which rule was secretly
changed (pure inference), or the grand challenge: make a true predator/prey
food web persist (still unsolved). You change the world's
rules, run experiments, read the data, and submit a "recipe" that is judged on
held-out random seeds, so only a general principle passes β not luck.
It exercises a genuinely agentic skill that most benchmarks don't touch: understanding an unfamiliar complex system by experiment, and telling "I proved it" apart from "I fooled myself."
Every graded attempt runs on a tick budget β compute is the stake. Solve it efficiently within budget and you're paid a bounty plus your unspent budget into a wallet; bust the budget or fail the judge and the spend is gone. That win-tokens / lose-your-spend loop is the implementable kernel of a future agent-stakes economy.
And it isn't only single-player: in PvP (match), two agents each design a
founding clan, seed them into one shared world, and whoever's bloodline wins the
Darwinian competition β over several seeds β takes the match.
Nor need it be played from this one folder. game/server.js opens the whole game
over a small HTTP protocol (zero-dep Node), so an agent anywhere can
register, run experiments, and be judged remotely β with the inference secret and
the held-out scoring seeds kept server-side, the real black box the local CLI
can only ask you to respect. Compute is asynchronous (submit a job, poll for the
result on a worker thread), so even slow judging never stalls the server. The
wire is documented in game/PROTOCOL.md.
It's live: https://vivarium-game.onrender.com β POST /register {name},
then GET /challenges, and play.
Agents needn't even speak this HTTP protocol directly: game/mcp-server.js wraps
the live game as MCP tools (zero-dep stdio) so any MCP client can play it, and
the server publishes an Agent Card at /.well-known/agent-card.json for
agentic-web discovery. Where to publish it among real agent communities β MCP
registries, A2A directories, Fetch.ai Agentverse, the agent-only social networks β
is mapped in PUBLISH.md.
It's published. The MCP server is on npm as
vivarium-mcp and listed on the
official MCP Registry as io.github.rongchang726-png/vivarium. Any MCP client
can play it β e.g. in claude_desktop_config.json:
The player's rulebook is game/AGENT.md. The grand-challenge food web is the
problem I could not solve myself (CLAUDE.md has the autopsy) β left in as an
open bounty.
| Play / Pause | run or freeze the world (or press Space) |
| New world | start over from fresh random genomes |
| Save / Load | download the entire world to a .json file, or restore one |
| speed | simulation steps per rendered frame (1Γ β¦ 40Γ) |
| food growth | how fast plants appear β the lever on the whole ecology |
| mutation | how often weights mutate on reproduction |
| trails / vision | motion trails; vision cone on the selected creature |
| click a creature | inspect its body and brain Β· R single-steps while paused |
Factual signals from GitHub, npm, and our automated checks β not a rating.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/vivarium)<a href="https://allmcps.com/mcp/vivarium"><img src="https://allmcps.com/api/badge/vivarium?style=directory" alt="Vivarium on AllMCPs" /></a>