# Authentication

> Create an API key for an MCP server, send it in the Authorization header, and keep it secret, regenerate it or revoke it.

Every request to the developer API carries an **API key**. The key belongs to one MCP server, and it reaches exactly the accounts that MCP server reaches, with the same permissions.

## Create a key

1. Open **MCP servers** and click the MCP server the key is for.
2. Find the **API key** section.
3. Click **Create API key**.
4. Copy the key from the **API key created** message. It's shown once and never again.

The key starts with `mcpk_`. Each MCP server has at most one key at a time.

> [!TIP]
> Make one MCP server per website or system, and tick only the accounts it needs under **Selected accounts**. Then each key reaches the least it can.

## Send the key

Put the key in the `Authorization` header of every request, after the word `Bearer`:

```http
Authorization: Bearer mcpk_…
```

For example:

```bash
curl https://app.plugsight.app/v1/tools \
  -H "Authorization: Bearer $PLUGSIGHT_API_KEY"
```

A request with no key, a key in the wrong format, or a key that's been replaced or revoked gets `401 unauthorized`. See [Errors](https://docs.plugsight.app/developers/errors.md).

## Keep it secret

Anyone with the key can read what its MCP server reaches, and, if changes are allowed, send or change things too.

- **Keep it on your server.** Store it in an environment variable or your platform's secret settings.
- **Never put it in web page code, a mobile app or a public repository.** The API sends no CORS headers, so browsers can't call it directly anyway.
- **To show data on your website**, have your web page ask your own server, and your server ask Plugsight. Send the page only the numbers it needs.
- **If you only need to read**, untick **Allow changes** on the MCP server. Then the key can't send or change anything, even with `"confirm": true`.

## Replace a key

1. Open the MCP server's page.
2. In **API key**, click **Regenerate key**.
3. Click **Replace key** to confirm.
4. Copy the new key and update it wherever you use it.

The old key stops working at once. Anything still using it is refused until you paste in the new one.

## Turn a key off

1. Open the MCP server's page.
2. In **API key**, click **Revoke key**.
3. Click **Revoke key** to confirm.

The key stops working at once, and the MCP server has no key until you create a new one.

> [!NOTE]
> Regenerating or revoking the key doesn't affect Claude, ChatGPT or other AI apps that signed in through the browser. They don't use the key.

## Plans

The developer API is on the **Pro** and **Agency** plans. With a valid key on the Free plan, every request gets `403 plan_required`. Upgrade under **Billing** in the app.

## Related articles

- [Calling tools](https://docs.plugsight.app/developers/calling-tools.md)
- [Errors](https://docs.plugsight.app/developers/errors.md)
- [Developer API overview](https://docs.plugsight.app/developers.md)

---

Web version: https://docs.plugsight.app/developers/authentication
