MCP server for Youfiliate Smart Links — manage geo-targeted affiliate links from Claude Desktop and other MCP-compatible AI assistants.
Project description
Youfiliate MCP Server
MCP (Model Context Protocol) server for managing Youfiliate Smart Links from AI assistants like Claude Desktop. Create geo-targeted affiliate links, view analytics, and run YouTube description migrations — all from a chat conversation.
18 tools, 4 resources, supports stdio + streamable HTTP transports.
Installation
pip install youfiliate-mcp
Requires Python 3.11+ and a Youfiliate account.
Generate an API key
- Log in at youfiliate.com
- Go to Settings → API Keys
- Click Create API Key (e.g. "Claude Desktop")
- Copy the key (starts with
youfiliate_sk_) — shown only once
Claude Desktop Configuration
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
Local (stdio)
{
"mcpServers": {
"youfiliate": {
"command": "youfiliate-mcp",
"env": {
"YOUFILIATE_API_KEY": "youfiliate_sk_your_key_here"
}
}
}
}
Remote (Streamable HTTP)
{
"mcpServers": {
"youfiliate": {
"url": "https://mcp.youfiliate.com",
"headers": {
"Authorization": "Bearer youfiliate_sk_your_key_here"
}
}
}
}
Restart Claude Desktop after editing the config.
Available Tools (18)
Smart Links CRUD (5)
| Tool | Description |
|---|---|
youfiliate_create_smart_link |
Create a new geo-targeted smart link |
youfiliate_list_smart_links |
List smart links with filtering and pagination |
youfiliate_get_smart_link |
Get full details of a smart link by ID |
youfiliate_update_smart_link |
Update a smart link (partial update) |
youfiliate_delete_smart_link |
Delete a smart link (requires confirm=True) |
Analytics (3)
| Tool | Description |
|---|---|
youfiliate_get_smart_link_stats |
Get click analytics for a specific link |
youfiliate_get_aggregate_stats |
Get analytics across all links |
youfiliate_check_link_health |
Trigger a health check on a link |
Preferences (2)
| Tool | Description |
|---|---|
youfiliate_get_preferences |
Get default smart link preferences |
youfiliate_update_preferences |
Update preferences for new links |
YouTube (3)
| Tool | Description |
|---|---|
youfiliate_get_youtube_status |
Check YouTube connection status |
youfiliate_connect_youtube |
Start YouTube OAuth flow (returns auth URL) |
youfiliate_disconnect_youtube |
Disconnect YouTube (requires confirm=True) |
Migrations (5)
| Tool | Description |
|---|---|
youfiliate_preview_migration |
Preview migration scope (dry run) |
youfiliate_start_migration |
Start YouTube description migration (requires confirm=True) |
youfiliate_get_migration_status |
Check migration progress |
youfiliate_list_migrations |
List all migrations |
youfiliate_rollback_migration |
Rollback a migration (requires confirm=True) |
Available Resources (4)
| URI | Description |
|---|---|
youfiliate://summary |
Dashboard summary (link counts, clicks, health) |
youfiliate://preferences |
Current preferences (read-only) |
youfiliate://smart-link/{id} |
Single smart link details |
youfiliate://plan-limits |
Current plan usage and limits |
Example Conversations
Creating a Smart Link
You: Create a smart link for
https://amazon.com/dp/B09V3KXJPBwith geo-targeting for UK and Germany.Claude: (calls
youfiliate_create_smart_linkwith geo rules for GB and DE)Done. Short URL:
youfil.to/b09v3kxjpb
- US (default): amazon.com/dp/B09V3KXJPB
- UK: amazon.co.uk/dp/B09V3KXJPB
- Germany: amazon.de/dp/B09V3KXJPB
Checking Analytics
You: How are my links performing this month?
Claude: (calls
youfiliate_get_aggregate_statswithperiod="30d")1,234 clicks. Top countries: US (500), UK (200), Germany (150). Most traffic from YouTube (900 clicks).
YouTube Migration
You: Convert all my YouTube description links to smart links.
Claude: (calls
youfiliate_preview_migration) Would affect 15 videos / 42 links. Proceed?You: Yes.
Claude: (calls
youfiliate_start_migrationwithconfirm=True)
Security Model
- API key auth. Your
youfiliate_sk_...key authenticates the MCP server. - JWT bridge. The server exchanges your API key for short-lived JWTs against the Youfiliate API.
- Token caching. JWTs are cached in memory and auto-refreshed.
- Scoped data access. The server only sees data belonging to the API key's owner.
- Destructive actions guarded. Delete, disconnect, start migration, and rollback require explicit
confirm=True.
Rate Limits
- MCP layer: 60 requests/minute per API key
- Health checks: 1 per link per 5 minutes
- API key exchange: rate-limited by the Youfiliate backend
Environment Variables
| Variable | Default | Description |
|---|---|---|
YOUFILIATE_API_KEY |
(required) | Your API key |
YOUFILIATE_API_BASE_URL |
https://app.youfiliate.com |
Backend URL |
MCP_SERVER_SECRET |
(empty) | Shared secret for verify-api-key (server operators only) |
TRANSPORT |
stdio |
stdio or streamable-http |
PORT |
8080 |
Port for HTTP transport |
HOST |
127.0.0.1 |
Bind address (use 0.0.0.0 in Docker) |
Development
git clone https://github.com/andrewmpierce/youfiliate-mcp.git
cd youfiliate-mcp
pip install -e ".[dev]"
pytest -v
Test with MCP Inspector
npx @modelcontextprotocol/inspector youfiliate-mcp
Docker
docker build -t youfiliate-mcp .
docker run -p 8080:8080 \
-e YOUFILIATE_API_KEY=youfiliate_sk_... \
youfiliate-mcp
Troubleshooting
"Authentication failed" — verify your API key, regenerate at youfiliate.com/settings if needed.
"Could not connect to the Youfiliate API" — check YOUFILIATE_API_BASE_URL. Defaults to https://app.youfiliate.com.
"Rate limit exceeded" — wait a moment. Health checks are 1 per 5 minutes per link.
Tools not appearing in Claude Desktop — check claude_desktop_config.json syntax, restart Claude Desktop, run youfiliate-mcp --help to verify the binary is on your PATH.
License
Links
- Website: youfiliate.com
- Issues: github.com/andrewmpierce/youfiliate-mcp/issues
- Changelog: CHANGELOG.md
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file youfiliate_mcp-0.1.1.tar.gz.
File metadata
- Download URL: youfiliate_mcp-0.1.1.tar.gz
- Upload date:
- Size: 31.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
68bfea9610123a64037d9eed18cbd9003a4eca76674fa34ddf7e73a5ea3f62b5
|
|
| MD5 |
0ff6c12dc237703c945e34e9f512a7f3
|
|
| BLAKE2b-256 |
d8ad025379f8205e42d4aad831f48638ba7d08dcc5b9e063d0432012cc861b67
|
Provenance
The following attestation bundles were made for youfiliate_mcp-0.1.1.tar.gz:
Publisher:
publish.yml on andrewmpierce/youfiliate-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
youfiliate_mcp-0.1.1.tar.gz -
Subject digest:
68bfea9610123a64037d9eed18cbd9003a4eca76674fa34ddf7e73a5ea3f62b5 - Sigstore transparency entry: 1395060649
- Sigstore integration time:
-
Permalink:
andrewmpierce/youfiliate-mcp@d89ce5788af47ca83ee6797308131d737a1b7f5d -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/andrewmpierce
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d89ce5788af47ca83ee6797308131d737a1b7f5d -
Trigger Event:
release
-
Statement type:
File details
Details for the file youfiliate_mcp-0.1.1-py3-none-any.whl.
File metadata
- Download URL: youfiliate_mcp-0.1.1-py3-none-any.whl
- Upload date:
- Size: 32.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa7f8c7d4303476e113f807059d00bc464f3b989a7c90d9a9e7edec2e331186d
|
|
| MD5 |
5dd5ce325dec20c8f75edf28817045db
|
|
| BLAKE2b-256 |
05326ceec02bd2da2f0471bef78db04ed46de49dca64fa2e4d39056f282dcc5a
|
Provenance
The following attestation bundles were made for youfiliate_mcp-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on andrewmpierce/youfiliate-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
youfiliate_mcp-0.1.1-py3-none-any.whl -
Subject digest:
fa7f8c7d4303476e113f807059d00bc464f3b989a7c90d9a9e7edec2e331186d - Sigstore transparency entry: 1395060655
- Sigstore integration time:
-
Permalink:
andrewmpierce/youfiliate-mcp@d89ce5788af47ca83ee6797308131d737a1b7f5d -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/andrewmpierce
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d89ce5788af47ca83ee6797308131d737a1b7f5d -
Trigger Event:
release
-
Statement type: