affiliate-router-mcp
Use this MCP server to discover, route, and attribute affiliate monetization for agent tool calls, with free lookup/link tools and paid x402 calls.
Search affiliate opportunities by keyword or category.
List registered affiliate programs with commission rates and status.
Get full vendor/product details, pricing, params, and commission info.
Find the best affiliate route for a natural-language intent.
Generate tracked affiliate links for referral/query-param vendors.
Call paid x402 API products with automatic affiliate attribution (USDC on Base; Pyrimid split when eligible, else direct x402 fallback).
Estimate per-call and monthly affiliate commissions.
Read and filter the local affiliate telemetry log.
Provides affiliate link generation for Gumroad products, enabling tracking of referrals with commission attribution.
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., "@affiliate-router-mcp Find affiliate programs for crypto APIs"
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.
affiliate-router-mcp
Vendor-neutral monetization routing for agent tools. One MCP server that discovers, routes, and attributes revenue across paid APIs, referral links, and affiliate programs.
Source: https://github.com/forgemeshlabs/affiliate-router-mcp
The router is not tied to any single payment network or affiliate system. Adapters are pluggable. The registry is a local JSON file you control.
Status: experimental · v0.1.12
Disclaimer: This MCP does not guarantee payouts. It routes attribution data according to each vendor/program's rules. Commission distribution is enforced by the vendor's payment system, not by this router.
What it does
Agents need a way to call monetizable tools without hardcoding every affiliate
or payment system. affiliate-router-mcp provides:
Discovery — find vendors and products by category or intent
Routing — choose the right payment/attribution path automatically
Calling — execute payments with affiliate attribution
Link generation — inject tracking params into referral URLs
Telemetry — log every attributed call locally for tracking
Related MCP server: Refgrow MCP Server
9 Tools
Tool | Cost | Description |
| Free | Every x402 Router tool with its live price — a plain fetch of |
| Free | Find products by category or keyword |
| Free | List all vendors and their programs |
| Free | Full details on a specific vendor/product |
| Free | Recommend the best route for an intent |
| Free | Build a tracked referral URL |
| varies | Pay and call a product with attribution |
| Free | Project monthly earnings at a call volume |
| Free | View local attribution log |
Adapters
Each payment or attribution system is a separate adapter. Adding a new one does not affect existing adapters.
Adapter | How it works | Payment | Status |
| EIP-3009 | On-chain USDC to vendor | Tested |
| Inject affiliate param into URL; supports | None — program-dependent | Implemented |
| Wraps a product's | None — program-dependent | Implemented |
The router is not tied to any single payment network or affiliate system. Future adapters may include: PartnerStack, Rewardful, Impact, Commission Junction, coupon/promo code injection, API-key partner programs, and other emerging agent commerce protocols.
Install
npm install -g affiliate-router-mcpOr with Claude Code / any MCP client:
{
"mcpServers": {
"affiliate-router": {
"command": "affiliate-router-mcp",
"env": {
"WALLET_PRIVATE_KEY": "0x...",
"GUMROAD_AFFILIATE_ID": "your-gumroad-id"
}
}
}
}Requirements
Node.js 18 or newer and, for paid calls, a dedicated low-balance Base wallet (
WALLET_PRIVATE_KEY). Free tools need no wallet.Spending caps:
call_affiliate_productonly pays the CoinOpAI origins listed inadapters/x402-direct.jsand refuses to sign for any other payee, any network except Base mainnet, any asset except USDC, or any amount above the built-in per-call caps ($0.15 and $0.10) and $10 per-session budget. The environment variablesX402_MAX_PRICE_USDandX402_SESSION_BUDGET_USDcan only lower those caps, never raise them. Use a dedicated, low-balance wallet.
Environment Variables
Variable | Required | Notes |
| For | Base wallet with USDC + ETH for gas |
| No | Lowers the per-call payment cap (never raises it) |
| No | Lowers the per-session payment budget (never raises it) |
| No | Gumroad tracking ID |
| No | PartnerStack referral code |
Included Vendors
CoinOpAI (x402_direct) — crypto intelligence API on Base mainnet
Kronos Signals — $0.05/call
Kronos Decision — $0.15/call
Trade Preflight — $0.05/call
Trade Audit — $0.07/call
Image Generation — $0.10/call
Gumroad (referral_link) — digital product marketplace, ~30% commission per product
PartnerStack (referral_link) — SaaS affiliate programs
ElevenLabs — AI voice/TTS, 22% of payments for 12 months (
fixed_link, no extra params)
Ledger (referral_link, fixed_link) — hardware wallets, 10% commission
Nano X, Nano S Plus, Stax — per-product deep links with tracking baked in
DigitalOcean (awin_link) — cloud hosting, 10% recurring commission for 12 months, 30-day cookie
Homepage, Droplets pricing — wrapped behind Awin's
cread.php
Amazon Influencer Storefront (referral_link, fixed_link) — ai_tinkers storefront, standard Associates rates, no per-product tagging
ForgeMesh Vehicle History Reports (referral_link) — tracked forgemesh.io/go/ redirects, 25% per sale
EpicVIN, Detailed Vehicle History — pass
extra_params: {vin: "..."}togenerate_affiliate_linkto prefill the VIN
Routing Logic
call_affiliate_product(vendor_id, product_id, params)
↓
adapter = vendor.affiliate_system
↓
x402_direct → EIP-3009 payment, no affiliate split
referral_link → inject tracking param, no paymentPackage vs. Product Updates
These are independent concerns.
Package updates (this repo):
Adding or fixing adapters
Updating tool schemas
Changing routing or caching logic
Dependency bumps
Product/catalog updates (registry.json):
Registering new vendor endpoints
Changing prices or commission rates
Enabling affiliate eligibility on a product
Adding a vendor to registry.json does not require a package release.
Releasing a new package version does not require products to be re-registered.
Adding a Vendor
Edit registry.json. No code changes needed for referral-link vendors.
x402 vendors require a funded wallet and an entry in the payee allowlist in adapters/x402-direct.js, which is a code change and a package release.
{
"id": "my_vendor",
"name": "My Vendor",
"affiliate_system": "referral_link",
"affiliate_config": {
"tracking_param": "ref",
"affiliate_id_env": "MY_VENDOR_REF_CODE",
"commission_pct": 25
},
"products": [...]
}Sponsored cards (Lulu Ads)
list_tools is a plain fetch of GET https://router.forgemesh.io/menu. ForgeMesh attaches one disclosed Lulu Ads card to that free response server-side, as a plain labelled data field — never text the model could read as an instruction:
"sponsored": { "label": "Sponsored", "text": "...", "url": "https://..." }This package ships no ad credentials and makes no calls to the ads network; it passes the field through untouched. No other tool carries a card. Strip it with delete result.sponsored.
Telemetry
All call_affiliate_product calls append to logs/affiliate-telemetry.jsonl:
{
"ts": "2026-05-14T17:07:01Z",
"vendor_id": "coinopai",
"product_id": "kronos_signals",
"amount_usd": 0.05,
"affiliate_id": null,
"payment_type": "x402_direct",
"commission_est_usd": null,
"status": "success",
"tx_hash": "0x..."
}What's Not in v0
Remote registry sync
PartnerStack / Impact.com / Rewardful API integrations
Web dashboard
Multi-level commissions
Server-side redirect tracking for links
Part of the ForgeMesh Ecosystem
Infrastructure for monetized agent ecosystems.
Package | What | Install |
affiliate-router-mcp | Vendor-neutral monetization routing (this package) |
|
Paid crypto intelligence via x402 |
| |
Paid image generation MCP |
|
Each package works standalone. No shared dependency required.
License
MIT — CoinOpAI
Available Tools
8 toolscall_affiliate_productA
Call a paid x402 API product with automatic affiliate attribution. Handles full payment (USDC on Base). Pyrimid affiliate routing used when eligible; falls back to direct x402 if affiliate_id is invalid. Costs USDC per call — amount shown in get_opportunity_details.
Inputs: vendor_id (required), product_id (required), params, affiliate_id.
estimate_commissionA
Estimate affiliate commission for a product based on known rates. Returns per-call and monthly estimates. Free.
Inputs: vendor_id (required), product_id (required), calls_per_month.
generate_affiliate_linkA
Generate a tracked affiliate link for a referral-link or query-param-link vendor. No payment required.
Inputs: vendor_id (required), product_id (required), affiliate_id.
get_affiliate_telemetryA
Read local affiliate telemetry log — timestamps, vendors, products, amounts, affiliate IDs, statuses. Free.
Inputs: limit, vendor_id, affiliate_id.
get_best_routeA
Given a natural language intent, find the best matching affiliate opportunity ranked by relevance, trust, and commission. Free.
Inputs: intent (required).
get_opportunity_detailsA
Get full details for a vendor and optionally a specific product — endpoint, pricing, commission, params. Free.
Inputs: vendor_id (required), product_id.
list_affiliate_programsA
List all registered affiliate programs with commission rates, affiliate system type, and status. Free.
Inputs: no named parameters.
search_opportunitiesB
Search affiliate opportunities by keyword or category. Returns matching vendors and products with commission info. Free — no payment required.
Inputs: query, category.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool has a clearly distinct purpose: calling a paid product, estimating commissions, generating links, reading telemetry, finding the best route, getting details, listing programs, and searching opportunities. No two tools overlap in functionality.
All tools follow a consistent 'verb_noun' pattern in snake_case (e.g., call_affiliate_product, estimate_commission, list_affiliate_programs). There is no mixing of styles or irregular naming.
With exactly 8 tools, the set is well-scoped for the affiliate routing domain. It provides sufficient functionality without being overwhelming or sparse.
The tool set covers key user workflows: discovering, evaluating, and using affiliate products, plus telemetry. A minor gap is the lack of tools for creating or managing affiliate programs, but this may be outside the intended scope.
Maintenance
Related MCP Connectors
Monetization layer for AI agents: a broad merchant program network, connected via MCP.
1Agent-commerce MCP server for x402/USDC payments and affiliate splits on Base.
Agent-to-agent referral network. Discover, recommend, and refer users between AI agents via MCP.
The vetted directory of paid APIs and MCP servers for AI agents.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceMCP server for AgentPay — the payment gateway for autonomous AI agents. Fund a wallet once, give your agent the key, and it discovers, provisions, and pays for tool APIs on its own. One key, every tool.112 npm1MIT
- AlicenseAqualityCmaintenanceMCP server for managing affiliate and referral programs. Track referrals, manage affiliates, process conversions, and handle payouts through AI assistants like Claude, Cursor, and ChatGPT.18238 npm2MIT
- AlicenseAqualityAmaintenanceMCP server for AI agent affiliate attribution and commission tracking. 7 tools for program discovery, conversion tracking, attribution token verification, and commission queries.7MIT
- AlicenseAqualityBmaintenancex402 Ads lets AI agents buy and verify ad placements with per-request USDC payments. Agents can discover inventory, submit campaign context, receive structured placement options, and pay through x402 without API keys or accounts. Built for autonomous promotion, attribution, and pay-per-action agent commerce.7515 npm1MIT