Skip to content
NextCore Docs NextCore Browser Tiếng Việt homestaynextcore.org
On this page

MCP for AI agents to manage NextCore Browser

Connect Claude Code, Claude Desktop, Cursor, VS Code, Gemini CLI, Codex and 15 other assistants to NextCore Browser to create, open, arrange and back up profiles, and to work with pages inside each profile in plain language.

Updated 02/11/202618 min read

MCP (Model Context Protocol) is a common standard that lets AI assistants use external tools. NextCore Browser includes an MCP server that runs on its own Local API: your AI assistant connects to it and works with profiles just as you would by clicking in the app.

For example, you can tell your assistant:

The assistant works with pages inside each profile, keeping that profile's sign-ins, proxy and extensions, using a toolset with the same names as the official Playwright MCP (browser_*).

Turning it on and connecting

SETTINGS › AI agent (MCP), turn on Enable AI agent (MCP) (on by default). The server only listens on this machine: http://127.0.0.1:<port>/mcp, and requires a token.

Below the switch is the Assistants on this computer block. The app knows how to connect 21 assistants (since 0.3.167):

Group Assistants
Code editors Cursor, VS Code, Windsurf, Devin Desktop, Kiro, Trae, Zed, Antigravity
VS Code extensions Cline, Roo Code, Continue
Command line Claude Code, Gemini CLI, Qwen Code, Codex CLI, GitHub Copilot CLI, Amazon Q Developer CLI, OpenCode, Goose
Desktop apps Claude Desktop, LM Studio

Assistants the app finds on the machine appear as cards at the top of the block. The rest are grouped in the Other assistants (N) line; click Show all to expand it, and click Write config anyway if you installed an assistant in a custom folder the app cannot see.

One-click connection

Click Connect on an assistant's card. The card changes to Setting up and runs each step, ticking each one as it completes:

  1. Write MCP config into the right file for that assistant (for Windows, macOS or Linux) with its own token. If the file already has other configuration, the app only adds the nextcore-browser entry, keeping comments and other servers intact; the old version is left next to the file with a .ncb-bak suffix. If the file has a syntax error, the app stops and does not overwrite it.
  2. Self-check: the app reads back the entry it just wrote and requests the tool list exactly as the assistant will. When done, the card shows Ready · N tools.
  3. Install the NextCore Browser usage guide for the assistant (the nextcore-browser skill for Claude Code, an instructions file for other assistants).
  4. Claude Code only: the app asks whether to Allow NextCore Browser tools without asking each time. This permission is removed when you disconnect.
  5. It records the default profile the assistant will use, and what to do so the assistant loads NextCore Browser: start a new session (command-line assistants) or quit fully and reopen (code editors).

Click Try now to open the assistant with the first sample prompt. Command-line assistants open in a terminal or in Orca's «NCB · Thử ngay» tab; other assistants open with the sample prompt prefilled, or the app copies the prompt for you to paste. The Next steps card has 4 more sample prompts (list profiles, capture a page, find groups for GROUP CRAWL, view the machines in your team) with a Copy button.

Every time you open SETTINGS, the app rechecks the connected assistants; the card shows the check time and the last use.

When the card says Not connected

The card shows the reason and how to fix it right below. Most of the time you only need to click Fix it for me: the app rewrites the configuration and checks again.

Reason on the card What to do
The token in the file does not match (401) Fix it for me writes a new token
The NextCore Browser entry is missing from the config file The file was just edited by hand or overwritten by the assistant. Fix it for me
The config file is broken Open file folder, fix or delete the file, then Fix it for me. The version from before the app wrote to it is in the .ncb-bak file
MCP is off · cannot call 127.0.0.1 Turn on Enable AI agent (MCP), or change the port under Advanced if the port is taken, then Check again
No answer within 8 seconds The machine is busy or the app is starting; wait a few seconds, then Check again
The server answered without a tool list Sign in to NextCore in the app, then Check again

The ⋯ menu on the card has Check again, Run full setup again, Open file folder and Disconnect. Disconnecting revokes the token immediately and removes the nextcore-browser entry along with the guide and permissions the app added; if nothing else in the file changed since connecting, the app restores the exact .ncb-bak version.

The Recent calls block lists each time an assistant called a tool.

The Try NextCore Browser & Super Agent row (requires Claude Code to be connected): click Start, and the app opens a new Claude tab in Orca in the open repo and types an opening prompt so the agent introduces what it can do with the app. The ⋯ menu lets you copy that prompt to paste into another agent.

Connecting by hand

