# Claude Code

Add the Load Factor MCP server to Claude Code with one command and sign in from the /mcp menu.

Claude Code can use Load Factor while it works in your terminal: pull queue data into a script, build a table of developers, or check a project before you write about it. This page shows how to add the server, sign in, choose who the connection is for, and manage it.

## Step 1: Add the server

Run this once in a terminal:

```bash
claude mcp add --transport http --scope user load-factor https://mcp.loadfactorenergy.com/mcp
```

`--scope user` makes Load Factor available in all your projects. The other scopes are described [below](#choose-a-scope).

## Step 2: Check that it is listed

```bash
claude mcp list
```

Load Factor shows as `load-factor: https://mcp.loadfactorenergy.com/mcp (HTTP) - ! Needs authentication`. That is expected until you sign in.

## Step 3: Sign in

1. Start Claude Code and run `/mcp`.
2. Choose **load-factor**, then **Authenticate**. Your browser opens. (From a terminal, `claude mcp login load-factor` does the same; add `--no-browser` on a remote machine to get the address to open yourself.)
3. On the Load Factor page, check that the app and the return address are what you expect (Claude Code and a `localhost` address) and click **Allow Access**.
4. In Google's account picker, choose the account whose email address is your Load Factor login and allow Load Factor to see your email address.

If the browser does not open, copy the address Claude Code prints and open it yourself. Claude Code stores the sign-in and refreshes it on its own.

Video: Add Load Factor to Claude Code (19 s, no sound), https://loadfactorenergy.com/static/video/docs/claude-code.mp4. What it shows:

- Step 1: In a terminal, run: claude mcp add --transport http --scope user load-factor https://mcp.loadfactorenergy.com/mcp. Claude Code answers: Added HTTP MCP server load-factor with URL: https://mcp.loadfactorenergy.com/mcp to user config.
- Step 2: Run: claude mcp list. Claude Code checks the server.
- Step 2: The list shows load-factor: https://mcp.loadfactorenergy.com/mcp (HTTP), Needs authentication. That is expected until you sign in.
- Step 3: Sign in from Claude Code. Start Claude Code, run /mcp, choose load-factor, then Authenticate.

> [!NOTE]
> MCP access must be switched on for your Load Factor account first. If sign-in is refused, see [Troubleshooting](https://loadfactorenergy.com/developers/mcp/troubleshooting).

## Choose a scope

| Scope | Available in | Shared with your team | Stored in |
|---|---|---|---|
| `local` (the default) | The current project only | No | `~/.claude.json` |
| `project` | The current project | Yes, through the repository | `.mcp.json` in the project root |
| `user` | All your projects | No | `~/.claude.json` |

```bash title="user"
claude mcp add --transport http --scope user load-factor https://mcp.loadfactorenergy.com/mcp
```
```bash title="project"
claude mcp add --transport http --scope project load-factor https://mcp.loadfactorenergy.com/mcp
```
```bash title="local"
claude mcp add --transport http load-factor https://mcp.loadfactorenergy.com/mcp
```

With `project` scope, Claude Code writes the server to `.mcp.json`, which you can commit:

```json title=".mcp.json"
{
  "mcpServers": {
    "load-factor": {
      "type": "http",
      "url": "https://mcp.loadfactorenergy.com/mcp"
    }
  }
}
```

The file holds no credentials. Everyone who uses it signs in with their own Google account and gets their own Load Factor access. Claude Code asks each person to approve a project's servers the first time it loads them.

## Manage the connection

```bash
claude mcp list                # every configured server and its status
claude mcp get load-factor     # details for Load Factor
claude mcp login load-factor   # sign in, or sign in again, from the terminal
claude mcp logout load-factor  # forget the Load Factor sign-in
claude mcp remove load-factor  # remove the server (add --scope user if you added it with user scope)
```

Inside Claude Code, `/mcp` also offers **Reconnect** and **Clear authentication** for Load Factor.

## Things to ask

- Using Load Factor, build a Markdown table of the 10 developers with the most solar projects in the MISO queue and save it as miso-solar-developers.md.
- Using Load Factor, look up queue project J1229 and summarize who is developing it, with the evidence and links.
- Using Load Factor, list battery storage projects in the CAISO queue over 100 MW where two sources agree on the developer, and summarise them in a short table.

Claude Code runs the tools on your behalf and can then write files from the results; each answer still follows your Load Factor permissions.
