# Connecting Claude Code

> Connect Claude Code (terminal) to ZopNight's MCP server to query your cloud infrastructure through natural language in your terminal.

Source: https://zop.dev/developer-docs/integrations/mcp-server/claude-code

---

Connect **Claude Code** (terminal) to ZopNight's MCP server to query your cloud infrastructure through natural language in your terminal.

**Info**

Make sure you have completed the [prerequisites](https://zop.dev/docs/integrations/mcp-server/overview) — enable MCP for your organisation and create a Personal Access Token.

## Setup

Open your terminal and run the following command.

```bash
claude mcp add zopnight MCP_SERVER_URL -t http -H "Authorization: Bearer MCP_PAT"
```

### Note

- Replace `MCP_SERVER_URL` with the Server URL shown on your Organisation Settings page, or on the Developer Settings page where you create your token. Copying it from the app means you always get the right host for your environment.
- Replace `MCP_PAT` with your own personal access token (it starts `zn_pat_`). Paste it plainly, with no angle brackets around it.

The `-t http` flag tells Claude Code to use Streamable HTTP transport, not SSE.

**Warning**

Without `-t http`, Claude Code treats the URL as a command to run rather than a server to call. Note that when an `Authorization` header is configured and the server rejects it, Claude Code reports the connection as failed rather than falling back to OAuth, so check the token first.

## Verify Connection

Start a new Claude Code session and ask:

```text
List my organisations
```

If configured correctly, it will call the `list_organisations` tool and show your organisations.