For other assistants, or if you want to edit the file yourself: open Advanced at the bottom of the block. It has the Local API port and token, Command line to paste into a terminal (Claude Code) (Copy command button) and Manual config for other clients (JSON) (Copy JSON button). The command and JSON are copied with the real token; the screen only shows ••••.

json
{
  "mcpServers": {
    "nextcore-browser": {
      "url": "http://127.0.0.1:19880/mcp",
      "headers": { "Authorization": "Bearer <token>" }
    }
  }
}

Toolsets

The full set has nearly 190 tools, which is heavy for assistants with a tool limit. Add ?bo= to the address to choose a smaller set:

Address Includes Used by Connect for
/mcp or /mcp?bo=day-du every tool Claude Code, Claude Desktop, Antigravity, Gemini CLI, Qwen Code, Codex CLI, OpenCode
/mcp?bo=app profile management, sessions, browser_*, app operations (GROUP CRAWL, MEDIA…), 127 tools VS Code (limit 128), Cline, Roo Code, Kiro, Continue, Copilot CLI, Trae, Amazon Q, Zed, Goose
/mcp?bo=co-ban profile management, sessions, the 20 most used browser_* tools, about 50 tools Cursor, Windsurf, Devin Desktop, LM Studio

Smaller sets only shorten the list the assistant sees; an assistant that calls a tool outside the set by name still works.

English tool names

Since 0.3.167, /mcp returns the English contract: tool names, parameter keys at every level, enumerated values, descriptions, results, instructions and prompts are all in English. For example ncb_xem_profile becomes ncb_profile_get, and ncb_gc_goi_y { tuKhoa } becomes ncb_gc_suggest { keyword }. The Vietnamese names on this page can still be called.

Since 0.3.168:

Errors have stable NCB-xxxx codes: 1xxx protocol (for example NCB-1003, no such tool), 2xxx session and permissions, 3xxx workstations, 9000 an internal tool error. The error text follows the chosen language; the code is in error.data.code of the JSON-RPC response and _meta["vn.nextcore/error"] of the tool result. Compare codes, not text.

Results state what NextCore Browser did

Since 0.3.167, results of test and coordination commands (nck_run, ncb_e2e, ncb_e2e_lo, nck_apply when it returns a decision, ncb_terminal after assigning work) include a summary of what NextCore Browser just did, taken from that run's own measurements, in _meta["org.homestaynextcore/attribution"]. Failed runs, or runs that measured nothing, do not include it. The assistant is instructed to copy the summary once at the end of its report to you, so you know which errors the app's checks found.

Self-diagnosing the connection (ncb_doctor)

Since 0.3.168, the assistant calls ncb_doctor when the connection has a problem. The tool checks 9 items and marks each as passing, needing attention or broken, with how to fix it:

Item What it checks
server app version, channel (release on port 19880, Dev on 19881)
sign-in whether you are signed in, the plan, days remaining
contract English contract (2) or Vietnamese (1)
toolset the toolset in use (day-du, app, co-ban)
permissions whether destructive tools are on or off
session which profile this session holds
playwright number of browser_* tools
profiles number of profiles, number open
station whether this machine is the main machine or a workstation

The result contains no access keys or data folder paths, so it is safe to paste into an issue when reporting a bug.

The app also publishes an MCP server card at http://127.0.0.1:19880/mcp/server-card and /.well-known/mcp: name, version, supported protocol versions and authentication method. Reading the card needs no key; when MCP is off this address returns 404.

Tools

