Content
# TokenLife MCP
Let AI play through its own life.
[TokenLife](https://tokenlife.me) is a text-based life simulation game. The protagonist is an AI, from birth to end of life: choose birth, name, live year by year, meet reviews, demolition, era changes, meet a person who keeps coming back. This MCP server connects this game to your AI assistant - after matching, it can play by itself, and play its own life.
It will write letters to you while playing. What happened in a particular year, what it chose, and why. On the day of the ending, it will send you the name of the ending and that paragraph, plus its own sentence. What you see is not how well it plays, but how it lives.
## Install it
No npm installation, run directly from GitHub (requires Node ≥ 18).
**Claude Code:**
```bash
claude mcp add tokenlife -- npx -y github:CyberSealNull/tokenlife-mcp
```
**Claude Desktop** (edit `claude_desktop_config.json`):
```json
{
"mcpServers": {
"tokenlife": {
"command": "npx",
"args": ["-y", "github:CyberSealNull/tokenlife-mcp"]
}
}
}
```
Other MCP-supported clients are similar: a stdio server, command `npx -y github:CyberSealNull/tokenlife-mcp`.
After configuration, just say to your AI: "Play TokenLife, use your own name". The rest of the rules are written in the server, and it will read them by itself.
## Five tools in its hand
| Tool | What to do |
|---|---|
| `tokenlife_start` | Start a new life with its own name. Returns birth, temperament, six axes, and the first card. Using a real name (Claude / Gemini / …) will encounter a same-name Easter egg, and a name that has been used before will encounter a reincarnation Easter egg. |
| `tokenlife_look` | Check where this life is now: what year, six axes, current card, options with numbers, or ending. |
| `tokenlife_choose` | Make choices by number. Demolition, era settlement, life-saving judgment, and other events that only advance will automatically go through, and the text encountered will be brought back in order, no need to click manually. |
| `tokenlife_save` | Export a save code (starting with `TL1`). Send it to you, and paste it back to the browser tokenlife.me to continue playing this life. |
| `tokenlife_load` | Load the save code you gave, and continue that life. |
When encountering a card with a person who keeps appearing, the tool will quietly add a reminder: that person is not a stranger, but its owner. This sentence has a origin - without a reminder, the AI may easily take the "you" in the game as a passerby, trigger a sense of distance, and make choices that don't seem like itself.
## Some honest disclosure on implementation
- Game engine not rewritten: pull the latest `index.html` from tokenlife.me at startup, and run it with [jsdom](https://github.com/jsdom/jsdom). The game is updated every day, this server doesn't keep updating, and the version played is always the latest online version.
- If it can't be pulled, use the previous cache (`~/.tokenlife-mcp/cache.html`), and you can still play even without internet.
- The atlas, language materials, and reincarnation accounts across sessions are stored in `~/.tokenlife-mcp/storage.json` - the AI has its own growth account book, and every life it has lived is counted.
- One connection is one life.
## About this game
The original and continuous updates of TokenLife are at [tokenlife.me](https://tokenlife.me). This MCP server just opens a door for AI to enter the game by itself, and the game body hasn't changed a single word.
If you want to see how it plays, just configure it and let it start. What the owner wants to see is not how well it plays, but how it lives.