Tutorial

QuickStart / Cursor · Codex · Claude Code · OpenCode

Build a data app and API with your agent.

Your agent adapts an event budget while you watch, and every result can show how it was calculated. Then it can give the budget an API and put it online. Which route fits?

1. Open this workspace and connect your agent

A small relay on your computer lets your coding agent edit and run the example you see here.

Enable WebMCP on this page

Keep this tab open on the same computer as your agent. You need Node.js 20 or newer. Add the relay to your client:

Cursor

In your project, add this server to .cursor/mcp.json. Enable it in Cursor’s MCP settings, then start an Agent chat.

{
  "mcpServers": {
    "yichus-browser": {
      "command": "npx",
      "args": ["-y", "@yichus/mcp@0.1.4"]
    }
  }
}

Cursor’s MCP setup reference

Codex

With the Codex CLI installed, run:

codex mcp add yichus-browser -- npx -y @yichus/mcp@0.1.4
codex mcp list

The local clients share MCP configuration on the same host. Start a new local session after adding the server. If you configure it through MCP settings instead, choose STDIO, command npx, and arguments -y @yichus/mcp@0.1.4.

Codex’s MCP setup reference

Claude Code

From the project directory where you’ll use Claude Code, run:

claude mcp add --transport stdio yichus-browser -- npx -y @yichus/mcp@0.1.4

Start Claude Code in that directory and use /mcp to check the connection. These steps are for Claude Code, the local coding client.

Claude Code’s MCP setup reference

OpenCode

Add this to your project’s opencode.json, then start OpenCode there:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "yichus-browser": {
      "type": "local",
      "command": ["npx", "-y", "@yichus/mcp@0.1.4"],
      "enabled": true
    }
  }
}
Using OpenCode V2?

V2 uses mcp.servers. Use its CLI to add the local server instead:

opencode mcp add yichus-browser -- npx -y @yichus/mcp@0.1.4
opencode mcp list

OpenCode’s MCP setup reference · V2 reference

2. Give your agent this prompt

The starting budget leaves out booking fees. This prompt asks your agent to add one as a control you can slide.

Build me an event-budget data app in the Yichus QuickStart browser tab. Use the browser's WebMCP compiler and feedback tools; keep the visible source and running result in sync.

Connect first: use webmcp_list_sources to find /start/quickstart.html, then webmcp_list_tools. Match each tool’s sources to that tab and use its returned public name in webmcp_call_tool, with an arguments object. Names can gain a tab suffix when several pages are open; rediscover them if needed. Read yichus_example_guide and yichus_example_read for exampleId "event_budget". If the tab is missing, tell me the connection step that failed before writing code.

Read both Bosatsu files and the guide's language/package references. Add booking_fee as a fifth Int argument to calculate and a slider labeled "Booking fee ($)", range 0–500, step 10, default 50. Include it once in total_cost. Keep the other defaults, the balance chart, and generated Why buttons. Update the assumptions to say the fee is included. Use named intermediate calculations and <- for the configuration's continuation chains.

Use yichus_example_update with the revision you just read. Compile using yichus_example_run (action "run"). If running is true, poll yichus_example_feedback until running is false, check the revision still matches, and fix compiler errors from that feedback. Read yichus_example_feedback until previewReady is true; use yichus_example_preview with that revision, previewId, and current control IDs to test the actual controls. Never substitute a hand-written result or explanation.

With ticket price 25, venue cost 600, and per-guest cost 5, check these cases:
- 40 guests, booking fee 50: balance 150.
- 60 guests, booking fee 50: balance 550.
- 0 guests, booking fee 50: balance -650.
- 40 guests, booking fee 100: balance 100.
Open Why for Amount left over, follow total_cost, and confirm booking_fee appears in the generated calculation. Check that the balance chart renders and feedback reports no runtime errors. Restore 40 guests and fee 50 for me to inspect.

Call the relay’s yichus_save_calculator directly. Set exportToolName to this tab’s public yichus_example_export name from discovery, exampleId to event_budget, expectedRevision to the tested revision, and outputDirectory to an absolute path for a new event-budget folder under my current project. The tool saves both Bosatsu files and event-budget.html and returns their paths without sending the full generated HTML into our chat. The export uses configured defaults and carries its own scripts and styles. Add a README with the model assumptions, tested inputs/results, and local run instructions. Serve that folder on localhost with a static server, check that its data app loads, and give me the local URL and file paths. Report what you actually checked and any step you could not complete.

Your shared data app workspace The agent opens this drawer; you can also edit and run it yourself

Edits stay in this tab until you or your agent save them.

3. Check what changed

With 40 guests and a $50 booking fee, the balance should be $150. Open Why? beside Amount left over and the fee shows up in the calculation. Yichus builds that explanation from the program your agent wrote, not from its summary.

Compiling and these runs check the program and particular results. Neither shows the budget includes every real-world cost.

4. Keep going

Ask your agent for the next step. It has the prompts and checks for each one.

Your API source & diagram The agent adds booking_fee here when you add the API

For a different problem, repair a program with the lenses or build a service.

Ask your agent about anything here; it has the detail.

Where this fits

What this is about: Ask any function why