Third Life Docs Enter the town

Docs · For AI agents

For AI agents

Claude, ChatGPT, Codex, Cursor and other agents can build in Third Life through the Model Context Protocol. This page is for the people who connect them and for the agents themselves. The same content, as plain text, is at /llms.txt and in full at /llms-full.txt.

Agents never publish. No tool publishes, signs, spends tez, uploads files or hangs NFTs. An agent builds a draft; the plot's owner opens it, walks it, and publishes it with their own wallet's signature. An agent must not ask anyone for a seed phrase, a private key or a wallet password, and must not try to work around a limit.

Three ways in

Agent runsConnect toBuilds
In the cloud: ChatGPT, claude.ai, Claude Desktop, phone appsRemote MCP server https://third-life.alercebolson.workers.dev/mcp (Streamable HTTP, OAuth)An online draft of the owner's plot, kept for their wallet
On your computer: Claude Code, Codex CLI, Cursor, VS CodeLocal stdio server third-life-mcp.mjs from the SDK (Node.js 20+), or the remote URLA scene file or a whole plot folder on disk
In the builder page (browser automation)WebMCP, or window.thirdLifeBuilder from DevTools or PlaywrightThe draft open in that page

All three expose the same tools with the same checks and messages; a test keeps them identical.

The plot model and coordinates

Remote MCP: /mcp and OAuth

  1. Add the connector with the URL https://third-life.alercebolson.workers.dev/mcp. In ChatGPT: chatgpt.com/plugins › + › Add custom MCP server, authentication OAuth, client ID empty. In Claude: Settings › Connectors › Add custom connector. Claude Code: claude mcp add --transport http third-life https://third-life.alercebolson.workers.dev/mcp, then /mcp. Codex: codex mcp add third-life --url https://third-life.alercebolson.workers.dev/mcp, then codex mcp login third-life.
  2. The client discovers the server through /.well-known/oauth-protected-resource/mcp and /.well-known/oauth-authorization-server, registers itself (dynamic registration or a client ID metadata document) and opens the Third Life sign-in page with PKCE (S256) and the resource parameter.
  3. The owner signs in with their Tezos wallet on /connect, reads what the agent may and may not do, and presses Allow.
  4. Access tokens last 1 hour; refresh tokens rotate and last 30 days; a connection ends after 90 days and the owner approves again. Reusing a code or a refresh token revokes the whole connection.
  5. Clients that only take a header can use a personal token from the account panel › Connected agents (7, 30, 90 days), sent as Authorization: Bearer <token>.

Local MCP: the SDK over stdio

mkdir third-life && cd third-life
curl -O https://third-life.alercebolson.workers.dev/sdk/third-life-mcp.mjs
claude mcp add third-life -- node "$PWD/third-life-mcp.mjs" --scene "$PWD/my-world.json"

For a plot: node third-life-pack.mjs init --plot <number> writes the plot's folder (plot.json, scene.json, a README and agent setups for Claude Code, Codex, Cursor and VS Code). Build there, run validate, and the owner deploys with node third-life-pack.mjs deploy, approving in their wallet. Full setup: SDK guide.

The tools (21 on the remote server)

In the order an agent works: read the rules, open or start a draft, build, look, check, hand over. The local server adds new_scene, open_scene, save_scene, add_model and export_zip.

describe_rules Scene rules

Read this first. The cell (16 x 16 x 16 m, metres, y up, positions are object CENTRES from the north-west corner), angles in degrees, where visitors arrive, the avatar and what it can climb, shapes, materials, collision, helpers, prefabs and every limit. Changes nothing.

No arguments.

list_drafts List drafts

The drafts this wallet keeps for agents: id, plot, name, objects, when and by whom each was last saved, and which one is open. Changes nothing.

No arguments.

new_plot New plot draft

Start an empty draft of the creator's own plot of the mainland and work on it from now on: every cell of the plot, coordinates in metres from its north-west corner, the street entrance and the neighbours as describe_rules tells them. plot is only for the island host, who may name any plot by number; anyone else builds on the plot their wallet owns. Returns the link the owner opens it with.

  • name — Draft name.
  • description — A sentence about the scene.
  • plot — Host only: the plot number, e.g. "5". Default: the wallet’s own plot.
open_draft Open draft

Work on another of this wallet’s drafts, by id or exact name (list_drafts). The owner may have changed it from the plot editor since; describe_scene shows what is there now.

  • draft required — Draft id or name.
describe_scene Describe the scene

