# Claude Code

Source: https://openpanel.sh/docs/ai/claude-code

Add OpenPanel's MCP server and skills to Claude Code.

## Add the MCP server [#add-the-mcp-server]

In a terminal:

```sh
claude mcp add --transport http openpanel https://openpanel.sh/api/mcp
```

Then, inside Claude Code, run `/mcp`, choose **openpanel** and sign in. Your browser opens OpenPanel; sign in if you are not, check the tool's name, and choose **Allow**. Claude Code keeps the sign-in and renews it on its own.

To have OpenPanel in every project, add `--scope user`. To share the setting with your team through the repository, add `--scope project`: it is written to `.mcp.json`, and each person signs in with their own account.

### With an API key instead [#with-an-api-key-instead]

For a machine with no browser, or to limit what the agent may do, make an [API key](/docs/api/authentication#api-keys) with the scope it needs (signed in with the CLI: `openpanel keys create --name "Claude Code" --scope deploy`), and pass it as a header:

```sh
claude mcp add --transport http openpanel https://openpanel.sh/api/mcp \
  --header "Authorization: Bearer $OPENPANEL_TOKEN"
```

Keep the key out of files you commit.

### Check it [#check-it]

`/mcp` shows a check mark next to **openpanel**. Ask Claude "Which OpenPanel projects do I have?": it calls `projects_list`.

## Add the skills [#add-the-skills]

OpenPanel's [skills](/docs/ai/skills) teach Claude the common jobs end to end. Copy them into your skills folder:

```sh
npx -y https://cdn.openpanel.sh/cli/0.2.0/openpanel-cli-0.2.0.tgz skills install
```

This copies them into `~/.claude/skills`; `--dir` names another folder. With the CLI installed, `openpanel skills install` does the same, and `openpanel skills` lists them. The skills ship inside the CLI's package, which OpenPanel serves from its own address rather than npm's registry. See [Install](/docs/cli#install).

Claude Code loads them in the next session and uses one when your request matches it, such as "deploy this repository to OpenPanel".

## Without MCP [#without-mcp]

Claude Code can also drive the [CLI](/docs/cli). Install it with `npm install -g https://cdn.openpanel.sh/cli/0.2.0/openpanel-cli-0.2.0.tgz` ([Install](/docs/cli#install)), run `openpanel login` yourself, and the skills work with the CLI's commands.