$
bun add @tidesurf/core
example.com
Example

Build faster with reliable APIs

Ship production apps with clear docs and stable endpoints.

Your email B2Get started
DOM 486 tokens
<nav class="site-nav">
  <a href="/docs">Docs</a>
  <a href="/pricing">Pricing</a>
  <button aria-label="start">Get started</button>
  <input placeholder="Your email" />
  <section class="features">Fast Secure Scalable</section>
</nav>
TideSurf 132 tokens
# example.com
L1 [LINK] Docs      /docs
L2 [LINK] Pricing   /pricing
B2 [BUTTON] Get started
I1 [INPUT email] Your email
S1 [SECTION] Fast / Secure / Scalable

HTML in, text out

Same page. Fewer tokens. Stable IDs remain visible so the agent can act without pixels.

raw.html12 lines
<nav class="main-nav">
  <a id="docs" href="/docs">Docs</a>
  <a id="blog" href="/blog">Blog</a>
  <button class="primary">Start</button>
</nav>
tidesurf.txt~132 tokens
# example.com
URL: https://example.com/
---
L1 [LINK] Docs /docs
L2 [LINK] Blog /blog
B1 [BUTTON] Start /start
<main> nav button copy L1 Docs B1 Start P Copy
Prune wrappers, keep targets
Raw HTML TideSurf 10-100x
Reduce cost before reasoning
50-200tokens per page
10-100xlower token cost
<25msparse time
0screenshots

Built for agents

Three lines to browse. One tool call to act.

Chat request
Find the latest issue title and open it.
Agent tool loop
const state = await browser.getState()
state.content -> LLM
await browser.click("L3")
Browser page state
MAIN
  HEADING Issues
  [L1] Pull requests
  [L2] Actions
  [L3] Latest issue title
  [B1] New issue
Find latest issue Open it
Chat request
getState() LLM reads L3 click("L3")
Tool call
Browser result

What ships

Direct CDP tools, token budgets, tab lifecycle, extraction, and MCP wiring in one small TypeScript surface.

Navigate

Go anywhere on the web

navigate("https://...")

Interact

Click, type, select, scroll

click("B1"), type("I1")

Extract

Read precise page content

extract({ selector })

Budget

Keep output within token limits

getState({ maxTokens })

Tabs

Create, switch, close

newTab(), switchTab()

MCP

Expose tools to Codex agents

bunx tidesurf mcp

Safe by default

  • Read-only modeRestrict agents to observation only. No clicks, no typing, no navigation.
  • Filesystem confinementUpload and download paths are locked to explicit roots.
  • Input validationURLs, selectors, expressions, and file paths are validated before execution.
  • Local CDP onlyChrome DevTools Protocol runs over local WebSocket.
Writes stay blocked
Agent tools 127.0.0.1 Chrome CDP
Local loop only
agent.config.ts
const browser = await TideSurf.launch({
  readOnly: true,
  allowedOrigins: ["example.com"],
  maxTokens: 500
})

Try it

Launch a browser, connect to an existing Chrome, or expose TideSurf through MCP.

$ npm install @tidesurf/core
index.ts
const browser = await TideSurf.launch()
await browser.navigate(
  "https://example.com"
)
const state = await browser.getState()
Install and launch
Switch examples

Surf deeper?

Read the docs