# MCP Server

Connect any AI assistant to your Rentalot account with the official [MCP server](https://github.com/Rentalot-ai/rentalot-mcp). 65 tools covering properties, contacts, showings, conversations, workflows, webhooks, and more.

## Setup

### Get Your API Key

1. Go to [Settings > API Keys](https://rentalot.ai/dash/settings?tab=api-keys)
2. Click **Create API Key**
3. Copy the key (starts with `ra_`)

### Claude Code

```bash
claude mcp add rentalot -e RENTALOT_API_KEY=ra_your_key -- npx -y @rentalot/mcp-server
```

### Codex (OpenAI)

```bash
codex mcp add --env RENTALOT_API_KEY=ra_your_key -- npx -y @rentalot/mcp-server
```

### Gemini CLI

```bash
gemini mcp add --transport stdio rentalot -- npx -y @rentalot/mcp-server
```

### Claude Desktop / Cursor / Windsurf

All three use the same JSON format — just different file paths:

| Client | Config file |
|--------|-------------|
| Claude Desktop | `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) |
| Cursor | `.cursor/mcp.json` (project) or `~/.cursor/mcp.json` (global) |
| Windsurf | `~/.codeium/windsurf/mcp_config.json` |

```json
{
  "mcpServers": {
    "rentalot": {
      "command": "npx",
      "args": ["-y", "@rentalot/mcp-server"],
      "env": {
        "RENTALOT_API_KEY": "ra_your_key"
      }
    }
  }
}
```

### OpenCode

Add to `~/.config/opencode/opencode.json`:

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "rentalot": {
      "type": "local",
      "command": ["npx", "-y", "@rentalot/mcp-server"],
      "environment": { "RENTALOT_API_KEY": "ra_your_key" },
      "enabled": true
    }
  }
}
```

## Authentication

You can provide your API key in two ways. Environment variables take priority over the config file.

**Option A: Config file (recommended)**

Save your key once and every MCP client picks it up automatically:

```bash
mkdir -p ~/.config/rentalot
cat > ~/.config/rentalot/config.yaml << 'EOF'
api_key: ra_your_key
EOF
chmod 600 ~/.config/rentalot/config.yaml
```

Then register the server without any env var:

```bash
claude mcp add rentalot -- npx -y @rentalot/mcp-server
```

**Option B: Environment variable**

Pass `RENTALOT_API_KEY` in your MCP client config (shown in the setup examples above). This overrides the config file.

**Resolution order:** `RENTALOT_API_KEY` env var > `api_key` in config file

## Tools (65)

| Resource | Tools | Tier |
|----------|-------|------|
| Properties (5) | `list`, `get`, `create`, `update`, `delete` | Read: Starter+ / Write: Pro+ |
| Contacts (5) | `list`, `get`, `create`, `update`, `delete` | Read: Starter+ / Write: Pro+ |
| Showings (6) | `list`, `get`, `create`, `update`, `delete`, `check_availability` | Read: Starter+ / Write: Pro+ |
| Events (1) | `list` | Starter+ |
| Conversations (4) | `list`, `get`, `search`, `list_messages` | Starter+ |
| Messages (1) | `send` | Pro+ |
| Drafts (6) | `list`, `get`, `create`, `update`, `send`, `delete` | Read: Starter+ / Write: Pro+ |
| Follow-ups (4) | `list`, `get`, `create`, `delete` | Read: Starter+ / Write: Pro+ |
| Workflows (8) | `list`, `get`, `create`, `update`, `delete`, `trigger_run`, `list_runs`, `get_run` | Read: Starter+ / Write: Pro+ |
| Webhooks (7) | `list`, `create`, `get`, `update`, `delete`, `test`, `rotate_secret` | Pro+ |
| Settings (4) | `get`, `update`, `get_followup_settings`, `update_followup_settings` | Read: Starter+ / Write: Pro+ |
| Property Images (9) | `list`, `presign_upload`, `confirm_upload`, `delete`, `reorder`, `presign_batch`, `confirm_batch`, `import`, `get_import_job` | Read: Starter+ / Write: Pro+ |
| Sessions (3) | `list`, `get`, `review` | Read: Starter+ / Write: Pro+ |
| Bulk Import (2) | `bulk_create`, `get_import_job` | Pro+ |

## Agent Skill

Install the bundled [Agent Skill](https://agentskills.io) so your coding agent knows all 65 tools and common workflows:

```bash
npx skills add ariel-frischer/rentalot-mcp
```

See the [GitHub README](https://github.com/Rentalot-ai/rentalot-mcp) for manual install instructions and the detailed API skill.
