Install from npm, run patchops login, and use the shared MCP endpoint without sharing browser cookies.
PatchOps CLI
Install @patchops/cli from npm, authenticate through PatchOps OAuth with patchops login, or use a direct instance URL plus a personal access token when you want fixed routing.
Pair a direct instance URL with a personal access token when you want fixed routing for CI or local automation.
Use connector + method + args from the CLI once you know exactly what you want to run.
Install + login
@patchops/cli
Terminal
npm install -g @patchops/cli
patchops login
patchops tools listThis is the default path for local CLI access against the shared PatchOps MCP surface.
Direct instance + PAT
PAT configuration
Terminal
patchops config set-url https://patchops.ai/api/mcp/<instanceId>
patchops config set-token po_pat_...
patchops tools listUse this when you want fixed instance routing, headless auth, or CI-friendly local automation.
Direct invoke
Once you know the connector and method you want, the CLI can skip MCP ceremony and hit the direct PatchOps invoke API for deterministic automation.
Invoke a connector method
Terminal
patchops invoke welldatabase getOperatorWells --input '{
"county": "Loving",
"operator": "Mitsui"
}'Auth model
OAuth sessions and personal access tokens are both revocable, so local CLI access stays separate from browser sessions and connector secrets.
SDK pairing
Use the CLI for shell workflows and the SDKs for embedded apps, desktop tools, or services that need first-party OAuth and MCP helpers.
Best fit
The CLI is best for local development, CI, repeatable automation, and fast debugging against your PatchOps-backed connectors.