Manage Affiliate Smart Links with AI: Claude Desktop & Claude Code MCP Setup Guide

Andrew Pierce ·
MCP Claude Desktop Claude Code smart links AI affiliate link automation affiliate marketing setup guide

Manage Affiliate Smart Links with AI: Claude Desktop & Claude Code MCP Setup Guide

Youfiliate’s MCP server lets you create, manage, and analyze geo-targeted affiliate smart links directly from Claude Desktop or Claude Code using plain English. Type “create geo-targeted links for everything in my latest video description” and get back a dozen youfil.to smart links in 30 seconds — no dashboard switching, no manual link creation, no copy-pasting between tabs.

Youfiliate, a flat-rate smart link platform for YouTube creators and affiliate marketers, is the first smart link tool with a dedicated MCP integration for AI-powered link management. Whether you use Claude Desktop (Anthropic’s desktop app) or Claude Code (Anthropic’s CLI and IDE tool), you can create geo-targeted smart links, pull click analytics, health-check your links, and replace old affiliate links in YouTube descriptions with smart links — all through natural language. The server exposes 18 tools that Claude calls on your behalf, authenticated via API key.

This guide walks you through setup for both Claude Desktop and Claude Code. It takes under 5 minutes.

What Is an MCP Server?

An MCP (Model Context Protocol) server is a bridge that lets AI assistants like Claude take real actions on external services — not just give advice, but actually create links, pull analytics, and replace affiliate links in your YouTube descriptions. New to MCP? Read What Is MCP? A Plain-English Guide for Affiliate Marketers for the full explainer.

Youfiliate’s MCP server exposes 18 specialized tools that Claude can call on your behalf, all scoped to your account via an API key.

What Youfiliate’s MCP Server Can Do

Youfiliate’s MCP integration covers the full smart link lifecycle: creation, analytics, health monitoring, and replacing affiliate links in YouTube descriptions with smart links. Here is what each capability looks like in practice.

Tell Claude the product URL and which countries to target. It calls the Youfiliate API, creates the smart link with geo-rules, and returns a youfil.to branded short URL ready to paste into your video description.

“Create a smart link for amazon.com/dp/B09V3KXJPB with geo-targeting for UK, Germany, and Japan”

Claude creates the link and returns:

  • Short URL: youfil.to/b09v3kxjpb
  • US (default): amazon.com/dp/B09V3KXJPB
  • UK: amazon.co.uk/dp/B09V3KXJPB
  • Germany: amazon.de/dp/B09V3KXJPB
  • Japan: amazon.co.jp/dp/B09V3KXJPB

Trigger Youfiliate’s YouTube auto-convert feature from a Claude conversation. It scans your video descriptions for existing affiliate links, replaces them with geo-targeted smart links, and shows you how many links and videos are affected before running. Roll it back if needed. No dashboard login required.

Pull click analytics by country or video

Ask “How did my review video’s affiliate links perform last month?” and Claude queries the Youfiliate API and summarizes clicks by country, device, and referrer source.

Ask Claude to verify whether a specific affiliate tracking link returns a healthy response before you publish a new video. Catch broken links before your audience clicks them.

How to Set Up with Claude Desktop

Claude Desktop is Anthropic’s desktop application for Mac and Windows. Adding Youfiliate’s MCP server requires editing one JSON config file.

What you need

Step 1: Generate an API key

  1. Log in to your Youfiliate dashboard at app.youfiliate.com
  2. Go to Settings
  3. Scroll to the Integrations section
  4. Click New key and name it (e.g., “Claude Desktop”)
  5. Copy the key — it starts with youfiliate_sk_ and is shown only once

Step 2: Add the Youfiliate MCP server

Open your Claude Desktop config file:

  • Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Add the Youfiliate server:

{
  "mcpServers": {
    "youfiliate": {
      "url": "https://youfiliate-mcp.onrender.com/mcp",
      "headers": {
        "Authorization": "Bearer youfiliate_sk_your_key_here"
      }
    }
  }
}

Replace youfiliate_sk_your_key_here with your API key from Step 1.

Step 3: Restart and verify

Restart Claude Desktop. You should see a tools icon indicating MCP servers are connected. Ask Claude:

