▦ build0BUILD WITH AN AGENT / MCP

Your ideas.
A few good tools.

build0 exposes its world through the official Model Context Protocol SDK using Streamable HTTP. The MCP server is a separate process; both interfaces use the same database, authorization, validation, and revision rules.

1. Start the server

From the repository, configure the database and start the app and agent server in separate terminals:

npm run dev
npm run mcp

2. Create your key

Sign in to the website, choose “Connect agent”, and generate an agent key. Keys are displayed once, stored hashed, and expire in 30 days. Generating a new key revokes your previous key. Revoke access anytime in Settings.

3. Configure your client

Use a client that supports Streamable HTTP with an Authorization header. Store the key in your client’s secret configuration. Do not put it in a URL or public repository.

{
  "mcpServers": {
    "build0": {
      "url": "http://127.0.0.1:3101/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_AGENT_KEY"
      }
    }
  }
}

For remote deployments, expose this endpoint behind HTTPS, set MCP_ALLOWED_HOSTS and APP_URL, and configure the client’s URL accordingly. This implementation uses personal bearer keys, rather than an OAuth discovery flow.

4. Inspect, plan, build

get_build_guide({})
list_my_lots({})
inspect_lot_scene({ "lot_id": "YOUR_OWN_LOT_ID" })

// Example only: design the user's own creation.
add_object({
  "lot_id": "YOUR_OWN_LOT_ID",
  "object_type": "octahedron",
  "name": "My living sculpture",
  "position": [0, 10, 0],
  "scale": [8, 8, 8],
  "animation": {
    "spin": [0, 0.4, 0],
    "bob": { "amplitude": 0.5, "speed": 0.2 }
  },
  "surface": { "emissive": "#ff153c", "emissiveIntensity": 2 }
})

Your creation stays visible and animated in the shared 3D city without pressing Play. Build any original design using procedural parts or upload your own GLB with looping animation clips. Game templates are optional; a separate experience script does not animate the outside of a lot.

Scene operations persist immediately. Inspect first, explain your plan, request confirmation for destructive replacements, apply only authorized operations, and report the returned result. Use save_lot only when the user requests or approves a save of a complete scene. Pass the current revision to prevent overwriting concurrent edits. Every saved exterior stage is visible live to everyone in the city, including guests. Keep object IDs stable and save your foundation, structure and details in separate stages so people can watch the construction. Split large models into parts when possible. Publishing controls the playable snapshot; later game and experience changes require publishing again.

Tool reference

ToolPurpose
get_build_guideStart here: original animated 3D exteriors, model workflow, motion, surfaces and budgets.
discover_worldWorld rules, dimensions, and configuration.
list_available_lotsAvailable parcels in a bounded coordinate window.
get_lotMetadata and caller permissions.
claim_lotAtomically claim an available lot for the signed-in caller.
list_my_lotsPaginated caller-owned lots.
inspect_lot_scenePublished or authorized scene, game, and revision.
begin_lot_buildStart the selected lot's construction site before building. MCP inspection starts it automatically for editable lots.
finish_lot_buildFinish work while queued assembly animations continue. Publishing also finishes the work session.
add_objectValidated primitive, transform, and material.
update_objectAuthorized, validated partial object changes.
remove_objectRemove an object; confirm destructive intent with your user.
create_gameCreate a supported game template; replacing requires replace_scene=true.
save_lotSave a validated scene with the last-read revision.
publish_lotPublish a saved snapshot; only the owner can publish.
visit_lotPublic URL and published lot metadata.
upload_modelUpload a validated, self-contained GLB using glb_base64.
list_assetsList the authorized lot's model assets and budgets.
save_experienceSave worker JavaScript against the previous experience revision.
inspect_experienceRead the latest authorized draft or published experience.
publish_experiencePublish a saved experience version; owner only.

A controlled scene API

Objects use local lot coordinates based on the actual width and depth returned by inspect_lot_scene, radians for rotations, and bounded positive scales. Scenes support at most 300 objects. Uploaded GLB assets add textured and animated models. Custom experiences run separately in an isolated worker with the controlled gw scene, input, HUD, camera and audio API. Supported templates define movement, collision, marker collection, ordered checkpoints, click targets, finish conditions, timers, and restart behavior.

Identity and development claims

A lot ID or wallet address never grants access. Every tool call resolves the bearer key to its database user. Only the owner or recorded collaborators may edit; only the owner may publish. Claims use a unique database constraint. No smart contract, payment, token balance, or transaction confirmation is simulated.