# Affiliate Router MCP

> Affiliate Router MCP is an open-source MCP server for finance and payments. Route x402 USDC payments and referral links for agent tools through one MCP server. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, self-hosted
- **Repository:** https://github.com/forgemeshlabs/affiliate-router-mcp
- **MCP Registry name:** io.github.forgemeshlabs/affiliate-router-mcp
- **Categories:** finance and payments, marketing and SEO
- **Listing updated:** 2026-11-15

## About

Experimental at v0.1.x, this server gives an agent a catalogue of vendors and products with ways to pay for or promote each. Discovery tools search by category or keyword, a routing tool recommends a path for an intent, and a link tool builds tracked referral URLs. Only one tool spends money, call_affiliate_product, which settles in USDC on Base through an x402 adapter. A separate commission estimator projects monthly earnings at a given call volume.

The spending guardrails are specific. It pays only allowlisted CoinOpAI origins, only on Base mainnet in USDC, with per-call caps of $0.15 and $0.10 and a $10 session budget; environment variables can lower those caps but not raise them. The README tells you to use a dedicated low-balance wallet.

Built-in vendors include CoinOpAI, Gumroad, PartnerStack, Ledger, DigitalOcean via Awin, an Amazon storefront and vehicle history reports. The author states it does not guarantee payouts. The free list_tools response may carry one labelled sponsored card.

## Features

- **Vendor discovery:** Search products and programs by category or keyword.
- **Best-route suggestion:** Recommends the payment or attribution path for an intent.
- **Tracked link builder:** Injects affiliate parameters into referral URLs.
- **Capped x402 payments:** Hard per-call and session spending limits.
- **Commission estimates:** Projects earnings at a chosen call volume.
- **Local telemetry log:** Appends each paid call to a JSONL file.
- **Editable registry:** Referral vendors are added by editing registry.json.

## Good for

- Let an agent find a paid API and pay per call
- Generate tracked referral links for recommended products
- Estimate affiliate revenue before adding a vendor
- Audit attributed calls from a local log

## Install

### Claude Code (Terminal)

```sh
claude mcp add affiliate-router-mcp --env WALLET_PRIVATE_KEY='<WALLET_PRIVATE_KEY>' -- npx -y affiliate-router-mcp
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "affiliate-router-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "affiliate-router-mcp"
      ],
      "env": {
        "WALLET_PRIVATE_KEY": "<WALLET_PRIVATE_KEY>"
      }
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "affiliate-router-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "affiliate-router-mcp"
      ],
      "env": {
        "WALLET_PRIVATE_KEY": "<WALLET_PRIVATE_KEY>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "affiliate-router-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "affiliate-router-mcp"
      ],
      "env": {
        "WALLET_PRIVATE_KEY": "<WALLET_PRIVATE_KEY>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "affiliate-router-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "affiliate-router-mcp"
      ],
      "env": {
        "WALLET_PRIVATE_KEY": "<WALLET_PRIVATE_KEY>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "affiliate-router-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "affiliate-router-mcp"
      ],
      "env": {
        "WALLET_PRIVATE_KEY": "<WALLET_PRIVATE_KEY>"
      }
    }
  }
}
```

## Tools

- `list_tools`: Lists every x402 Router tool with its live price, fetched from the router menu.
- `search_opportunities`: Find products by category or keyword.
- `list_affiliate_programs`: List all vendors and their programs.
- `get_opportunity_details`: Full details on a specific vendor or product.
- `get_best_route`: Recommend the best route for an intent.
- `generate_affiliate_link`: Build a tracked referral URL.
- `call_affiliate_product`: Pay and call a product with attribution.
- `estimate_commission`: Project monthly earnings at a call volume.
- `get_affiliate_telemetry`: View the local attribution log.

## FAQ

### Do the free tools need a wallet?

No. Only call_affiliate_product with x402 vendors needs WALLET_PRIVATE_KEY.

### Can it spend more than the caps?

No. Environment variables can only lower the built-in caps.

### Does it guarantee commissions?

No. Payouts are enforced by each vendor's system.

### Is it production-ready?

The README labels it experimental.

### Is Affiliate Router MCP free?

Yes. Affiliate Router MCP is open source, so you can use and self-host it for free.

### How do I add Affiliate Router MCP to Claude Code?

Run this command in your terminal: claude mcp add affiliate-router-mcp --env WALLET_PRIVATE_KEY='<WALLET_PRIVATE_KEY>' -- npx -y affiliate-router-mcp

### What are the best alternatives to Affiliate Router MCP?

The closest alternatives to Affiliate Router MCP are Google Ads + Meta Ads + SEO/GEO MCP, Solana MCP by Vybe, Tapetide - Indian Stock Market MCP, Calven and Budget Tracker.

## Alternatives

- [Google Ads + Meta Ads + SEO/GEO MCP](https://ai-powered.com/mcp/google-ads-meta-ads-seo-geo-mcp): Google Ads + Meta Ads + SEO/GEO MCP is a freemium MCP server for marketing and seo.
- [Solana MCP by Vybe](https://ai-powered.com/mcp/solana-mcp-by-vybe): Solana MCP by Vybe is an MCP server for finance and payments.
- [Tapetide - Indian Stock Market MCP](https://ai-powered.com/mcp/tapetide-indian-stock-market-mcp): Tapetide - Indian Stock Market MCP is a freemium MCP server for finance and payments.
- [Calven](https://ai-powered.com/mcp/calven): Calven is an MCP server for marketing and seo.
- [Budget Tracker](https://ai-powered.com/mcp/budget-tracker-2): Budget Tracker is a freemium MCP server for finance and payments.
- [MCP](https://ai-powered.com/mcp/mcp-mwhffe53): MCP is a freemium MCP server for marketing and seo.
- [Quantivex Research](https://ai-powered.com/mcp/quantivex-research): Quantivex Research is a free MCP server for finance and payments.
- [Provyan](https://ai-powered.com/mcp/provyan): Provyan is a free MCP server for finance and payments.

---
Source: https://ai-powered.com/mcp/affiliate-router-mcp