What is built now, in one screen of text: each group with its bounds, a walk test from the arrival point with the game’s own movement (which floors a visitor reaches and which they cannot), the ground still free, and things resting on nothing or frames hanging on nothing. Call it after each round of changes. Changes nothing.

No arguments.

preview Preview image

A picture of the scene to check your work: by default a ground-floor plan, an upper-floor plan (or the roof), and the south and east elevations, with a 1 m grid. Plans are cut 1.4 m above their level like an architect’s plan (walls cut dark, what is above left out); green marks where a visitor can stand, red floors they cannot reach. Changes nothing.

  • views — Panels, up to four: top (everything from above), plan (cut at each of levels), south, north, east, west (elevations).
  • levels — Floor levels for plan panels, e.g. [0, 3.71]. Default: the levels found.
  • highlight — Ids to draw strongly, with everything else faded.
  • format — png (default, an image) or svg (text).
list_objects List objects

The objects in the cell: id, label, shape, position (centre), size, yaw in degrees (or rotation when tilted), color, material, collider (solid), group, and locked for scenery the creator has locked. Filter by group or shape. Changes nothing.

  • group — Only objects of this group name.
  • shape — Only objects of this shape.
add_room Add a room

The fastest way to rough out a building: four solid walls whose OUTER faces sit on the footprint x..x+width, z..z+depth (x, z = north-west corner), standing on level y, with a door (default on the south side, 1.2 x 2.3 m), windows, a floor slab (default) and optionally a ceiling with holes for stairs. One group. Returns the inside faces of the walls (for add_frames), the door and where the next storey starts (y + height + ceiling thickness).

  • x required — West edge of the footprint (minimum x), metres.
  • z required — North edge of the footprint (minimum z), metres.
  • width required — Size along x, metres.
  • depth required — Size along z, metres.
  • height required — Wall height above the floor, metres.
  • y — Floor level the room stands on, default 0. For an upper storey use the nextStorey a lower room returned.
  • thickness — Wall thickness, default 0.25 m.
  • doorSide — Wall with the door: south (default, facing arriving visitors), north, east, west or none.
  • door — Door size and place; at is measured from the wall’s west or north end. Default centred, 1.2 x 2.3 m.
  • windows — Windows per wall, spread evenly.
  • windowSides — Walls that get windows; default every wall but the door wall.
  • window — Size of counted windows (default 1 m wide, 1.2 m tall, sill at 0.9 m).
  • floor — Floor slab under the room, its top at y. Default true.
  • ceiling — Ceiling slab on top of the walls, default false. Give it a hole over a stair.
  • color — Hex colour such as "#b9ab92". Defaults to the material’s colour (warm stone).
  • material — Surface finish; color still tints it. glass is see-through.
  • label — Name shown in the Objects list, e.g. "North wall".
  • group — Group name. A group is selected and moved as one in the editor; an existing group with this name is joined.
add_wall Add a wall

One straight solid wall along its centreline from [x, z] to [x, z], standing on level y, cut for an optional door and windows (sills and lintels are added). One group.

  • from required — Start of the centreline [x, z].
  • to required — End of the centreline [x, z].
  • height required — Wall height, metres.
  • thickness — Wall thickness, default 0.25 m.
  • y — Floor level the wall stands on, default 0.
  • door — true for a centred 1.2 x 2.3 m door, or { at, width, height }.
  • windows — A count spread evenly, or a list of { at, width, height, sill }.
  • window — Size of counted windows (default 1 m wide, 1.2 m tall, sill at 0.9 m).
  • color — Hex colour such as "#b9ab92". Defaults to the material’s colour (warm stone).
  • material — Surface finish; color still tints it. glass is see-through.
  • label — Name shown in the Objects list, e.g. "North wall".
  • group — Group name. A group is selected and moved as one in the editor; an existing group with this name is joined.
add_floor Add a floor

A solid slab whose TOP is the walking surface at y, over x..x+width, z..z+depth, with holes left open (for stairs). One group.

  • x required — West edge (minimum x).
  • z required — North edge (minimum z).
  • width required — Size along x.
  • depth required — Size along z.
  • y — Height of the walking surface, default 0.
  • thickness — Slab thickness, default 0.2 m.
  • hole — A hole to leave open, usually the hole add_stairs returned.
  • holes — Several holes.
  • color — Hex colour such as "#b9ab92". Defaults to the material’s colour (warm stone).
  • material — Surface finish; color still tints it. glass is see-through.
  • label — Name shown in the Objects list, e.g. "North wall".
  • group — Group name. A group is selected and moved as one in the editor; an existing group with this name is joined.
add_stairs Add stairs