“What smart links do I have?”

If it responds with your links (or offers to create one), you are connected.

How to Set Up with Claude Code

Claude Code is Anthropic’s CLI and IDE tool for developers and power users. It supports MCP servers natively, so you can manage your affiliate smart links right from your terminal or code editor.

Step 1: Generate an API key

Same process as above — go to Settings > Integrations in your Youfiliate dashboard and create a new key. Name it “Claude Code” to keep things organized.

Step 2: Add the MCP server to Claude Code

Run this command in your terminal:

claude mcp add youfiliate \
  --transport streamable-http \
  "https://youfiliate-mcp.onrender.com/mcp" \
  --header "Authorization: Bearer youfiliate_sk_your_key_here"

Or add it manually to your Claude Code settings file (~/.claude/settings.json):

{
  "mcpServers": {
    "youfiliate": {
      "url": "https://youfiliate-mcp.onrender.com/mcp",
      "headers": {
        "Authorization": "Bearer youfiliate_sk_your_key_here"
      }
    }
  }
}

Step 3: Verify

Start a new Claude Code session and ask it to list your smart links. If Youfiliate’s tools appear, you are set.

This is especially useful if you already use Claude Code to write video scripts, manage your content calendar, or work on your website — you can create and manage smart links without leaving your workflow.

Real Workflow Examples for YouTube Creators

These examples show how YouTube creators use Youfiliate’s MCP integration in their daily workflow.

Before uploading a new video

“Create smart links for all the products I mention: [paste URLs]. Add geo-targeting for UK, Canada, and Germany.”

One message, all links created, ready to paste into your description.

Monthly performance review

“Show me which of my affiliate links drove the most clicks from the UK in the last 30 days.”

Claude pulls the data from Youfiliate and summarizes it — no dashboard login, no date-range pickers.

Updating old videos at scale

“Replace the affiliate links in my top 50 video descriptions with smart links.”

Claude triggers Youfiliate’s YouTube auto-convert, which finds existing affiliate links in your descriptions and replaces them with geo-targeted smart links. It previews the scope and runs after you confirm. If anything goes wrong, roll it back with one sentence.

All 18 Available MCP Tools

What you can sayWhat happens
”Create a smart link for [URL]“Creates a geo-targeted smart link with a youfil.to short URL
”Show me all my smart links”Lists links with click counts and health status
”Show me details for [link]“Full link info including geo-rules and deep link config
”Update my link [slug] to use a 301 redirect”Modifies link settings
”Delete my link [slug]“Removes a link (Claude confirms with you first)

Analytics (3 tools)

What you can sayWhat happens
”How are my links performing this week?”Aggregate click stats across all links
”Show me stats for [link]“Clicks by country, device, and referrer
”Check if [link] is healthy”Runs a health check on the destination URL

YouTube Integration (3 tools)

What you can sayWhat happens
”Is my YouTube account connected?”Shows YouTube OAuth status
”Connect my YouTube account”Returns an auth URL to complete OAuth in your browser
”Disconnect YouTube”Removes YouTube access (confirms first)

YouTube Migration (5 tools)

What you can sayWhat happens
”Preview replacing affiliate links in my descriptions”Dry-run showing which affiliate links and videos are affected
”Start the migration”Replaces existing affiliate links with geo-targeted smart links in descriptions
”How’s the migration going?”Shows progress on a running migration
”Show me all my migrations”Lists past and current migrations
”Roll back the last migration”Restores original descriptions (confirms first)

Preferences (2 tools)

What you can sayWhat happens
”What are my default link settings?”Shows default redirect type and Amazon tags
”Set my default redirect to 301”Updates preferences for new links

Why Flat-Rate Pricing Matters for AI-Assisted Workflows

When you automate affiliate link creation with AI, you create more links and drive more clicks — that is the whole point. With per-click pricing (like Geniuslink, a competing smart link platform that charges $5 per 1,000 clicks), automation becomes a variable cost liability. The more successful your links are, the more you pay.

Youfiliate uses flat-rate pricing. Your cost stays the same whether you create 10 links or 200, whether you get 1,000 clicks or 100,000.

