Skip to main content
Glama
Scientia07

MCP Affiliate Server

by Scientia07

MCP Affiliate Server

An MCP (Model Context Protocol) server that enables AI assistants to search products and generate affiliate links across European and global affiliate networks.

Built for the maker/STEM community. Works with Claude Code, Claude Desktop, and any MCP-compatible client.

The Problem

You're building content with AI (project tutorials, product guides, comparison articles) and want to monetize with affiliate links. Currently you must:

  1. Manually search each shop for products

  2. Manually generate tracking links per network

  3. Copy-paste prices and URLs into your content

  4. Repeat for every product, every shop, every article

This server automates all of it. Ask your AI assistant to find products, and it returns affiliate-ready links with prices from multiple shops.

Related MCP server: Godalo

Features

Tool

Description

search_products

Search across Awin, Amazon, Tradedoubler, AliExpress

match_bom

Match a Bill of Materials to products with affiliate links

generate_affiliate_link

Convert any product URL into a tracking link

list_merchants

Show configured merchants with commission rates

sync_feeds

Download and update product feeds

Example: BOM Matching

You: "Find affiliate links for these parts: 6x STS3215 Servo, 1x ESP32 DevKit, PLA Filament 1kg"

MCP Server returns:
[
  {
    "name": "STS3215 Servo",
    "quantity": 6,
    "shops": [
      { "shopName": "Conrad", "price": "EUR 24.90", "url": "https://...", "isAffiliate": true },
      { "shopName": "Amazon.de", "price": "EUR 22.99", "url": "https://...", "isAffiliate": true }
    ]
  },
  ...
]

Supported Networks

Network

Merchants

Commission

API Type

Awin

Conrad, Reichelt, 3DJake, Bambu Lab

4-6%

Product Feeds + Batch Link Gen

Amazon

Amazon.de

1-7%

Creators API (search + links)

Tradedoubler

Galaxus/Digitec

~3%

Product Search + Feeds

AliExpress

AliExpress

3-8%

Product Search + Links

Impact

Elegoo

4.5%

REST API

Note: Amazon PA-API 5.0 is deprecated April 30, 2026. This server uses the new Creators API.

Quick Start

1. Install

git clone https://github.com/Scientia07/Luno-MCP-Affiliate.git
cd Luno-MCP-Affiliate
npm install
npm run build

2. Configure

cp .env.example .env
# Edit .env with your API keys

3. Add to Claude Code

Add to ~/.claude/mcp.json:

{
  "mcpServers": {
    "affiliate": {
      "command": "node",
      "args": ["/path/to/Luno-MCP-Affiliate/dist/index.js"],
      "env": {
        "AWIN_API_KEY": "your_key",
        "AWIN_PUBLISHER_ID": "your_id",
        "AMAZON_PARTNER_TAG": "your_tag-21"
      }
    }
  }
}

4. Sync Product Feeds

In Claude Code, run:

Use the sync_feeds tool to download product catalogs

5. Use It

Search for "Raspberry Pi 5" across all affiliate shops
Match these BOM items to affiliate products: 6x STS3215 Servo, 1x ESP32-S3, PLA Filament 1kg
Generate an affiliate link for https://www.conrad.de/de/p/raspberry-pi-5-8gb-2849738.html

Architecture

┌─────────────────────────────────────────┐
│  MCP Client (Claude Code / Desktop)      │
│  "Find products for ESP32 DevKit"        │
└──────────────┬──────────────────────────┘
               │ MCP Protocol (stdio)
┌──────────────▼──────────────────────────┐
│  MCP Affiliate Server                    │
│  ┌─────────┐ ┌──────────┐ ┌──────────┐  │
│  │ search  │ │ match    │ │ generate │  │
│  │ products│ │ bom      │ │ link     │  │
│  └────┬────┘ └────┬─────┘ └────┬─────┘  │
│       └───────────┼────────────┘         │
│              ┌────▼─────┐                │
│              │ Product  │                │
│              │ Database │ (SQLite)        │
│              └────┬─────┘                │
└───────────────────┼─────────────────────┘
                    │ synced from
    ┌───────────────┼───────────────┐
    │               │               │
┌───▼───┐     ┌────▼────┐    ┌────▼─────┐
│ Awin  │     │ Amazon  │    │Tradedblr │
│ Feeds │     │Creators │    │  API     │
│(CSV)  │     │  API    │    │(JSON)    │
└───────┘     └─────────┘    └──────────┘

Project Structure

