# Connect Claude Code to aicharged.io

> One command adds aicharged.io as a remote MCP server (HTTP) to Claude Code — for this project or for all of them.

## At a glance

| Kind | Sign-in | Platforms | Status | Verified |
|---|---|---|---|---|
| Terminal agents (CLI) | API key (Bearer), OAuth sign-in, Local bridge (stdio) | macOS, Linux, Windows | works today | 2026-10-22 |

- MCP: `https://aicharged.io/api/v1/mcp`
- Docs: https://code.claude.com/docs/en/mcp

## Recipe

One command:

```sh
claude mcp add --transport http aicharged https://aicharged.io/api/v1/mcp --header "Authorization: Bearer <API_KEY>"
```

For all your projects (--scope user):

```sh
claude mcp add --transport http aicharged --scope user https://aicharged.io/api/v1/mcp --header "Authorization: Bearer <API_KEY>"
```

Shared project file (`.mcp.json`):

```json
{
  "mcpServers": {
    "aicharged": {
      "type": "http",
      "url": "https://aicharged.io/api/v1/mcp",
      "headers": {
        "Authorization": "Bearer ${AICHARGED_API_KEY}"
      }
    }
  }
}
```

Do not name the variable ANTHROPIC_API_KEY or ANTHROPIC_AUTH_TOKEN — those expand to empty in headers.

Through the aicharged CLI (stdio) — the token never sits in a config file — needs the aicharged CLI:

```sh
claude mcp add aicharged -- aicharged mcp serve
```

Without a key, sign in with OAuth (then run /mcp in Claude Code):

```sh
claude mcp add --transport http aicharged https://aicharged.io/api/v1/mcp
```

[Client documentation](https://code.claude.com/docs/en/mcp)

## Authentication

- Send `Authorization: Bearer <API_KEY>` with every request. Create a key at https://aicharged.io/admin/account/api-keys.
- OAuth 2.1 (PKCE S256) is available for clients that cannot send a static key (ChatGPT).
- Without a key the endpoint answers 401 with a WWW-Authenticate header that points to https://aicharged.io/.well-known/oauth-protected-resource.

All 51 clients: https://aicharged.io/connect.md

HTML version: https://aicharged.io/connect/claude-code
