Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.uplink.build/llms.txt

Use this file to discover all available pages before exploring further.

All tools are namespaced uplink_* so they don’t collide with tools from other MCP servers. Group by purpose:

Session lifecycle

Start a new Uplink session and return a 6-digit pairing code (primary) + URL (fallback). Input:
  • projectId (string, optional) — Uplink project ID. Defaults to the API key owner’s Playground project.
Returns: sessionId, linkUrl, relayUrl, jwt, pairingCode (6 digits), pairingCodeExpiresInSeconds. Block until a device pairs with the active session, then return its metadata. Input:
  • timeout_ms (number, optional) — How long to wait. Default 25000 (under the OTP TTL so the model can refresh the code if needed); max 600000.
Returns: deviceId, deviceModel, platform, platformVersion, deviceType. Mint a fresh 6-digit code for the active session — useful if the previous code expired (30s TTL) before pairing. Returns: code, ttlSeconds. Render the active session’s pairing URL as an ASCII QR code for scanning. Opt-in — only called when the user explicitly asks. Return whether a session is active and whether a device is paired. Returns: connected (bool), sessionId, hasDevice (bool).

Page-driven tools

These dispatch to the same handlers the JavaScript SDK uses. They require an active paired session. Returns the current URL of the device’s active page. Snapshot the DOM of the active device. Returns the body tree (formatted for LLM consumption) plus head metadata (title, base, meta tags, link rels). Run a JS expression or statement block in the device’s page context. Input:
  • expression (string) — JS to evaluate. Can be a single expression (document.title) or a statement block (const r = await fetch(...); return r.json()).
Wait for the next network request whose URL contains url_pattern. Input:
  • url_pattern (string) — substring to match against the request URL.
  • timeout_ms (number, optional) — default 15000, max 60000.
Returns: method, URL, status, headers, body preview. Execute a script against the device with page and console bound in scope. Returns counts of captured flows + logs plus any error. Input:
  • code (string) — JS source to execute.
  • wait_for_idle_ms (number, optional) — settling window after script resolves; default 3000, max 10000.

Inspection tools

The MCP server captures logs, network requests, and page commands in a per-session ring buffer. These tools query that buffer. Return captured console logs from uplink_run_script invocations. Input:
  • level (enum: log/info/warn/error/debug, optional) — filter by level.
  • limit (number, optional) — most-recent N entries.
Search captured network requests by URL substring. Input:
  • url_pattern (string) — substring to match.
  • limit (number, optional).
Returns: matches with method, URL, status, headers, and body previews. Use uplink_get_network_request to fetch a single entry by id. Fetch a single captured network request by id (from uplink_search_network). Input:
  • id (number) — network request id.
List captured page commands (method, args, result/error, timing) emitted during uplink_run_script. Input:
  • method (string, optional) — filter by page method (e.g. "goto", "click").
  • limit (number, optional).
Fetch a single captured command by id (from uplink_list_commands). Input:
  • id (number) — command id.

Buffer sizes

The recorder retains:
  • 1000 logs
  • 500 network requests (with 1KB body previews; full bodies fetched on demand by id)
  • 200 commands
Older entries evict FIFO when limits are hit.