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.
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:
- "List the profiles in the Farm máy 1 group that have proxy errors."
- "Create 10 profiles named Shop 01–10 and assign the proxies in this list to them in order."
- "Open 4 profiles from the Farm máy 2 group and arrange them in a 2×2 grid on the secondary screen."
- "Back up the Shop Ngọc Lan profile to drive D."
- "Open the Shop 03 profile, go to the Facebook group page and tell me how many posts are waiting for approval."
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:/, 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:
- 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-browserentry, keeping comments and other servers intact; the old version is left next to the file with a.ncb-baksuffix. If the file has a syntax error, the app stops and does not overwrite it. - 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.
- Install the NextCore Browser usage guide for the assistant (the
nextcore-browserskill for Claude Code, an instructions file for other assistants). - Claude Code only: the app asks whether to Allow NextCore Browser tools without asking each time. This permission is removed when you disconnect.
- 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.
- Claude Desktop connects through the
mcp-remotebridge (requires Node.js). The app pins a tested version ofmcp-remote; on Windows the command runs throughcmd /.c - Windsurf and Devin Desktop only accept up to 100 tools across all servers, so the app writes the
co-bantoolset (see the Toolsets table below). - If Continue has no
config.yaml, the app creates a new file with all the keys Continue requires.
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 ••••.
{
"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 |
|---|---|---|
/ or / |
every tool | Claude Code, Claude Desktop, Antigravity, Gemini CLI, Qwen Code, Codex CLI, OpenCode |
/ |
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 |
/ |
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, / 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.
- Older assistants or scripts that call with Vietnamese names, keys or values keep working as before, including when the command is forwarded to a workstation still on an older version.
- Internal scripts that need to read results with Vietnamese keys can add
?contract=1to get the old contract. ?lang=vior?lang=en(can be combined with?bo=, for example/) chooses the language of error messages.mcp?bo=app&lang=vi
Since 0.3.168:
- Error messages and hints in results name the English tools (
ncb_page_read,ncb_profile_select…) and no longer tell the assistant to call Vietnamese names. ncb_app_callandncb_settingsaccept English keys at the top level ({ name, params },{ changes }). Before this, calling with English keys madencb_app_callreport a missing command andncb_settingschange nothing.nck_applydecisions return actions in the form{ tool, params }, withparamsusing English keys, so they can be called again right away.- When a command from the main machine is forwarded through the station to a sub-machine running 0.3.168, the sub-machine returns English names and keys directly. Sub-machines on older versions still work, and the main machine translates automatically.
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/ 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/. 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:/ and /: 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:/); 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:/ 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/.
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:
{ "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 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.
{ "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:
ncb_liet_ke_profileto get theid(if the user gives a name, filter withq).ncb_chon_profile { "id": "…" }: binds this session to the profile and opens it if it is not open. From then on, everybrowser_*runs on that profile.browser_navigateto the page to work on, thenbrowser_snapshotto read the accessibility tree. Each element has aref.browser_type/browser_clickwith thatref;browser_take_screenshotorbrowser_snapshotto check the result.- When done:
ncb_tha_profilereleases the profile for other sessions (the browser stays open).
- One MCP session holds one profile. To run several profiles in parallel, open several sessions (several agents). If another session holds the profile,
ncb_chon_profilereturns an error;ncb_phientells you who holds it. - Clicks and typing are real mouse and keyboard events, not JavaScript commands inside the page.
- Each open profile still returns its own
wsEndpointif you want to connect Playwright or Puppeteer from a script.
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</. 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
- Only this machine can call it (
127.0.0.1), a token is required, and requests from web pages are rejected, as with the Local API. Each assistant connected with Connect has its own token that can be revoked separately. - No tool returns proxy passwords. When Mask login details is on (SETTINGS),
ncb_liet_ke_profile/ncb_xem_profilemask PWD ACCOUNT, 2FA CODE, PWD EMAIL and COOKIE. An agent can only read the raw value of a field throughncb_o_bi_mat, one field at a time, and every call is logged in Recent calls. - Commands that touch the data folder (choose, move, reuse an old folder), quit or restart the app only run on that machine itself; calls from a main machine controlling it through the station (
ncb_chon_thiet_bi) are refused. - Anyone who has the token and can run programs on your machine can control your profiles. Keep the token like a password; if it leaks, change it under Advanced or Revoke that assistant.
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).