zeronews-mcp

v0.1.6
zeronews-mcp Checked 3 days ago Published 1 month ago

ZeroNews MCP connector (stdio) — wraps the zeronews CLI for Cursor / WorkBuddy

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

install_client

Detect or install ZeroNews client. If missing: download from ZERONEWS_DOWNLOAD_BASE (override env). If already installed: control-plane upgrade precheck (device download-resolve when logged in, else official download/latest); may update binary from CP download_url or send remote device upgrade when must_upgrade and client is online. Set download_install=false to probe only (no download/upgrade). Requires ZERONEWS_CONTROL_PLANE_URL in production.

ParameterTypeDescription
download_installbooleanDownload official client when missing (default true)
executablestringOptional absolute path to zeronews binary
workdirstringOptional absolute workdir override

prompt_auth_token

Legacy alias: install if needed, then open browser login (same as login). MCP does not use Auth Token / authtoken for binding.

configure_auth

Legacy alias: install if needed, then open browser login (same as login). MCP does not use Auth Token / authtoken for binding.

auth_status

Whether the client appears configured (disk + status --json).

client_status

Runtime probe plus zeronews status --json.

expose_local_service

Create a tunnel only after the user picked a port (Questions) or explicitly named a port/URL. Agents: vague requests like「代理本地服务」without a port → list_local_listeners + Questions first; never auto-call with a guessed port. Requires port for create. ensure runs automatically; omit port to get step needs_port. No port form.

ParameterTypeDescription
bwintegerBandwidth limit in Mbps (CLI --bw; default 1 when omitted)
local_ipstringOverride local IP; usually inferred from listener address
portnumberLocal port from user Questions selection or explicit user message. Agents must not pass a port the user did not choose. Omit → needs_port; use list_local_listeners + Questions instead.
tunnel_kindstringhttps (default), tcp, tls

list_local_listeners

First step when exposing a local service without a named port: ensure logged-in running client, then return choices[].label for host Questions (AskQuestion). Do not call expose_local_service until the user selects one option. mapped/unmapped labels included.

ParameterTypeDescription
workdirstringOptional workdir to read custom local API port from prg_runtime

list_account_tunnels

List tunnels on the logged-in account (zeronews show tunnels --json). Requires login. Use items[].id for delete_tunnel.

ParameterTypeDescription
pageintegerPage number (default 1)
sizeintegerPage size (default 20, max 200)
workspace_idstringOptional workspace filter

list_account_domains

List platform/self-hosted domains on the account (zeronews show domains --json). Requires login.

ParameterTypeDescription
pageintegerPage number (default 1)
sizeintegerPage size (default 20, max 200)
workspace_idstringOptional workspace filter

list_account_clients

List client devices bound to the account (zeronews show devices --json). Requires login.

ParameterTypeDescription
pageintegerPage number (default 1)
sizeintegerPage size (default 20, max 200)
workspace_idstringOptional workspace filter

add_domain

Create a platform domain (zeronews add domain --subdomain … --json). Requires login. If subdomain omitted: needs_subdomain — 4 random 8-char options (B–E) + Cursor Other for custom prefix; use ask_question.options; call again with subdomain.

ParameterTypeDescription
subdomainstringSubdomain prefix: 6–12 lowercase letters and digits. Omit to get input + random prefix choices in Questions UI.
workspace_idstringOptional workspace ID

delete_tunnel

Delete a tunnel by ID (zeronews delete tunnel <id> --json). Requires login. If tunnel_id is omitted, returns choices for Questions UI. After the user picks a tunnel, you MUST get explicit confirmation (yes / 确认删除) in a separate step — picker selection is NOT confirmation — then call again with tunnel_id and user_confirmed: true.

ParameterTypeDescription
tunnel_idstringTunnel ID from list_account_tunnels or delete_tunnel choices[].tunnel_id after user picks
user_confirmedbooleanMust be true on the final delete call after explicit user confirmation. Omit or false returns step needs_user_confirmation.
workspace_idstringWhen listing tunnels for picker, optional workspace filter

delete_domain

Delete a platform domain by ID (zeronews delete domain <id> --json). Requires login. Domain must have no ports. Picker then separate explicit confirmation; final call needs user_confirmed: true.