src/
├── index.ts              # Entry point
├── server.ts             # MCP server setup (tools + resources)
├── tools/
│   ├── search.ts         # Aggregated product search
│   ├── awin.ts           # Awin feed search + link generation
│   ├── amazon.ts         # Amazon Creators API
│   ├── tradedoubler.ts   # Tradedoubler/Galaxus
│   ├── aliexpress.ts     # AliExpress API
│   ├── bom-matcher.ts    # BOM → affiliate links pipeline
│   ├── link-generator.ts # URL → affiliate link converter
│   └── merchants.ts      # Merchant configuration
├── feeds/
│   ├── feed-manager.ts   # Feed download orchestration
│   └── product-db.ts     # SQLite product database
├── matching/
│   └── fuzzy-match.ts    # Fuse.js fuzzy product matching
└── types/
    └── index.ts          # Shared TypeScript types

Development Status

This project is in early development. The MCP server interface and tool definitions are complete. API integrations are stubbed with clear TODOs.

Roadmap

  • MCP server scaffold with 5 tools

  • Type system and interfaces

  • Merchant configuration (8 merchants across 4 networks)

  • Fuzzy matching with Fuse.js

  • Awin product feed download + SQLite storage

  • Awin batch link generation (100 links/request)

  • Amazon Creators API integration

  • Tradedoubler product search

  • AliExpress product search

  • Feed sync scheduling (cron-like)

  • MCP Inspector testing

  • npm publishable package

API Keys Required

Network

Where to Get

Notes

Awin

awin.com

Free signup, apply per merchant

Amazon

partnernet.amazon.de

Need 10+ sales/30 days for API

Tradedoubler

tradedoubler.com

Apply for Galaxus program

AliExpress

portals.aliexpress.com

Free developer account

Contributing

Contributions welcome! This is a LunoLabs open-source project. See CONTRIBUTING.md for guidelines.

Key areas where help is needed:

  • API integration implementations (see TODO comments in src/tools/)

  • Additional affiliate network support

  • Test coverage

  • Documentation

License

MIT - see LICENSE


Built by LunoLabs - Technologie fur alle.

Available Tools

5 tools
list_merchantsA

List all configured affiliate merchants with their networks, commission rates, and feed status.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden of disclosing safety and behavior. It implicitly signals a read-only operation ('List') but does not mention authentication, pagination, or potential errors. For a simple listing tool, this is adequate but not rich.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence that clearly states the purpose and key output fields. There is no wasted wording or unnecessary detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description lists the main output fields (networks, commission rates, feed status), which is sufficient for a simple list tool with no output schema. It could mention pagination or ordering, but 'all configured' implies a full list, making it reasonably complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, and the schema coverage is 100% by default. The description does not need to explain any parameter details, aligning with the baseline of 4 for parameter-free tools.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the function: 'List all configured affiliate merchants' with specific details (networks, commission rates, feed status). This distinguishes it from sibling tools like search_products or generate_affiliate_link, which perform different operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context that this tool retrieves the full merchant list. While it doesn't explicitly mention when not to use it, the sibling tools are all action-oriented (search, match, generate, sync), leaving no ambiguity about when a list operation is needed.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

match_bomA

Match a Bill of Materials (list of components/parts) against affiliate product catalogs. Returns best matches with prices and affiliate links for each item. Ideal for project material lists.

ParametersJSON Schema
NameRequiredDescriptionDefault
itemsYesList of BOM items (e.g., ["6x STS3215 Servo", "1x ESP32 DevKit", "PLA Filament 1kg"])
networksNoLimit search to specific networks. Default: all configured networks.
marketplaceNoTarget marketplace. Default: "de".de
max_shops_per_itemNoMax shop links per BOM item (1-5). Default: 3.

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses the primary behavior (returns best matches with prices and affiliate links) but lacks details on edge cases like no matches found, partial matching, or any side effects. This is adequate but not deeply transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences fully convey the tool's purpose and output with zero filler. The structure is front-loaded with the action and resource, making it efficient for an agent to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite lacking an output schema, the description provides a high-level summary of the return format (best matches, prices, affiliate links). It covers the essential context for a matching tool, though it could detail what 'best match' means or how multiple networks are handled.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema covers 100% of parameter descriptions, so the baseline is 3. The description adds marginal value by reinforcing that items are a list of components/parts and that output includes prices and links, but it does not clarify network or marketplace specifics beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: matching a Bill of Materials against affiliate product catalogs and returning best matches with prices and links. The verb 'Match' and resource 'Bill of Materials' distinguish it from sibling tools like search_products, which likely handles single product queries.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'Ideal for project material lists' provides clear context for when to use this tool. It implies multi-item input scenarios but does not explicitly mention when not to use it or alternatives, which would earn a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_productsA

