Connect in one click

One click OAuth setup for Claude, ChatGPT, Claude Code, Cursor, VS Code, Windsurf and Gemini CLI.

One click connect uses OAuth, so there is no key to copy or store. Your app finds Drefly's sign in details on its own, registers itself and opens a Drefly Ads page where you approve it.

How it works

  1. You add the server URL in your app. The Agents page has the URL, a copy button and install buttons.
  2. Your app opens Drefly Ads. Sign in if you aren't already.
  3. Drefly shows the app's name, the address it returns you to and what it wants to do. Known apps such as claude.ai and chatgpt.com are marked as a verified app address.
  4. Pick what it can do and how long access lasts (7, 30 or 90 days), then press Allow.
  5. You are sent back to the app, connected. It shows up under Connected agents.
Only press Allow if you just started connecting that app yourself.

If a Drefly Ads connection page shows up that you didn't expect, press Cancel.

A one click connection can write right away. Connecting the same app again replaces its old connection. You get a notification and an email every time an app connects.

Claude

  1. Open Claude settings, then Connectors, and choose Add custom connector.
  2. Name it Drefly Ads and paste https://ads.drefly.pro/api/ads/mcp.
  3. Click Connect, sign in to Drefly Ads if asked, then press Allow.

ChatGPT

  1. Open Settings, then Apps and connectors. Turn on Developer mode under Advanced if you haven't.
  2. Choose Create, name it Drefly Ads, paste the server URL and set authentication to OAuth.
  3. Click Create, then press Allow on the Drefly Ads page that opens.

Claude Code

Shell
claude mcp add --transport http drefly-ads https://ads.drefly.pro/api/ads/mcp

Start Claude Code, run /mcp, choose Authenticate on drefly-ads and press Allow.

Cursor

Click Add to Cursor on the Agents page, or add this to ~/.cursor/mcp.json and click Connect next to drefly-ads.

mcp.json
{
  "mcpServers": {
    "drefly-ads": {
      "url": "https://ads.drefly.pro/api/ads/mcp"
    }
  }
}

VS Code

Click Install in VS Code on the Agents page, or add this to .vscode/mcp.json. VS Code asks you to sign in the first time the server starts.

mcp.json
{
  "servers": {
    "drefly-ads": {
      "type": "http",
      "url": "https://ads.drefly.pro/api/ads/mcp"
    }
  }
}

Windsurf

Add this to ~/.codeium/windsurf/mcp_config.json and refresh the MCP servers list.

mcp_config.json
{
  "mcpServers": {
    "drefly-ads": {
      "serverUrl": "https://ads.drefly.pro/api/ads/mcp"
    }
  }
}

Gemini CLI

Add this to ~/.gemini/settings.json, restart Gemini CLI and run /mcp auth drefly-ads.

settings.json
{
  "mcpServers": {
    "drefly-ads": {
      "httpUrl": "https://ads.drefly.pro/api/ads/mcp"
    }
  }
}

Other clients

Any MCP client with OAuth support works with only the server URL. Building your own? See the OAuth reference.

Next steps

Was this page helpful?