ParameterTypeDescription
domain_idstringDomain ID from list_account_domains or delete_domain choices[].domain_id
user_confirmedbooleanMust be true after explicit user confirmation before delete executes.
workspace_idstringOptional workspace filter when listing for picker

delete_port

Delete a domain port by ID (zeronews delete port <id> --json). Requires login. Picker then separate explicit confirmation; final call needs user_confirmed: true.

ParameterTypeDescription
domain_idstringWhen listing ports for picker, only ports under this domain ID
port_idstringPort ID from list_account_domains page.items[].ports[].id or delete_port choices[].port_id
user_confirmedbooleanMust be true after explicit user confirmation before delete executes.
workspace_idstringOptional workspace filter when listing for picker

delete_client

Delete a client device by ID (zeronews delete client <id> --json). Requires login. Picker then separate explicit confirmation; final call needs user_confirmed: true.

ParameterTypeDescription
client_idstringClient ID from list_account_clients or delete_client choices[].client_id
user_confirmedbooleanMust be true after explicit user confirmation before delete executes.
workspace_idstringOptional workspace filter when listing for picker

enable_tunnel

Enable a tunnel by ID (zeronews tunnel enable <id> --json). Requires login. If tunnel_id is omitted, returns tunnel choices for Questions UI. Confirm with the user when appropriate.

ParameterTypeDescription
tunnel_idstringTunnel ID from list_account_tunnels or choices[].tunnel_id
workspace_idstringOptional workspace filter when listing for picker

disable_tunnel

Disable a tunnel by ID (zeronews tunnel disable <id> --json). Requires login. If tunnel_id is omitted, returns tunnel choices for Questions UI. Confirm with the user when appropriate.

ParameterTypeDescription
tunnel_idstringTunnel ID from list_account_tunnels or choices[].tunnel_id
workspace_idstringOptional workspace filter when listing for picker

enable_client

Enable a client device by ID (zeronews device enable <id> --json). Requires login. If client_id is omitted, returns client choices for Questions UI.

ParameterTypeDescription
client_idstringClient ID from list_account_clients or choices[].client_id
workspace_idstringOptional workspace filter when listing for picker

disable_client

Disable a client device by ID (zeronews device disable <id> --json). Requires login. If client_id is omitted, returns client choices for Questions UI. Confirm before disabling.

ParameterTypeDescription
client_idstringClient ID from list_account_clients or choices[].client_id
workspace_idstringOptional workspace filter when listing for picker

upgrade_client

Remote client upgrade (console-equivalent): precheck via zeronews device download-resolve --json; skips if already latest. Then zeronews device upgrade. Requires login. Target must be online. Omit client_id for online-device Questions picker.

ParameterTypeDescription
client_idstringClient ID from list_account_clients or choices[].client_id
workspace_idstringOptional workspace filter when listing for picker

list_endpoints

List ZeroNews public endpoints (zeronews endpoints --json; Local API fallback when CLI fails).

add_tunnel

Create a tunnel via zeronews add --json. Auto-installs client if missing; uses browser login when not bound. Use tunnel_kind=lfs for file share. Optional bw (Mbps) sets tunnel bandwidth limit.

ParameterTypeDescription
admin_passwordstring
admin_usernamestring
bwintegerBandwidth limit in Mbps (CLI --bw, default 1)
domainstring
featurestring
feature_configobject
local_ipstring
modestring
portnumber
root_pathstring
tunnel_kindstring
typestring

service_install

Install zeronews as an OS service (zeronews service install).

service_start

Start the zeronews OS service (zeronews service start).

service_stop

Stop the zeronews OS service (zeronews service stop).

service_uninstall

Uninstall the zeronews OS service (zeronews service uninstall). Destructive — confirm with user first.

service_restart

Restart the zeronews OS service (zeronews service restart).

service_status

Check zeronews OS service status (zeronews service status).

client_reload

Reload client runtime (zeronews reload --json; may fallback to POST /api/v1/reconnect).

login

Open a browser confirm page (zeronews login). Installs the client if missing. Returns immediately with login_pending; then poll client_status.