Skip to main content

Generate an API Token

To connect an AI assistant to the Widget Builder, you need to generate an MCP API token. This token authenticates the AI agent and determines what permissions it has.

Prerequisites

  • You are logged in to the Widget Builder App
  • Your account is connected to a Staffbase platform

Steps

1. Open your profile

Click on your user avatar in the top-right corner of the Widget Builder app to open the user profile page.

2. Find the MCP API Tokens section

Scroll down to the MCP API Tokens section on the profile page. This section lists all your existing tokens and allows you to create new ones.

3. Create a new token

Enter a descriptive name for the token (e.g., "Claude Desktop", "Cursor IDE", or "CI Pipeline") and click Generate.

4. Copy the token

Important — Copy the token now!

The full token is only displayed once after creation. It cannot be retrieved later. Make sure to copy it before closing the dialog.

After generation, you will see:

  • The full API token starting with wb_ — copy this immediately
  • A ready-to-use MCP client configuration snippet you can paste into your AI tool's config file

5. Store the token securely

Treat this token like a password. Store it in a secure location such as:

  • Your MCP client's configuration file
  • A password manager
  • An environment variable

Token details

PropertyDescription
PrefixAll tokens start with wb_ for easy identification
PermissionsBy default, tokens have full access: widgets:read, widgets:write, and render
ExpirationTokens do not expire by default, but can be configured with an expiration date
LimitUp to 25 active tokens per account

Revoking a token

If a token is compromised or no longer needed:

  1. Go to the MCP API Tokens section in your profile
  2. Click the Revoke button next to the token
  3. Confirm the revocation
warning

Revoking a token is permanent and takes effect immediately. Any MCP client using the revoked token will lose access.

Next steps

Now that you have a token, configure your MCP client to start using it.