# Connect an AI assistant

By the end, your assistant knows the Szenera tools, works in your organization with the permissions you chose, and answers the question of who it is in Szenera.

> **Type:** guide
> **For:** Anyone who connects Claude, ChatGPT, Cursor, VS Code, or another client that speaks the Model Context Protocol
> **Prerequisite:** an account in your organization, and either a client that can sign in through OAuth or an API key `ak_…` with the permissions of the tools you want to use
> **Where:** the settings of your assistant

## The address

| What | Value |
|---|---|
| Address | `https://mcp.<domain>/mcp`, where `<domain>` is the domain of your environment, for example `https://mcp.szenera.com/mcp` |
| Transport | Streamable HTTP |
| Sign-in | OAuth 2.1 with consent, or `Authorization: Bearer ak_…` |

## Choose how to sign in

| Way | Good for | What you enter |
|---|---|---|
| **Sign in with OAuth** | Assistants with a sign-in flow, such as Claude, ChatGPT, Claude Code, and VS Code | Only the address. The assistant registers itself, opens the Szenera sign-in in the browser, and you decide on the consent page what it may do. |
| **API key** | Clients without a sign-in flow, automation, and shared machines | The address and the header `Authorization: Bearer ak_…` |

With OAuth, the connection acts in your name and never gets more than your account has. With an API key, it gets exactly the permissions of the key. Which permissions the tools need is under [Permissions and consent](/mcp/permissions).

## Steps

### Claude (claude.ai and the desktop app)

1. Open the settings in Claude under **Connectors** and add a custom connector. Whether you can depends on your Claude plan.
2. Enter a name such as "Szenera" and the address.
3. Connect it. Your browser opens the Szenera sign-in and then the page **Allow access?**
4. Check the areas, switch off what the assistant should not get, and click **Allow**.

### Claude Code

Add the server once and sign in from within Claude Code:

```bash
claude mcp add --transport http szenera https://mcp.szenera.com/mcp
```

Then run `/mcp` in Claude Code, choose `szenera`, and sign in. With an API key instead, pass the header when you add the server:

```bash
claude mcp add --transport http szenera https://mcp.szenera.com/mcp \
  --header "Authorization: Bearer ak_…"
```

### ChatGPT

Add a custom connector with the address, if your ChatGPT plan offers custom connectors, and choose OAuth as the authentication. ChatGPT registers itself and opens the Szenera sign-in. Confirm the consent page as for Claude.

### Cursor

Enter the server in `.cursor/mcp.json` in your project, or in `~/.cursor/mcp.json` for all projects:

```json
{
  "mcpServers": {
    "szenera": {
      "url": "https://mcp.szenera.com/mcp",
      "headers": { "Authorization": "Bearer ak_…" }
    }
  }
}
```

### VS Code with GitHub Copilot

Enter the server in `.vscode/mcp.json`. The input field asks for the key when the server starts, so it never sits in the file:

```json
{
  "inputs": [
    { "type": "promptString", "id": "szenera-key", "description": "Szenera API key", "password": true }
  ],
  "servers": {
    "szenera": {
      "type": "http",
      "url": "https://mcp.szenera.com/mcp",
      "headers": { "Authorization": "Bearer ${input:szenera-key}" }
    }
  }
}
```

Without the `headers` line, VS Code signs in through OAuth instead.

## Check the result

Ask your assistant: "Who am I in Szenera?" It calls `whoami` and answers with your account, your organization, and the number of permissions the connection carries. If it names permissions under `missingPermissions`, the tools behind them will fail, see [Permissions and consent](/mcp/permissions#when-a-permission-is-missing).

Then ask something that only reads, such as "Which displays have been offline since yesterday?" A tool that changes something always shows you a preview first.

## Disconnect

| Way | How |
|---|---|
| OAuth | In the portal under **Settings › My account › Security**, card **Connected applications**, click **Revoke** in the row of the assistant. It loses every grant at once. |
| API key | Revoke the key under **Settings › For developers › API keys**. Every client that uses it loses access. |

Removing the server in the assistant alone ends the connection only on that side. The grant in Szenera stays until you revoke it.

## If something goes wrong

| Symptom | Meaning | Solution |
|---|---|---|
| The assistant asks you to sign in again and again | The access token has expired or the grant was revoked. | Sign in again. An access token is valid for one hour and is renewed by the client. |
| A tool answers `permission_denied` | The consent or the key lacks the permission. | Allow the area again, or use a key with the permission, see [Permissions and consent](/mcp/permissions). |
| The client can't reach the server | The address is wrong or the server isn't running in your environment. | Check the address and that it ends in `/mcp`. |

More errors and the limits of the server are under [When the assistant can't connect or a tool fails](/mcp/troubleshooting).

## Related

- [What can an AI assistant do with Szenera?](/mcp/about-mcp)
- [Delegated access with OAuth 2.1](/api/oauth-delegated-access)
- [Create an API key](/getting-started/create-api-key)
