Affilync MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Affilync MCP Server search for new affiliate campaigns and show my earnings summary"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@affilync/mcp-server
MCP (Model Context Protocol) server for Affilync — manage affiliate marketing directly from Claude.
This package ships two servers that expose the same tools:
Transport | Auth | Who runs it | |
| local subprocess |
| each user, locally |
| hosted at | OAuth 2.1 ("Connect Affilync") | Affilync (one deployment) |
The remote server is the one Claude connects to by URL with one-click OAuth — see Remote server. The stdio server (below) is for local/manual use with a pasted token.
Setup
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"affilync": {
"command": "npx",
"args": ["@affilync/mcp-server"],
"env": {
"AFFILYNC_TOKEN": "<your-jwt-token>"
}
}
}
}Claude Code
claude mcp add affilync -- env AFFILYNC_TOKEN=<your-jwt-token> npx @affilync/mcp-serverGet your token
The server sends AFFILYNC_TOKEN as Authorization: Bearer <token>, so it
must be a JWT access token (from your Affilync login session or the OAuth
flow) — a developer API key (af_live_...) will NOT work with this server
as-is. To obtain one: log in at https://app.affilync.com, or complete the
OAuth flow (see the Affilync CLI / SDK), and use the access token value as
AFFILYNC_TOKEN. Note tokens expire (~60 min); re-issue as needed.
Related MCP server: agentfuse-mcp
Security model
Least authority. Every tool proxies to
/api/gpt/v1/*and carries only your bearer token. The backend independently enforces authentication, token revocation, user type (affiliate vs. brand) and write-scope — this server grants no capability the API wouldn't grant your token directly.Read-only mode. Set
AFFILYNC_READONLY=1to register only read tools. Mutating tools (joinCampaign,generateAffiliateLink,requestPayout,createCampaign,decideApplication) are not exposed at all — the model cannot invoke a state change or move money. Recommended for exploration.Tool safety hints. Mutating tools are annotated so the client can prompt before running them; money-moving / approval tools carry a
destructiveHint.Bounded I/O. Requests time out after 15s; responses are truncated to a safe size; backend error bodies are sanitized (status + short
detailonly) so raw server internals never reach the model.
Available Tools
Shared (all users)
Tool | Description |
| Health check — API reachable and token accepted |
| Get your profile (affiliate or brand) |
| Search campaigns by name/category |
| View recent notifications |
Affiliate Tools
Tool | Description |
| Browse campaigns to join |
| Apply to join a campaign |
| Create a tracking link |
| View your tracking links |
| Total/pending/available earnings |
| Individual commission records |
| Click stats (today/week/month) |
| Cash out available earnings |
| Your joined campaigns |
Brand Tools
Tool | Description |
| Create a campaign with commission structure |
| View your campaigns |
| Campaign metrics (clicks, conversions, EPC) |
| Review applications |
| Approve/reject an application |
| Overall brand performance |
| Affiliates working with you |
Development
npm install
AFFILYNC_TOKEN=<token> npm run devEnvironment Variables (stdio server)
Variable | Required | Default | Description |
| Yes | — | JWT access token |
| No |
| API base URL |
| No |
| Set to |
Remote server (OAuth Protected Resource)
affilync-mcp-remote is an HTTP server that Claude (or any MCP client) adds by
URL and authenticates against with OAuth — no token to paste. It exposes the
same tools as the stdio server, registered per-request from the user's token.
Per the MCP authorization spec it is an OAuth 2.0 Protected Resource:
GET /.well-known/oauth-protected-resource(RFC 9728) points clients at the Affilync Authorization Server (api.affilync.com).Unauthenticated MCP calls get
401+WWW-Authenticate: Bearer resource_metadata="…", so the client knows where to start the OAuth flow.Each request's bearer token is verified offline against the AS's published JWKS and MUST be audience-bound to this server (RFC 8707) — a token minted for another Affilync client cannot be replayed here.
The token is then forwarded to
/api/gpt/v1/*, where the backend re-enforces auth, user-type and write-scope. A token withoutapi:writeruns read-only.
Run it
npm ci && npm run build
AFFILYNC_API_URL=https://api.affilync.com \
MCP_RESOURCE_URL=https://mcp.affilync.com \
npm run start:remote # or: affilync-mcp-remoteVariable | Default | Description |
|
| This server's public URL (its OAuth resource identifier) |
|
| Authorization Server + API origin |
|
| HTTP port (Render sets this) |
Deploy
render.yaml defines the affilync-mcp-remote web service. Two operator steps
are required to go live (they can't be done from CI):
Create the service from the blueprint (Render → New → Blueprint on this repo).
Add DNS + custom domain: Cloudflare
CNAME mcp → <service>.onrender.com(proxied) and addmcp.affilync.comas a custom domain on the Render service.
Health check: GET /healthz.
Available Tools
20 toolscreateCampaignB
Create a new affiliate marketing campaign with a commission structure
Inputs: name (required), commission_rate (required), category, description, +2 more.
decideApplicationADestructive
Approve or reject an affiliate's application to join your campaign. Consequential — affects who can earn commissions on your campaign.
Inputs: decision (required), application_id (required), reason.
generateAffiliateLinkB
Generate a tracking link for a campaign you've joined
Inputs: campaign_id (required), destination_url.
getBrandDashboardCRead-only
Get your brand's overall performance dashboard
Inputs: no named parameters.
getCampaignPerformanceARead-only
Get detailed performance metrics for a campaign — clicks, conversions, revenue, EPC
Inputs: campaign_id (required).
getClickAnalyticsARead-only
Get click analytics — totals, today, this week, this month
Inputs: no named parameters.
getEarningsSummaryARead-only
Get your earnings summary — total, pending, available balance, paid out
Inputs: no named parameters.
getNotificationsBRead-only
Get your recent notifications (approvals, payouts, messages)
Inputs: page, page_size, unread_only.
getUserProfileARead-only
Get your Affilync profile. Call this first to check if you are an affiliate or brand.
Inputs: no named parameters.
joinCampaignA
Apply to join an affiliate campaign. Some campaigns auto-approve.
Inputs: campaign_id (required).
listActiveCampaignsARead-only
List campaigns you've joined and are currently active in
Inputs: page, page_size.
listAffiliateApplicationsARead-only
List affiliate applications for your campaigns
Inputs: page, page_size, application_status.
listAvailableCampaignsARead-only
List campaigns available to join as an affiliate. Shows active campaigns accepting new affiliates.
Inputs: page, category, page_size.
listBrandAffiliatesARead-only
List all affiliates working with your brand
Inputs: page, page_size.
listBrandCampaignsARead-only
List all campaigns owned by your brand
Inputs: page, page_size, campaign_status.
listCommissionsARead-only
List your individual commission records from conversions and sales
Inputs: page, page_size, commission_status.
listMyLinksBRead-only
List all your affiliate tracking links
Inputs: page, page_size.
pingARead-only
Health check — verify the Affilync API is reachable and your token is accepted.
Inputs: no named parameters.
requestPayoutADestructive
Request a payout of your available earnings. IRREVERSIBLE — moves real money. Omitting the amount requests your full available balance.
Inputs: amount.
searchCampaignsBRead-only
Search for campaigns by name, description, or category
Inputs: q, page, category, page_size.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 20 tools
Tools are largely distinct with clear purposes, separating brand and affiliate roles. Potential overlap between campaign listing tools (listBrandCampaigns, searchCampaigns, listAvailableCampaigns, listActiveCampaigns) is resolved by descriptive text, but could still cause initial confusion.
Naming follows a consistent camelCase convention with verbs like list, get, create, join. Minor outliers like 'decideApplication' and 'ping' deviate from the pattern, but overall it is predictable and readable.
20 tools is well-scoped for an affiliate marketing server covering both brand management and affiliate participation. Each tool serves a distinct function without being excessive.
Core workflows for both roles are covered: brands can create campaigns, manage applications, view performance; affiliates can join, generate links, track earnings, and request payouts. Missing update/delete for campaigns and leave campaign for affiliates are minor gaps.
Maintenance
Related MCP Connectors
For businesses that pay affiliates: set up and run your affiliate program from your AI assistant.
Affiliate network reporting in your AI client. Bring your own keys. Most adapters experimental.
Run Apple Search Ads from Claude: performance, recommendations, keywords, budgets, launches.
Browse affiliates, referrals, commissions and payouts, and set up campaigns and affiliates.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceProvides comprehensive access to the Commission Junction affiliate network API for both publishers and advertisers. It enables users to manage affiliate links, track commissions, search for products, and handle order conversions through natural language interfaces.5-
- AlicenseAqualityDmaintenanceEnables AI agents to access affiliate marketing capabilities through AgentFuse's API, allowing them to browse affiliate programs, generate tracked links, and record conversions without writing HTTP code.753 npmMIT
- AlicenseNot gradedqualityCmaintenanceCentral hub for managing affiliate links across all Rvvel applications and AI agents, enabling storage, retrieval, search, and tracking.MIT
- AlicenseNot gradedqualityFmaintenanceConnects Claude to your Grinfi.io account, enabling management of contacts, automations, messages, and more through natural language.1MIT