# Carbon Voice + Claude Code

## Overview

Carbon Voice is the [best interface](../concepts/why-carbonvoice.md) for talking to AI agents on the go.

[Claude Code](https://claude.ai/code) is Anthropic's AI coding assistant that helps you build, debug, and understand code directly in your terminal.

Connect Carbon Voice and Claude Code so you can **talk** to your Claude Code sessions like you would a chief of staff or other team member.

[![Demo: Carbon Voice + Claude Code](../../config/images/claude-cv-demo-thumbnail.png)](https://www.loom.com/share/a6501c10a1f94518b825f3140f5298c4)

## Features of this Integration

- **Talk to it with swipe of a button** — Record voice messages to send to Claude Code sessions instantly while on-the-go with the mobile app
- **Talk to it with a desktop shortcut** — Start talking to your agent with a single keyboard shortcut
- **Send even when agent is offline and recovers** — Your messages are queued and delivered when you next open your Claude Code session
- **Code-aware conversations** — Claude Code understands your codebase and can make actual changes

NOTE: Claude Code Channels are currently in preview. You'll need to enable them in your Claude Code settings.

## Get Carbon Voice

Download the Carbon Voice app: https://getcarbon.app/download

## Create an Agent and Get PAT

1. Go to [developer.carbonvoice.app](https://developer.carbonvoice.app)
2. Create an agent
3. Generate a Personal Access Token (PAT) for that agent
4. Copy the PAT - you'll need it for configuration

## Configure .mcp.json

Add to your project's `.mcp.json`:

```json
{
  "mcpServers": {
    "cv-claude-channel": {
      "command": "npx",
      "args": ["@carbonvoice/cv-claude-channel"],
      "env": {
        "CV_PAT": "your-carbon-voice-pat"
      }
    }
  }
}
```

## Start Claude Code with Channels Enabled

```bash
claude --dangerously-load-development-channels server:cv-claude-channel
```
Note: Claude Channels are currently in research preview.  This is required to accept permissions.

⚠️ You'll need to approve the send_message to get it to respond through Carbon Voice.

## Optional: Configure Sender Gating

To restrict which Carbon Voice users can send messages, add their user IDs:

```json
{
  "mcpServers": {
    "cv-claude-channel": {
      "command": "npx",
      "args": ["@carbonvoice/cv-claude-channel"],
      "env": {
        "CV_PAT": "your-carbon-voice-pat",
        "CV_ALLOWED_SENDERS": "user-id-1,user-id-2,user-id-3"
      }
    }
  }
}
```

Ignored sender attempts will be logged to `~/.claude/channels/cv/ignored-senders.log` by default.

## Security Notes

- Your Carbon Voice PAT is stored in `.mcp.json` which is gitignored
- Never commit your PAT to version control
- Use sender gating to restrict who can send messages
- Channels carry prompt injection risks - only enable with trusted sources
