# RevyOps MCP Server

Connect [Claude](https://claude.ai) to your [RevyOps](https://revyops.com) outbound campaign data using the [Model Context Protocol](https://modelcontextprotocol.io).

## Quick Start

### 1. Install `uv` (if you don't have it)

```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```

### 2. Get your API key

Log in to [RevyOps](https://app.revyops.com) and go to **Settings > API Keys** to create one.

### 3. Add to Claude Desktop

Open your Claude Desktop config file:

- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`

Add the following (merge into your existing config if you have other MCP servers):

```json
{
  "mcpServers": {
    "revyops": {
      "command": "uvx",
      "args": ["revyops-mcp"],
      "env": {
        "REVYOPS_API_KEYS": "RO-your-key-here"
      }
    }
  }
}
```

For multiple workspaces, comma-separate your keys:

```json
{
  "env": {
    "REVYOPS_API_KEYS": "RO-key-for-client-a, RO-key-for-client-b"
  }
}
```

### 4. Restart Claude Desktop

The RevyOps tools will appear automatically. Ask Claude things like:

- "Show me campaign performance for last month"
- "Which campaigns have the highest reply rate?"
- "Find contacts at acme.com"
- "What's our deliverability looking like?"

## Available Tools

| Tool | Description |
|------|-------------|
| `list_clients` | List available workspaces |
| `get_campaigns` | Campaign performance metrics |
| `get_campaign_drilldown` | Individual contacts/companies in a campaign |
| `get_email_thread` | Full email thread with a contact |
| `get_deliverability` | Sending domain health metrics |
| `get_campaign_stats` | High-level campaign statistics |
| `get_contacts_stats` | Contact-level aggregate stats |
| `get_variable_report_variables` | Available A/B tracking variables |
| `get_variable_report` | A/B test report by tracking variables |
| `add_campaign_note` | Add/update a campaign note |
| `archive_campaign` | Archive or unarchive a campaign |
| `search_contacts` | Search contacts by email, name, domain |
| `get_contact` | Full contact details |
| `update_contact` | Update contact fields |
| `search_companies` | Search companies by domain or name |
| `get_company` | Full company details |
| `update_company` | Update company fields |
| `search_emails` | Search email records |
| `mark_email_interested` | Flag an email as interested |

## Environment Variables

| Variable | Required | Description |
|----------|----------|-------------|
| `REVYOPS_API_KEYS` | Yes | Comma-separated API keys |
| `REVYOPS_API_URL` | No | API base URL (default: `https://app.revyops.com`) |
