# Claude Code

> Connect Claude Code to a running VibeCheck hub.

Start the shared hub outside Claude Code:

```bash
npx -y @wcgw/vibe-check-mcp@0.3.0 hub
```

Then register the stdio bridge:

```bash
claude mcp add vibe-check -- npx -y @wcgw/vibe-check-mcp@0.3.0 connect
```

Everything after `--` is the command Claude Code spawns. `connect` talks to the
existing hub and never tries to bind port 4200.

## Scopes

```bash
# Commit the MCP config with this project
claude mcp add --scope project vibe-check -- npx -y @wcgw/vibe-check-mcp@0.3.0 connect

# Make the bridge available in every project
claude mcp add --scope user vibe-check -- npx -y @wcgw/vibe-check-mcp@0.3.0 connect
```

The hub is still a separate local process regardless of config scope.

## Verify the click round trip

```bash
claude mcp list
curl http://127.0.0.1:4200/api/health
```

Then ask Claude:

```text
List VibeCheck projects and watch my-storefront for an issue.
```

Wait for the widget to say **Agent connected**, then click **Send to agent** on
an issue. Claude's `watch_for_issue` result should contain that issue.

**One watcher per project**

  If another Claude session already owns the project, this session receives
  `lease-conflict`. Continue in the original session or call `release_project`
  there before switching.