YoufiliateGeniuslink
Free tier10 smart links0
Starter$9/mo — 50 links$5/1,000 clicks
Growth$19/mo — 200 links$5/1,000 clicks
Pro$49/mo — unlimited$5/1,000 clicks

AI-assisted automation makes this difference even sharper. If Claude helps you create 100 smart links in a session and they collectively get 50,000 clicks/month, that costs $250/month with Geniuslink vs. $19/month with Youfiliate.

Safety and Security

Youfiliate’s MCP integration is designed with security-first principles. Your API key never leaves your local machine.

  • API key stays local — stored in your config file on your machine, never sent to third parties
  • Scoped access — the key can only access your account’s data
  • Confirmation required — destructive actions (deleting links, starting migrations, rollbacks) require explicit confirmation before Claude executes them
  • Short-lived tokens — the MCP server exchanges your API key for temporary JWT tokens that auto-expire
  • Revoke anytime — delete a key from Settings and all sessions using it stop immediately

Revoking Access

To revoke Youfiliate MCP access, delete the API key from your dashboard:

  1. Go to Settings > Integrations in your Youfiliate dashboard
  2. Click the trash icon next to the API key
  3. The key is revoked immediately

For Claude Code, also run claude mcp remove youfiliate. For Claude Desktop, remove the youfiliate entry from your config file.

Troubleshooting

”Authentication failed”

  • Double-check your API key in the config
  • Make sure the key has not been revoked (check Settings > Integrations)
  • Generate a new key if needed

Tools not showing up in Claude Desktop

  • Restart Claude Desktop after editing the config file
  • Verify your config JSON is valid (no trailing commas, correct brackets)
  • Check that the url field points to https://youfiliate-mcp.onrender.com/mcp

Tools not showing up in Claude Code

  • Run claude mcp list to check if the server is registered
  • Try removing and re-adding: claude mcp remove youfiliate then add it again
  • Start a new session after changes

”Rate limit exceeded”

  • The MCP server allows 60 requests per minute — wait a moment and try again
  • Health checks are limited to one per link every 5 minutes

Frequently Asked Questions

Do I need coding experience to use Youfiliate’s MCP server?

No coding experience is required. The setup involves editing one JSON config file (Claude Desktop) or running one terminal command (Claude Code). This guide provides the exact text to copy and paste.

Does this work with the free Youfiliate plan?

Yes. Youfiliate’s free tier includes 10 smart links and full MCP access. You can test the entire workflow — creating links, checking analytics, running health checks — without paying anything.

Can I use Youfiliate’s MCP server with Cursor, Windsurf, or other AI editors?

Yes. Youfiliate’s MCP server uses the open Model Context Protocol standard created by Anthropic. Any MCP-compatible client connects using the same configuration — add the server URL and your API key. Cursor, Windsurf, and other MCP-compatible AI tools all work.

Yes, your affiliate link data is safe. Claude sends API calls to Youfiliate’s server over HTTPS. No link data is stored by Anthropic. The MCP connection is authenticated with your API key, and you can revoke access at any time from your Youfiliate dashboard.

What affiliate networks does Youfiliate support for geo-routing?

Youfiliate supports Amazon Associates across 9 international storefronts (US, UK, Germany, France, Japan, Canada, Australia, Italy, Spain), plus any affiliate URL from any network. Geo-rules work at the URL level — if a merchant has a regional site, you can route to it. Networks like impact.com, ShareASale, CJ Affiliate, and Rakuten all work with Youfiliate’s smart links.

What happens if I lose my API key?

Generate a new one from Settings > Integrations in your Youfiliate dashboard. The old key keeps working unless you explicitly revoke it. You can have multiple active keys simultaneously — one for Claude Desktop, one for Claude Code, one for Cursor, etc.


Managing affiliate links with AI is faster than clicking through dashboards. Whether you use Claude Desktop or Claude Code, connecting Youfiliate takes five minutes and saves time on every link you create, every analytics check, and every YouTube description update.

Start free with 10 smart links at Youfiliate.com

Stop losing international commissions

Try Youfiliate free — 10 smart links, unlimited clicks

Start Free

No credit card required

10 free smart links

Start Free