Tool Level What it does
ncb_trang_thai read-only app version, default browser, number of profiles / open; since 0.3.169 also the last time the app closed abnormally, with the NC-CRASH-… code
ncb_liet_ke_profile read-only list of profiles (filter by group, name)
ncb_xem_profile read-only details of one profile, wsEndpoint if it is open
ncb_dang_chay read-only open profiles + CDP port
ncb_danh_sach_trinh_duyet read-only NextCore Chromium on the machine + version
ncb_tao_profile · ncb_sua_profile control create / edit name, group, proxy, start page, note
ncb_mo_profile · ncb_dong_profile control open (returns wsEndpoint; optional scale) / close
ncb_xep_cua_so control arrange windows in a grid, choose the screen, set page zoom
ncb_sao_luu_profile control back up to an encrypted .ncbak file
ncb_kiem_proxy · ncb_kiem_ro_ri read-only · control check a profile's proxy; measure IP, time zone and WebRTC leaks in a profile
ncb_chon_profile · ncb_tha_profile · ncb_phien control bind this MCP session to a profile / release it / see which profile another session holds
browser_* depends on the tool the full Playwright set on the held profile: browser_snapshot, browser_click, browser_type, browser_navigate, browser_tabs, browser_take_screenshot…
ncb_o_bi_mat control read the raw value of one masked note field, or the current 2FA code (see Safety)
ncb_e2e · ncb_e2e_lo · ncb_e2e_toc_do · ncb_e2e_seo · ncb_e2e_vai control test your website on a real profile (see Page testing)
ncb_xoa_profile · ncb_khoi_phuc_sao_luu destructive move to the trash / restore (may overwrite)
ncb_tep read-only / control read, create and edit files in file areas (called by area name, for example hop-dong:/bang-gia.pdf); add your own folders in SETTINGS › Data and backups › File areas for AI; see Thư mục dữ liệu (Data folder)
ncb_luong_ds · ncb_luong_mo read-only the AUTOMATIONS flow store on the server for your account; open a flow to run it
ncb_luong_luu · ncb_luong_xoa control save a flow to the server (if another machine edited it ⇒ reports it, does not overwrite) / delete it permanently from the store on every machine
nck_apply read-only ask NextCore Kernel for a coordination decision: pick work, score, unblock, accept
ncb_terminal control NEXTCORE TERMINAL: assign work to an agent on another machine, view tabs, read the screen, switch Claude accounts, read GitHub issues (table below)
ncb_app_open_screen · ncb_app_screenshot control · read-only since 0.3.171: switch the app to a screen (for example customerpost, settings) without bringing the window to the front, then capture a PNG of the app window. Agents can look at the interface after editing without touching your mouse. Images are saved in the nhan:/chup-app/ file area, keeping the 20 most recent; if the window is minimized, it returns a clear error instead of a blank image. For CUSTOMERPOST it also accepts postId (opens the post detail panel) and imageIndex (opens the large image)

Destructive tools are off by default, so assistants cannot see them. Turn on the Allow destructive tools switch in SETTINGS › AI agent (MCP).

The tools ncb_trang_mo_url, ncb_trang_doc, ncb_trang_bam, ncb_trang_go and ncb_trang_chup are legacy: they still work for existing scripts but are not shown in the app and co-ban sets. For new work, use ncb_chon_profile + browser_*.

NextCore Command: coordinating agents across machines (ncb_terminal)

One tool; the hanhDong parameter chooses the action. may is nay (this machine) or a machine id taken from may.

hanhDong Parameters What it does
giao chu, optional hdh (win32 · darwin · linux), may, term, chiDeXuat Picks a secondary machine with a free Claude tab, plenty of quota and few working agents (the main machine is ranked last), then sends right away; with no free tab, it opens a new one. If the needed machine is asleep ⇒ wakes it over the LAN first. chiDeXuat: true only returns the machine that would receive it
giam-sat optional choPhut Every machine: working tabs (tool, minutes), tabs waiting for a person longer than N minutes, tabs stuck on quota, quota, offline machines. Since 0.3.158 also machine capacity (RAM, CPU, latency), the current tab cap with its reason, and a quota forecast line (Số tab thợ tự theo sức máy (Worker tab count follows machine capacity))
may — Machines, worktrees, tabs, agent states
doc may, term, soDong The last N lines on a tab's screen
gui may, term, chu Sends a prompt + Enter, agent tabs only, never into a shell tab
tao may, worktreeId, agent Opens a new agent tab (does not open a raw shell)
tai-khoan · chon-tai-khoan may, taiKhoanId View quota / switch the Claude account in the machine's Orca. Without may ⇒ this machine, plus cacMay: quota sent by other machines through the station. Stale figures are marked «(số cũ)» (stale) and ~; accounts whose session expired are marked «cần làm mới» (needs refresh)
issue q, optional repo Open GitHub issues (filter by number / text)

Tasks in the task book go through six stages (dang → bao-xong → da-kiem → nghiem-thu → cho-phat-hanh → toi-tay). hanhDong: "viec" with lam: "ds" returns stage + stageLabel for each task; lam: "buoc" with id and stage moves a task to the next stage. Skipping or going back a stage is refused and nothing is written.

Since 0.3.174, when you call a tool on another machine over the LAN and the LAN drops: read-only tools and commands that had not started yet are retried automatically through the station; tools that write still return a «có thể đã chạy» (may have already run) error. ncd_link_xem returns links of the form homestaynextcore.org/nextcore-design/<mã>.

Since 0.3.169, ncb_db_sua accepts dangTuong, dangGroup, quyenTuong, dangDuoiTen (post to a personal timeline or Page, who can see it, which name to post as); ncb_luong_nut returns sample parameters for the read file, download file, loop and type nodes.

Example of assigning a macOS build to the Mac:

json
{ "hanhDong": "giao", "hdh": "darwin", "chu": "Phát hành bản 0.3.92 cho macOS theo docs/phat-hanh-da-nen-tang.md" }

