CLI Commands
The opentabs CLI is the single entry point for everything platform-side: starting the server, managing plugins, checking status, viewing logs, and rotating secrets. I wanted one command that handles all of it, so you never have to remember which tool does what. Install it globally:
npm install -g @opentabs-dev/cliGlobal options
| Flag | Description |
|---|---|
--port <number> | MCP server port. Falls back to OPENTABS_PORT env var, then port in config.json, then defaults to 9515. |
-V, --version | Print CLI version. |
-h, --help | Show help for any command. |
opentabs start
Start the MCP server in production mode.
opentabs start [options]| Option | Default | Description |
|---|---|---|
--port <number> | 9515 | Server port. |
--background | — | Start the server in the background. Writes a PID file to ~/.opentabs/server.pid and exits immediately. Use opentabs stop to stop the server. |
--show-config | — | Print full MCP client configuration even on subsequent runs. By default, MCP client config is only shown on first run. |
On first run, opentabs start auto-initializes the ~/.opentabs/ directory:
- Creates
~/.opentabs/config.json(plugin and tool settings) - Generates authentication secret in
~/.opentabs/extension/auth.json - Installs the Chrome extension files to
~/.opentabs/extension/ - Prints first-time setup instructions (load the extension, configure your MCP client)
On subsequent runs, the extension is updated if the CLI version has changed.
Server output is written to both the terminal and ~/.opentabs/server.log. The process exits if the port is already in use.
# Start on default port
opentabs start
# Custom port
opentabs start --port 3000
# Start in the background (use opentabs stop to stop)
opentabs start --backgroundopentabs stop
Stop the background MCP server.
opentabs stop [options]| Option | Default | Description |
|---|---|---|
--port <number> | 9515 | Server port, used as fallback if no PID file is found. |
Reads the PID from ~/.opentabs/server.pid (written by opentabs start --background), sends SIGTERM to the process, and waits up to 5 seconds for it to exit. The PID file is cleaned up after the server stops. If no PID file exists, falls back to a health-check probe on the configured port; if the server is running but was not started with --background, it cannot be stopped this way — use Ctrl+C in the terminal where it is running.
opentabs stop
opentabs stop --port 3000opentabs status
Show MCP server status and connected plugins. Running opentabs with no subcommand is equivalent to opentabs status.
opentabs status [options]
opentabs # same as opentabs status| Option | Description |
|---|---|
--port <number> | Server port to check (default: 9515). |
--json | Output raw JSON from the /health endpoint. |
Displays server version, SDK version, uptime, extension connection, MCP client count, plugin count, total tool count, and per-plugin details (tab state, tool count, source).
Tab states are color-coded: ready (green), unavailable (yellow), closed (dim). Failed plugins are listed separately with their error messages.
opentabs status
opentabs status --json
opentabs status --port 3000opentabs audit
Show recent tool invocation history from the server's in-memory audit log.
opentabs audit [options]| Option | Default | Description |
|---|---|---|
--limit <number> | 20 | Number of entries to show. |
--plugin <name> | — | Filter by plugin name. |
--tool <name> | — | Filter by tool name (e.g., slack_send_message). |
--since <duration> | — | Show entries from the last duration. Format: <number>[smhd] (e.g., 30m, 1h, 2d). |
--json | — | Output raw JSON from the audit endpoint. |
--file | — | Read from persistent disk log (~/.opentabs/audit.log) instead of the running server. |
Each entry shows the timestamp, tool name, success/failure status, and duration. Failed entries include the error code, category, and message when using --json.
The server maintains the last 500 tool invocations in memory. The audit log resets when the server restarts. Use --file to read from the persistent disk log at ~/.opentabs/audit.log, which survives server restarts.
# Show last 20 invocations
opentabs audit
# Show last 50, filtered to one plugin
opentabs audit --limit 50 --plugin slack
# Filter by tool name
opentabs audit --tool slack_send_message
# Show invocations from the last hour
opentabs audit --since 1h
# Combine filters
opentabs audit --tool slack_send_message --since 30m
# Read from persistent disk log
opentabs audit --file
# Raw JSON output
opentabs audit --jsonopentabs doctor
Run diagnostic checks on your OpenTabs setup.
opentabs doctor [options]| Option | Description |
|---|---|
--port <number> | Server port to check (default: 9515). |
Performs the following checks:
- Runtime — reports the installed Node.js version
- Browser — checks that a Chromium-based browser is installed (Chrome, Chromium, Edge, or Brave)
- Config file — checks
~/.opentabs/config.jsonexists - Auth secret — verifies
~/.opentabs/extension/auth.jsoncontains a valid secret - MCP server health — fetches the
/healthendpoint (3s timeout) - Extension connection — checks if the Chrome extension is connected via WebSocket
- Extension installed — verifies
~/.opentabs/extension/manifest.jsonexists - Extension version — compares installed extension version to CLI version
- MCP client config — checks Claude Code, Cursor, OpenCode, and Windsurf MCP configuration files for correct server entries
- Local plugins — for each local plugin, checks that
dist/tools.jsonanddist/adapter.iife.jsexist - npm plugins — verifies npm-discovered plugins reported by the server are loading correctly
Results are shown as a checklist with pass (✓), warning (!), and error (✗) indicators. Exits with code 1 if any fatal check fails.
opentabs doctor
opentabs doctor --port 3000opentabs logs
Tail the MCP server log output.
opentabs logs [options]| Option | Default | Description |
|---|---|---|
--lines <n> | 50 | Number of lines to display. |
-f, --follow | — | Follow new output in real time (like tail -f). |
--plugin <name> | — | Show only logs from a specific plugin. |
Reads from ~/.opentabs/server.log. By default, prints recent lines and exits. Use -f or --follow to tail the file for new output in real time. The --plugin flag filters to lines containing [plugin:<name>], showing only log entries from that plugin.
# Show recent log lines and exit
opentabs logs
# Follow logs in real time
opentabs logs --follow
# Show last 100 lines and follow
opentabs logs --lines 100 -f
# Show only Slack plugin logs
opentabs logs --plugin slackopentabs plugin
Manage plugins. Has five subcommands: search, list, install, remove, and create.
opentabs plugin search
Search the npm registry for available OpenTabs plugins.
opentabs plugin search [query]| Argument | Required | Description |
|---|---|---|
[query] | No | Search term. Lists all plugins if omitted. |
Each result shows the package name, version, description, and author. Install a found plugin globally to enable auto-discovery:
# Search for plugins
opentabs plugin search slack
# List all available plugins
opentabs plugin search
# Install a discovered plugin
npm install -g opentabs-plugin-slackopentabs plugin create
Scaffold a new plugin project.
opentabs plugin create [name] [options]| Argument/Option | Required | Description |
|---|---|---|
[name] | No | Plugin name (lowercase alphanumeric + hyphens). Prompted interactively if omitted. |
--domain <domain> | No | Target domain (e.g., .slack.com, github.com). Prompted interactively if omitted. |
--display <name> | No | Display name (e.g., Slack). |
--description <desc> | No | Plugin description. |
When run without arguments, enters interactive mode and prompts for the plugin name, domain, display name, and description. Generates a standalone npm package with TypeScript config, a scaffolded plugin class, and an example tool. The plugin is auto-registered in ~/.opentabs/config.json on first build.
The standalone @opentabs-dev/create-plugin package provides the same functionality:
npx @opentabs-dev/create-plugin my-plugin --domain .example.com --display "My App"opentabs plugin list
List installed plugins. Works in online mode (fetches from the running server) and offline mode (reads from config and global npm packages). Alias: opentabs plugin ls
opentabs plugin list [options]| Option | Description |
|---|---|
--json | Output machine-readable JSON. |
--port <number> | Server port (default: 9515). |
-v, --verbose | Show tool names for each plugin. |
When the server is running, displays each plugin's name, display name, tab state (color-coded), tool count, source (npm or local), and SDK version. When the server is not running, falls back to scanning ~/.opentabs/config.json and global npm packages.
# List all installed plugins
opentabs plugin list
# Machine-readable output
opentabs plugin list --jsonopentabs plugin install
Install a plugin from npm. Alias: opentabs plugin add
opentabs plugin install <name>| Argument | Required | Description |
|---|---|---|
<name> | Yes | Plugin name — shorthand (slack), full package name (opentabs-plugin-slack), or scoped package (@my-org/opentabs-plugin-custom). |
Shorthand names are resolved by checking the official scoped package first (@opentabs-dev/opentabs-plugin-slack), then falling back to the community unscoped package (opentabs-plugin-slack). Runs npm install -g under the hood. If the MCP server is running, it is notified via POST /reload to pick up the new plugin immediately.
# Install using shorthand
opentabs plugin install slack
# Install using full package name
opentabs plugin install opentabs-plugin-slack
# Install a scoped community plugin
opentabs plugin install @my-org/opentabs-plugin-customopentabs plugin remove
Remove a globally installed plugin. Alias: opentabs plugin rm
opentabs plugin remove <name>| Argument | Required | Description |
|---|---|---|
<name> | Yes | Plugin name — shorthand (slack), full package name, or scoped package. |
| Option | Required | Description |
|---|---|---|
-y, --confirm | Yes | Required safety flag — without it, the command prints a warning and exits. |
Runs npm uninstall -g and also removes matching entries from the localPlugins array in ~/.opentabs/config.json. If the MCP server is running, it is notified via POST /reload.
# Remove using shorthand
opentabs plugin remove slack --confirm
# Remove using full package name
opentabs plugin remove opentabs-plugin-slack --confirmopentabs config
View and manage configuration. Has five subcommands: show, set, path, reset, and rotate-secret.
opentabs config show
Display the current configuration (secret redacted). Alias: opentabs config get
opentabs config show [options]| Option | Description |
|---|---|
--json | Output config as JSON (secret is redacted). |
--show-secret | Display the full authentication secret and MCP client configurations. |
opentabs config show
opentabs config show --json
opentabs config show --show-secretopentabs config set
Set a configuration value.
opentabs config set <key> [value]| Key format | Value | Description |
|---|---|---|
tool-permission.<plugin>.<tool> | off | ask | auto | Set a per-tool permission. |
plugin-permission.<plugin> | off | ask | auto | Set a plugin-level default permission for all tools in the plugin. |
port | 1–65535 | Set the server port. |
localPlugins.add | path | Add a local plugin path to the localPlugins array. Relative paths are resolved to absolute. |
localPlugins.remove | path | Remove a local plugin path from the localPlugins array. |
| Flag | Description |
|---|---|
-f, --force | Allow localPlugins.add to register paths that do not yet exist on disk. |
# Set a tool to auto-approve (no confirmation prompt)
opentabs config set tool-permission.slack.send_message auto
# Disable a tool entirely
opentabs config set tool-permission.slack.send_message off
# Set a plugin default to require approval for all its tools
opentabs config set plugin-permission.slack ask
# Change the server port
opentabs config set port 3000
# Register a local plugin
opentabs config set localPlugins.add /path/to/my-plugin
# Register a local plugin path that does not yet exist
opentabs config set localPlugins.add /future/path/my-plugin --force
# Unregister a local plugin
opentabs config set localPlugins.remove /path/to/my-pluginopentabs config path
Print the config file path.
opentabs config path
# Output: /Users/you/.opentabs/config.jsonopentabs config reset
Delete the config file. The server regenerates a fresh config on the next opentabs start.
opentabs config reset --confirm| Option | Required | Description |
|---|---|---|
--confirm | Yes | Required safety flag — without it, the command prints a warning and exits. |
The config file stores local plugin paths, tool overrides, and permissions. The authentication secret in ~/.opentabs/extension/auth.json is not affected.
opentabs config rotate-secret
Generate a new 256-bit random secret and write it to auth.json.
opentabs config rotate-secret| Option | Required | Description |
|---|---|---|
--confirm | Yes | Required safety flag — without it, the command prints a warning and exits. |
If the MCP server is running, it is notified via POST /reload using the old secret. The server then notifies the Chrome extension via WebSocket, and the extension auto-reconnects with the new secret — no manual reload required. MCP clients need to update their configuration with the new secret value.
# Rotate the secret
opentabs config rotate-secret --confirmopentabs update
Update the OpenTabs CLI to the latest version.
opentabs updateChecks the currently installed version against the latest published version on npm. If an update is available, runs npm install -g @opentabs-dev/cli@<version> to perform the upgrade.
If the MCP server is running when you update, it needs to be restarted to use the new version. Use the --port global option if the server is on a non-default port.
# Update to the latest version
opentabs update
# Then restart the MCP server if it was running
opentabs startPlugin Developer CLI
The opentabs-plugin CLI is for plugin developers. Install it with the plugin SDK:
npm install -g @opentabs-dev/plugin-toolsOr use it as a local dev dependency via npm run build inside your plugin project (the scaffolded project from @opentabs-dev/create-plugin includes it).
opentabs-plugin build
Build the current plugin directory — generates dist/tools.json and bundles the adapter IIFE.
opentabs-plugin build [options]| Option | Description |
|---|---|
-w, --watch | Watch dist/ for changes and rebuild automatically. |
Reads plugin metadata from package.json's opentabs field and serializes tool schemas from the plugin module. On success, notifies the running MCP server via POST /reload so the updated plugin is picked up immediately without a server restart.
# Build once
opentabs-plugin build
# Watch and rebuild on changes
opentabs-plugin build --watchopentabs-plugin inspect
Pretty-print the built plugin manifest (dist/tools.json). Requires opentabs-plugin build to have been run first.
opentabs-plugin inspect [options]| Option | Description |
|---|---|
--json | Output raw JSON instead of formatted summary. |
Displays the plugin name, version, SDK version, and tool count. For each tool, shows the display name, description, and input/output field names and types.
# Pretty-print the manifest
opentabs-plugin inspect
# Output raw JSON
opentabs-plugin inspect --jsonLast Updated: 10 Mar, 2026