Search for products across affiliate networks (Awin, Amazon, Tradedoubler, AliExpress). Returns products with prices and affiliate links.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesProduct name or search term (e.g., "ESP32 DevKit", "PLA Filament 1kg")
networksNoLimit search to specific networks. Default: all configured networks.
merchantsNoLimit to specific merchants (e.g., ["Conrad", "Galaxus"]). Default: all.
marketplaceNoTarget marketplace: "de" (Germany/Austria), "ch" (Switzerland). Default: "de".de
max_resultsNoMax results per network (1-20). Default: 5.

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden for behavioral disclosure. It states that the tool searches across multiple networks and returns products with prices and affiliate links, which is useful. However, it does not disclose any other behavioral traits such as rate limits, failure handling, or whether results are merged from all networks simultaneously. The description is adequate but not overly informative.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence that front-loads the main action and return type. There is no redundant information or filler, making it highly efficient and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that the schema fully documents all parameters, the description only needs to convey the tool's purpose and return type, which it does. The absence of an output schema is partially mitigated by the clear statement that it returns products with prices and affiliate links. However, it could have benefited from mentioning the availability of filters like networks, merchants, and max_results, though these are covered in the schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema provides 100% coverage with detailed descriptions for all 5 parameters, including defaults and constraints. The description does not add any additional parameter semantics beyond what the schema already offers, so the baseline score of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Search for products'), the resource ('products across affiliate networks'), and the specific networks (Awin, Amazon, Tradedoubler, AliExpress). It also identifies the return value ('products with prices and affiliate links'), which distinguishes it from sibling tools like match_bom, generate_affiliate_link, list_merchants, and sync_feeds that perform different functions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies that this tool is used to search for products across the listed affiliate networks, but it does not explicitly state when to use this tool versus alternatives like match_bom or generate_affiliate_link. There is no mention of when not to use it or any alternative guidance, leaving the usage to be inferred from the name and purpose.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

sync_feedsA

Download and update product feeds from Awin and Tradedoubler. Run this to refresh the local product database.

ParametersJSON Schema
NameRequiredDescriptionDefault
forceNoForce re-download even if feeds are fresh. Default: false.
merchantsNoSpecific merchants to sync. Default: all configured merchants.

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It states that the tool downloads and updates product feeds and refreshes the local DB, which reveals its primary effect. However, it does not disclose potential side effects such as overwriting local changes, resource consumption, or failure behavior. This is adequate but not deeply transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, no redundancy. The first states the action and sources, the second clarifies the purpose and when to run it. Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the simple tool shape (2 optional params, no output schema, clear siblings), the description provides all necessary high-level context: what it does, what data it touches, and when to run it. The schema fills in parameter specifics. No significant gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema covers 100% of parameters with clear descriptions for 'force' and 'merchants'. The description adds no additional parameter information beyond what the schema already provides, matching the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses specific verbs ('Download and update') and names the exact resources ('product feeds from Awin and Tradedoubler') and the purpose ('refresh the local product database'). This clearly distinguishes it from siblings like search_products, match_bom, generate_affiliate_link, and list_merchants.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'Run this to refresh the local product database' provides clear context for when to invoke this tool. It implies it is the go-to tool for updating local data before searching or matching, but it does not explicitly name alternatives or exclusion criteria, which would warrant a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 5 tool updatesv0.1.0
    • First observedgenerate_affiliate_link
    • First observedlist_merchants
    • First observedmatch_bom
    • First observedsearch_products
    • First observedsync_feeds

TDQS

A4.2/5.0

Scored across 5 tools

Disambiguation5/5

Each tool serves a clearly distinct purpose: searching products, matching a BOM, generating links, listing merchants, and syncing feeds. There is minimal overlap; even search_products and match_bom differ in input type (single query vs. list).

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern: search_products, match_bom, generate_affiliate_link, list_merchants, sync_feeds. No mixed conventions or vague verbs.

Tool Count5/5

With 5 tools, the server is well-scoped for an affiliate marketing domain. Each tool covers a core function without unnecessary bloat or minimalism.

Completeness4/5

The tool set covers primary workflows: finding products, generating affiliate links, managing merchants, and refreshing feeds. Minor gaps exist, such as no direct product detail lookup or merchant mutation, but these are workarounds or out of scope.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    Agentic commerce infrastructure for AI agents. MCP-native product discovery, contextual ad matching, and purchase facilitation with European privacy compliance (nDSG/GDPR).
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Affiliate product search for AI agents. Indexes structured merchant feeds — real prices, live stock, affiliate links built in. Works with any MCP client.
    MIT
  • F
    license
    A
    quality
    D
    maintenance
    Enables AI assistants to browse Admitad affiliate programs, discover product feeds, and search products directly from chat.
    8
    2
    -