Skip to main content
Docs navigation

Authentication

How the CLI, MCP server, and skill connect to your WordPress site — and how permissions flow through.

NextWave authenticates to your site with a WordPress Application Password over HTTP Basic auth. The tools append /wp-json/nwp/v1 to your site URL and send your username and application password on every request. Whatever that user can do in WordPress, the tools can do — nothing more.

NextWave is self-hosted

There is no central NextWave key or account. You connect directly to your own WordPress install, and your credentials carry your own WordPress permissions. Revoking the application password in WP Admin instantly cuts off access.

Create an Application Password

  1. In WP Admin, open Users → Profile (your own profile, or another user's).
  2. Scroll to the Application Passwords section.
  3. Give it a recognizable name, e.g. nextwave-cli, and click Add New Application Password.
  4. Copy the generated password — shown as xxxx xxxx xxxx xxxx xxxx xxxx with spaces. It is displayed once; store it securely.

Environment variables

The three tools share one connection contract:

VariableWhat it is for
WORDPRESS_SITE_URLYour site's base URL; the tools append /wp-json/nwp/v1.
WORDPRESS_USERNAMEThe user the Application Password belongs to.
WORDPRESS_APP_PASSWORDThe WordPress Application Password (keep the spaces; quote it).
bash
export WORDPRESS_SITE_URL=https://members.example.com
export WORDPRESS_USERNAME=jane@example.com
export WORDPRESS_APP_PASSWORD="xxxx xxxx xxxx xxxx xxxx xxxx"

Resolution precedence is flags → environment → profile. Flags like --site, --user, and --profile override the environment, which overrides any named profile stored in ~/.nextwave/config.json. Use --profile to switch between saved sites without re-exporting.

Capabilities & roles

NextWave enforces access with WordPress capabilities. An application password inherits the full capability set of the user it belongs to — so a connection's reach is exactly that user's reach. A request for an operation the user lacks returns 403 rest_forbidden.

CapabilityGrantsTypical role
nwp_manage_membersCreate, edit, and delete membersAdministrator / membership manager
nwp_process_checkinsRecord member check-ins at venuesFront-desk / event staff
nwp_view_redemptionsRead benefit redemption historyStaff / reporting
nwp_manage_redemptionsRecord and edit redemptionsVenue manager
nwp_approve_redemptionsApprove or reject pending redemptionsManager / supervisor
nwp_manage_settingsChange plugin configurationAdministrator

Verify your connection

Run the doctor to check the site URL, credentials, and REST reachability in one shot:

bash
$ nwp doctor

Then confirm exactly who you're authenticated as:

bash
$ nwp whoami --output json

Rotation & hygiene

  • Revoke any application password from Users → Profile the moment it's no longer needed — it takes effect immediately.
  • Rotate by adding a new application password first, switching your tools over, then revoking the old one — zero downtime.
  • A password only ever carries that one user's capabilities; it cannot escalate.
  • Never commit credentials to source control or paste them into shared configs.
  • Always quote the password so the shell preserves its spaces.
  • Follow least privilege: create a dedicated user with only the capabilities the integration needs rather than reusing an admin login.

Hitting a 401 or rest_forbidden? See Troubleshooting to map the response to a fix.