External agents and MCP
NinjaSurfer exposes an MCP server through the signed standalone CLI and the Desktop application. Clients can manage profiles and use browser/proxy tools through the shared JS SDK. Desktop Settings can configure supported MCP clients, including Codex.
Inspect the published server
With the standalone command installed:
ninjasurfer mcp --help ninjasurfer mcp prompt --command "$(command -v ninjasurfer)" ninjasurfer mcp config codex --command "$(command -v ninjasurfer)"
These print the supported commands, the agent instructions and a Codex configuration snippet.
For a manual configuration, the client starts the absolute path of the installed
NinjaSurfer executable with mcp as its argument (stdio transport). The mcp config
subcommand generates configuration for a named client when supplied that executable
path through --command. Use the installed help for its syntax. A package CLI has no
standalone executable path to infer automatically. Do not use npx: NinjaSurfer is not
distributed through public npm.
mcp install changes the selected client's configuration; generating a configuration
snippet does not. Keep account/API key material in the supported key-file/environment
setup rather than pasting secrets into prompts. Profile launches still require valid
authorization, engine resources and the correct app/workspace context.
Other browser clients
A running Chromium profile can expose CDP for Playwright, Puppeteer and other clients.
The CLI start help documents the profile selection and JSON endpoint output.
WebKit uses its own Playwright transport and cannot be attached through Chromium CDP.
See the SDK guide for launching from code.
Profiles over MCP
Profiles use one MCP tool family. Every profile_list, profile_get, profile_create, profile_update,
profile_delete, profile_restore, profile_start, profile_stop and profile_status request names its store:
scope: "local" for this SDK root, or scope: "workspace" for the account's server-backed profile/card. A missing
profile never retries in the other store. Use the canonical id returned by profile_list or profile_create for
browser and data tools; ambiguous names return PROFILE_AMBIGUOUS and candidate ids.
For example, create with profile_create({scope:"workspace",name:"Research",os:"win"}), configure the card with
profile_update({scope:"workspace",profile:ID,metadata:{tags:["research"]},proxy_id:PROXY_ID}), then start with
profile_start({scope:"workspace",profile:ID}). Device settings use changes on update and settings on create;
card title, tags, notes, status, folder, start pages and VPN route references use metadata, which is refused for local
profiles. The proxy is the top-level proxy (a URL: a local profile's setting, or a new workspace proxy saved as
proxy_save saves one), proxy_ca or proxy_id (a saved workspace proxy; null: none), for either scope. Workspace start owns pulling data, route preparation, the launch lease and saving after stop. A takeover
requires takeover:true,confirm:true; an app host without takeover support refuses it rather than starting a second
browser outside the app.
profile_list with workspace scope preserves account pagination (limit, cursor) and trash queries. Server ids can
be read/trashed/restored with an API key alone; card-title lookup, metadata changes and workspace start require the
workspace key. A configured but refused account or damaged vault remains an error. profile_restore restores account
trash; local trash is restored in the app. profile_clone with scope:"local" copies SDK profiles; an imported archive
is a local clone source. Create a fresh workspace device with profile_create.
An iPhone profile runs WebKit and is a workspace profile, as in the app: profile_create({scope:"workspace",os:"ios"}),
with a proxy or none; a local os:"ios" create answers INVALID_ARGUMENT (reason ios-workspace-only). Its engine and
fonts come with its first start. The browser tools work on it with three differences: page_content is Playwright's AI
accessibility snapshot in the same shape (read in an isolated world), click is a real mouse click on the element (no
node), and eval_js's isolated world (its default) is Playwright's utility world; world:"main" still runs among
the page's scripts. run_task answers CAPABILITY_UNSUPPORTED (reason webkit);
drive the page with the other tools.
workspace_list and workspace_get cover proxies, VPNs, labels, folders, templates and VPN subscriptions; profile cards
use only the profile tools. Embedders can supply a typed profileCatalog alongside their host when the host owns the
profile store. Its local root must match the server root, and its failures propagate without selecting the SDK catalog.