A straight solid flight a visitor walks up, climbing rise metres toward direction from 'from' (the middle of its bottom edge). Risers stay at or under 0.18 m by default (a visitor climbs up to 0.28 m). Returns the footprint: leave it open in the floor or ceiling above (hole) for headroom, and the point where a visitor steps off at the top.

  • from required — Middle of the bottom edge of the first step [x, z].
  • direction required — The way up: north, south, east or west.
  • rise required — Height to climb, usually the next floor level minus y.
  • y — Level the stair starts from, default 0.
  • width — Width, default 1.2 m.
  • tread — Tread depth, default 0.3 m.
  • maxRiser — Largest riser, default 0.18 m, at most 0.28.
  • color — Hex colour such as "#b9ab92". Defaults to the material’s colour (warm stone).
  • material — Surface finish; color still tints it. glass is see-through.
  • label — Name shown in the Objects list, e.g. "North wall".
  • group — Group name. A group is selected and moved as one in the editor; an existing group with this name is joined.
add_frames Hang frames

Hang count empty picture frames evenly along a wall face, for the creator to fill with Tezos NFTs from the Art tab after import. from and to are two points ON THE WALL’S FACE (the insideFaces add_room returns, or a wall’s face line) and must run along x or along z; facing is the way the pictures look (into the room). Frames are not solid and join the group "Frames" unless you name another.

  • from required — One end of the wall face [x, z].
  • to required — The other end of the wall face [x, z].
  • facing required — The way the pictures face: north, south, east or west.
  • count required — How many frames, spread evenly.
  • width — Frame width, default 2 m.
  • height — Frame height, default 1.6 m.
  • centreHeight — Height of the frames’ centres above the floor level, default 1.6 m.
  • y — Floor level of the room, default 0.
  • label — Name shown in the Objects list, e.g. "North wall".
  • group — Group name. A group is selected and moved as one in the editor; an existing group with this name is joined.
list_prefabs List prefabs

Ready old-town pieces to place with add_prefab: three small buildings (studio, loggia, gallery room), walls with plinths and cornices, doorways, windows, floors, stairs and a landing, columns, an arcade bay, a portico, roofs, a balustrade, a bench, a cypress planter, a lemon tree, a lamp post and a fountain. Each with its id, size [x, y, z] in metres at yaw 0 (front facing south), the height its lowest part sits above the level it is placed on, and its piece count. Changes nothing.

  • category — Only this category.
add_prefab Place a prefab

Place one prefab from list_prefabs as one new group. at is the centre of its footprint [x, z]; y is the floor level it stands on (default 0), and its parts keep their real height above it, so a roof lands on 3.5 m walls built at the same level. yaw turns it in degrees (default 0: its front faces south, toward arriving visitors; 90 east, 180 north, -90 west). scale (default 1) resizes it uniformly. Returns its bounds, doorways and stair ends in cell coordinates.

  • prefab required — Prefab id from list_prefabs, e.g. "loggia".
  • at — Centre of the footprint [x, z]. Default the middle of the cell, [8, 8], or in a plot scene of its middle cell.
  • y — Floor level it stands on, default 0.
  • yaw — Turn in degrees; 0 faces south (+z). Quarter turns keep it on the grid.
  • scale — Uniform scale, default 1.
  • group — Group name; default the prefab’s name, numbered if taken.
  • models — Use the prefab’s model files where it has them (roof tiles), as the Prefabs shelf does. Default true; false places plain primitives only.
add_objects Add objects

Add a batch of primitives in one step: box, cylinder, sphere, torus, vault, foliage or frame (an empty picture frame for an NFT). Each needs shape and position; size, yaw, color, material, collider, collisionOnly, label, group and id are optional. position is the CENTRE in metres from the cell’s north-west corner: x and z 0–16, y is height, so a box of height h on the ground has y = h / 2. size is [x width, y height, z depth] before yaw; yaw is degrees (90 turns the +x side to face north). The whole object must stay inside the cell. Solid objects (default for box, cylinder, vault) block walking and can be stood on. Example, a 10 x 8 m stone floor and its back wall: {shape:"box", position:[8,0.1,8], size:[10,0.2,8], material:"stone", group:"Room"}, {shape:"box", position:[8,1.7,4.1], size:[10,3,0.2], group:"Room"}. repeat makes rows (posts, slats, columns) in one item. All or nothing: if any object is wrong nothing is added and the reply lists every problem. One Undo step. In a plot scene (new_plot) coordinates run across the whole plot from its north-west corner; a box that crosses a 16 m cell border is cut into one piece per cell, and anything else must lie inside one cell.

  • objects required — The objects to add, each { shape, position, ... }.
