# Connect Claude Code

**Before you start:** install Claude Code 2.1.186 or later (`claude --version`). AVA Asia must allow your email. See [Sign in](https://ai.solarsens.co/docs/installation/sign-in.md).

1. Add the server from any directory:

   ```
   claude mcp add --transport http solarsens https://ops.solarsens.co/mcp
   ```

   [![A terminal running the claude mcp add command for the SolarSENS server](/assets/images/mcp-add-command-b1b153e42116996ccee0b8f958d237e9.png)](https://ai.solarsens.co/assets/images/mcp-add-command-b1b153e42116996ccee0b8f958d237e9.png)

2. Start a Claude Code session. Run `/mcp`.

3. Select `solarsens`. Sign in in your browser.

4. Check the connection:

   ```
   claude mcp list
   ```

   The list shows `✔ Connected` after sign-in.

Without a local browser (for example, over SSH), Claude Code prints an authorization URL. Open it on another machine, sign in, then paste the redirect URL back at the prompt. You can also start sign-in with `claude mcp login solarsens`.

## First question

```
List the SolarSENS Plants I can access. Show the name, code, and timezone of each Plant.
```

## Setup errors

| What you see                   | What to do                                                            |
| ------------------------------ | --------------------------------------------------------------------- |
| `! Needs authentication`       | Run `claude mcp login solarsens`.                                     |
| `✘ Failed to connect`          | Run `claude mcp get solarsens`. Check the URL.                        |
| `needs additional permissions` | Run `claude mcp logout solarsens`, then `claude mcp login solarsens`. |
| No Plants appear               | Send an email to <support@solarsens.co>.                              |

For other problems, see [Connection help](https://ai.solarsens.co/docs/troubleshooting.md).
