> ## Documentation Index
> Fetch the complete documentation index at: https://docs.perfai.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Claude

> Connect the Perfai Cloud MCP server to Claude (desktop or web) as a custom connector.

Perfai Cloud connects as a remote server, authenticated with a **Perfai API key** in a custom header.

> [!NOTE]
>
> Looking for Claude Code (the terminal/IDE coding agent) instead? See its [separate setup page](https://docs.perfai.ai/docs/mcp/claude-code.md) — different product, different connector flow.

***

## Get an API key

1. Log into [cloud.perfai.ai](https://cloud.perfai.ai).
2. In the left sidebar, click **API Keys**.
3. Click **+ Create key**.
4. **Name**: something that identifies where it's used, e.g. `Claude`.
5. **Expires after (days)**: optional — leave blank for the 90-day default, or set up to 365.
6. Click **Create key** and copy the value immediately — it's shown once and never shown again. Store it like a password.

***

## Installation

This is a two-step dialog — fill in one screen, click **Continue**, then the next screen appears.

1. Open **Settings** in Claude, then go to **Connectors**.
2. Click **+ Add** (top right).
3. The **"Add custom connector"** dialog opens. Fill in:
   * **Name**: `perfai-mcp`
   * **MCP server URL**: `https://mcp-server.perfai.ai/mcp`
4. Click **Continue**.
5. On the next screen, under **Authentication**, select **No sign-in**
6. Under **Request headers**, click **+ Add header** if one isn't already there. It adds a row with a header-name dropdown and a **Value** field:
   * Header name dropdown: select **authorization**
   * **Value**: type the full scheme and key together — `Bearer pfk_xxxxxxxxxxxx_...` (your key from above). The field's own hint confirms this: "Include the auth scheme in the value... the value is sent exactly as entered."
   * Leave **Required** checked.
7. Click **Add**. Back in the Connectors list, **perfai-mcp** should appear with a checkmark under Status.

> [!NOTE]
>
> **"Sign in now"** (Claude's default, auto-detected) tries a real OAuth handshake and will fail here — Perfai Cloud doesn't implement that discovery flow. **No sign-in** is correct; the Authorization header does the authenticating instead.

***

## Confirm you're signed in

The API key signs you in, there is no separate login step. Every tool call runs as the user who created the key, with that user's organizations and role. In a chat, ask:

```
What's my Perfai auth status?
```

It answers with the key's id (`pfk_xxxxxxxxxxxx_…`), never the secret. If a tool call fails with `401`, the key has expired or been revoked — [create a new one](https://docs.perfai.ai/docs/mcp/overview.md#create-an-api-key) and update the connector's header.

***

## Use it

Tell Claude:

```
perfai test https://your-app.example.com
```

Registers the app and runs a security test.

```
perfai list issues
```

Shows what it found.

```
perfai fix
```

Fixes everything, prioritized by severity.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.