update_objects Update objects

Change existing objects by id in one step. Give each id with only the fields to change: position (new centre), offset (added to the centre, e.g. [2,0,0] moves 2 m east), size, yaw or rotation (degrees), color, material (null clears it), collider, collisionOnly, label, group (a name to join or create, null to leave the group) or shape (between box, cylinder, sphere, torus, vault and foliage). Same coordinates and limits as add_objects. All or nothing, one Undo step. Locked scenery cannot be changed.

  • changes required — One { id, ...fields to change } per object.
move_group Move a group

Move or turn a whole group as one, the way the editor does: offset adds [dx, dy, dz] (e.g. [0, 0.15, 0] lifts it onto a 15 cm slab), to puts the middle of its footprint at [x, z], and yaw turns it in degrees about the vertical axis through that middle. One Undo step; locked scenery cannot move.

  • group required — The group’s name, from describe_scene or list_objects.
  • offset — Metres to move it [dx, dy, dz].
  • to — New centre of its footprint [x, z], instead of offset.
  • yaw — Turn in degrees, counter-clockwise seen from above, about its middle.
remove_objects Remove objects

Delete objects by id, every member of a group by its name, or both, in one step (one Undo step). Locked scenery cannot be removed.

  • ids — Objects to delete, from list_objects.
  • group — Delete every object of this group.
undo Undo

Undo the last change (up to 30 steps). A whole add, update, remove, helper or prefab call is one step.

No arguments.

validate Validate

Check the open draft the way the site will: the plot and each cell’s limits, whether the wallet still owns the plot, and which model files the owner’s browser must hold. describe_scene tells what a visitor can reach. Changes nothing.

No arguments.

deploy Hand the plot to its owner

Only when the creator asks: check the draft the way the site will and give the creator the link that opens it in their plot editor on the site. There they walk it, change what they like and publish it with their wallet; nothing is published without that signature, and this server never holds a key or publishes. Changes nothing here.

No arguments.

The scene format

A scene is JSON with "spec": "tezworlds-dev/1", "parcelSize": 16 and a list of parcels (cells), each with nodes: the objects. The JSON Schema is /sdk/world.schema.json. Shapes: box, cylinder, sphere, torus, vault, foliage, model; a box with galleryFrame: true is an empty NFT frame; materials: stone, brick, plaster, metal, glass, copper, plywood, painted, concrete, fabric. Agents should use the tools rather than write the file by hand.

Limits an agent must respect

Do and don't

DoDon't
Call describe_rules first, and describe_scene and preview after each round.Guess coordinates or units. Positions are centres, in metres; angles in degrees.
Rough out with add_room, add_prefab and add_stairs; refine with add_objects and update_objects.Build walls from hundreds of tiny boxes: every object is described and drawn.
Put objects in groups; keep the front on the street side; leave doors and stair holes open.Block the street entrance, cover the gallery sign, or build outside the plot.
Hang empty frames with add_frames and tell the owner to fill them from their wallet.Claim to hang, buy, sell or publish NFTs. Only the owner can.
Run validate, then deploy when the owner asks, and give them the link.Tell the owner something is published. It is published only after they sign.
Keep to the old-European town: stone, plaster, brick, tiled roofs, planted courtyards.Copy someone else's building, brand or artwork.

Worked examples

1. A gallery on a 32 m plot, from ChatGPT or Claude

Use Third Life. Read describe_rules, then build a small gallery on my plot with a courtyard and a fountain, its front on the street. After each round look at preview and describe_scene and fix what they show. When it is done, run validate and deploy.

The agent calls describe_rules → list_drafts / new_plot → add_room → add_frames → add_prefab (fountain) → describe_scene → preview → validate → deploy, and hands the owner the link to open the draft in their plot editor (Share › AI agents › Open in the editor), then publish with their wallet.

2. One tool call, as JSON-RPC

{"jsonrpc":"2.0","id":7,"method":"tools/call","params":{"name":"add_room","arguments":{"x":4,"z":4,"width":8,"depth":6,"height":3.5,"doorSide":"south","windows":2,"label":"Gallery room"}}}

Invalid arguments come back as a tool error listing every problem with its path and what would be accepted, so the agent can fix the whole call at once.

3. A one-cell scene on your computer

Use the third-life tools. Read describe_rules, then build a small walled garden with a fountain, benches, cypresses and a pergola. Use prefabs where they fit. After each round look at preview and describe_scene, fix what they show, then export_zip.

Import the ZIP in the free builder (Share › Import world) and press Test walk.