# Connect an AI Assistant

Set up Suger MCP Server in your preferred AI assistant or code editor.

---

This guide walks you through connecting the Suger MCP Server to your preferred AI assistant or code editor. Setup takes under a minute — you just need the server URL and an OAuth login.

**MCP Server URL:** `https://apiv2.suger.cloud/mcp`

## Prerequisites

- A Suger account on any pricing plan
- An AI assistant or code editor that supports the Model Context Protocol (MCP)

## Claude

### Claude Desktop

1. Open **Settings** and go to **Customize** > **Connectors**
2. Click **Add custom connector**
3. Enter the following:
   - **Name:** Suger
   - **Remote MCP server URL:** `https://apiv2.suger.cloud/mcp`
4. Click **Add**, then complete the OAuth login when prompted

> Custom connectors are available on every plan (Free is limited to one connector).

### Claude Desktop (config file)

If you'd rather configure the server through a local config file:

1. Open Claude Desktop settings > **Developer** > **Edit Config**
2. Add the following to `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "suger": {
 "url": "https://apiv2.suger.cloud/mcp"
    }
  }
}
```

3. Restart Claude Desktop

### Claude Code

```bash
claude mcp add --transport http suger https://apiv2.suger.cloud/mcp
```

Then run `/mcp` within a Claude Code session to complete authentication.

## Cursor

Open Cursor Settings > **MCP** > **Add new MCP server**, then enter:

- **Name:** Suger
- **Type:** HTTP
- **URL:** `https://apiv2.suger.cloud/mcp`

Alternatively, add this to `.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "suger": {
 "url": "https://apiv2.suger.cloud/mcp"
    }
  }
}
```

## VS Code (GitHub Copilot)

Run in your terminal:

```bash
code --add-mcp '{"type":"http","name":"suger","url":"https://apiv2.suger.cloud/mcp"}'
```

Then open the MCP panel in VS Code and start the Suger server.

## Windsurf

Open Settings (`Ctrl+,` / `Cmd+,`) > **MCP Servers**, then add:

```json
{
  "mcpServers": {
    "suger": {
 "serverUrl": "https://apiv2.suger.cloud/mcp"
    }
  }
}
```

## ChatGPT

1. Go to **Settings** > **Apps**
2. Search for **Suger**
3. Click **Connect** and authorize access to your Suger workspace

## Other Clients

Any MCP-compatible client can connect. Use the standard configuration:

```json
{
  "mcpServers": {
    "suger": {
 "url": "https://apiv2.suger.cloud/mcp"
    }
  }
}
```

If your client doesn't support remote MCP servers natively, use `mcp-remote` as a bridge:

```bash
npx -y mcp-remote https://apiv2.suger.cloud/mcp
```

## Verify Your Connection

After setup, try a few prompts to confirm everything is working:

```
"List my marketplace offers"
"Show recent entitlements"
"How many active buyers do I have?"
```

If the connection is successful, your assistant will prompt you to authenticate (first time only), then return live data from your Suger workspace.

## Troubleshooting

**Authentication fails**
- Ensure your Suger account has the required permissions for the operations you're attempting
- Confirm your MCP client supports OAuth 2.1 with PKCE
- Try disconnecting and reconnecting the integration

**Tools not appearing**
- Double-check the server URL is exactly `https://apiv2.suger.cloud/mcp`
- Restart your MCP client after any configuration change
- Verify network connectivity to `apiv2.suger.cloud`

**Rate limit errors**
- The MCP server shares rate limits with the Suger REST API
- Reduce the frequency of rapid queries or lower batch sizes
- Contact Suger support if throttling persists