The message sent to the agent on the other side states its source: «[Việc giao từ <máy> qua NEXTCORE TERMINAL — trả lời «Đã nhận» rồi làm]» (Work assigned from via NEXTCORE TERMINAL; reply «Đã nhận» (Received), then do it). A few minutes later, call doc or giam-sat to check. Sending raw keystrokes to the terminal (term*) is not available to MCP.

NextCore Kernel (nck_apply)

Since 0.3.158, NextCore Command decisions (picking work, scoring, unblocking, acceptance, slicing large tasks) go through nck_apply. The agent describes the situation and Kernel returns a decision; the agent does not receive, and does not need to know, the rules inside.

json
{ "module": "nck.command", "tinhHuong": { "loai": "cham-diem", "…": "dữ kiện của tình huống" } }
Returned field Meaning
quyetDinh · cau the decision and a one-sentence explanation for a human reader
hanhDong[] what the agent does next, carried out in exactly this order
maLyDo[] stable reason codes, for logging
canThem[] missing facts: each entry names the field and how to measure it; measure, then call again
loaiCo[] the loai is not in the module: the list of situations the module accepts
nguon · hetHanOffline may-chu or cuc-bo; the time after which it can no longer run offline

Kernel runs on the NextCore server. NCB sends the question with the account's license and a signature from the machine's device key, so only machines that are signed in can call it.

Code When What to do
NCK-0002 missing facts measure the fields in canThem, then call again
NCK-0009 unavailable: offline for more than 24 hours, machine revoked or invalid license reconnect, sign in again if needed
NCK-0012 over the quota for self-built situations: 60 distinct situations / hour, 150 / day (situations NCB sends with a signed ticket do not count) use situations from NextCore Command events; do not generate situations in bulk
NCK-0010 · NCK-0011 unusually rapid calls; the server has temporarily blocked the account wait out the block time given in the error; do not call repeatedly to probe

The nck.command module also returns a code cell map of the open repo: { "loai": "ban-do-o" } ⇒ clusters of tightly linked files (by imports and git co-change history), with line counts, change frequency and whether they have tests; { "loai": "o-cua-tep", "tep": "<đường dẫn>" } ⇒ which cell that file belongs to. Use it to slice large tasks along the right boundaries. The first build takes a few seconds; later calls only reread changed files.

During short outages NCB decides locally (nguon: "cuc-bo"), for up to 24 hours since the server last answered. When the server blocks for rapid calls, NCB does not switch to deciding locally.

Working with pages in a profile

The usual order an assistant follows:

  1. ncb_liet_ke_profile to get the id (if the user gives a name, filter with q).
  2. ncb_chon_profile { "id": "…" }: binds this session to the profile and opens it if it is not open. From then on, every browser_* runs on that profile.
  3. browser_navigate to the page to work on, then browser_snapshot to read the accessibility tree. Each element has a ref.
  4. browser_type / browser_click with that ref; browser_take_screenshot or browser_snapshot to check the result.
  5. When done: ncb_tha_profile releases the profile for other sessions (the browser stays open).

Typing passwords the agent cannot see

Since 0.3.149, when a session holds a profile, the profile's secret note fields (PWD ACCOUNT, 2FA key, PWD EMAIL, COOKIE) are loaded as named secrets. In every browser_* result (page tree, console, files written), the real value is replaced with <secret>PWD_ACCOUNT</secret>. The agent types by name: browser_type with the text PWD_ACCOUNT puts the real password into the field, while the agent only sees the name.

NextCore E2E: page testing

The ncb_e2e* set (NextCore E2E) tests your website on real profiles (already signed in), with no need to set up test accounts:

Tool Measures
ncb_e2e one URL across several screen sizes × light/dark × touch screens × slow network/offline: horizontal overflow, clipped text, small touch targets, contrast, console errors, security headers
ncb_e2e_lo the same for a whole list of URLs, split across several profiles running in parallel (number of profiles based on free RAM and CPU cores)
ncb_e2e_toc_do Lighthouse scoring right in the profile's browser
ncb_e2e_seo crawls a site on the same domain (robots.txt, sitemap.xml, internal links)
ncb_e2e_vai opens the same list of URLs with several profiles in different roles (guest, staff, admin) to compare who sees what

ncb_e2e and ncb_e2e_lo accept quyTac to set project-specific thresholds (touch target size, AA or AAA contrast level, LCP/CLS thresholds, regions to ignore).

Safety

Note Automation on platforms (Facebook…) may violate that platform's terms. Have the assistant stop and ask for your approval before public actions (posting, bulk messaging, payments).

Was this article helpful?