> ## Documentation Index
> Fetch the complete documentation index at: https://alphacastio.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Claude Code

> Add the Alphacast MCP server to Claude Code — the hosted server over OAuth, or the local npm package via npx.

Claude Code supports both transports. Use the **hosted** server (no install, OAuth login) or the **local** npm package (spawned via `npx`).

## Hosted (remote, OAuth)

Add the remote server with the HTTP transport — no Node.js or API key required:

```bash theme={null}
claude mcp add --transport http alphacast https://mcp.alphacast.io/mcp
```

The first time you use it, authorize the connection: run `/mcp`, select `alphacast`, and choose **Authenticate**. Claude Code opens your browser to sign in with your Alphacast account and stores the token for you.

To remove it later:

```bash theme={null}
claude mcp remove alphacast
```

Add `--scope project` to share a checked-in `.mcp.json` with collaborators (each person still authenticates with their own Alphacast account — no secret is committed):

```json .mcp.json theme={null}
{
  "mcpServers": {
    "alphacast": {
      "type": "http",
      "url": "https://mcp.alphacast.io/mcp"
    }
  }
}
```

## Local (npm package)

Claude Code launches the Alphacast MCP server as a local subprocess via `npx`. You can add it with a single CLI command, or by editing the project-level `.mcp.json` file.

### CLI (recommended)

Run this from any directory inside your project. The server is added at the user scope by default — pass `--scope project` to share it with collaborators via a checked-in `.mcp.json`.

```bash theme={null}
claude mcp add alphacast -e ALPHACAST_API_KEY=YOUR_API_KEY -- npx -y @alphacast/mcp
```

To remove it later:

```bash theme={null}
claude mcp remove alphacast
```

To list configured servers and their status:

```bash theme={null}
claude mcp list
```

### `.mcp.json` (project-scoped, checked into the repo)

If you want the server available to anyone who clones the project, create or edit `.mcp.json` at the repo root:

```json .mcp.json theme={null}
{
  "mcpServers": {
    "alphacast": {
      "command": "npx",
      "args": ["-y", "@alphacast/mcp"],
      "env": {
        "ALPHACAST_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}
```

<Warning>
  Do **not** commit a real API key to a project-scoped `.mcp.json`. Use an environment variable reference (e.g. `"ALPHACAST_API_KEY": "${ALPHACAST_API_KEY}"`) and document the variable in your project README.
</Warning>

## Verify

Open a new Claude Code session and run:

```
/mcp
```

The `alphacast` server should appear with 32 tools and a green `connected` status. If it shows red, run `claude mcp list` to inspect the configured command and environment.

Try a prompt that hits a read-only tool to confirm the connection end-to-end:

> "Use the alphacast MCP to list my repositories."
