Affitor

v0.2.5
com.affitor/mcp Checked 3 days ago Published 27 days ago

Affiliate programs in AI tools: read partners, commissions and payouts; track clicks and sales.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

affitor_readiness

Check how close this program is to tracking real affiliate sales. Use it first to see what to fix, and after affitor_run_verification, every poll.retry_after_seconds until integration_verified is true. Returns state, integration_verified, blocker (the first failing gate), each gate (profile, economics, payout, tracking, live) with status and next_action, last event times and 24-hour counts.

ParameterTypeDescription
forceRecheckbooleanRun the checks again now, including a fetch of your site to find the tracker. Leave it out to get the last saved result, which is enough while polling.

affitor_track_lead

Record a signup for this program and bind the customer to the affiliate click that brought them, so their later sales attribute from customerExternalId alone. Use it when a referred visitor creates an account, from your server. Send customerExternalId, clickId, or both. Returns { ok, status, data } from the API, or an error naming what is missing.

ParameterTypeDescription
clickIdstringThe click id the Affitor tracker stored in the visitor's affitor_click_id cookie. Send it, customerExternalId, or both; with neither, the lead cannot be attributed.
customerExternalIdstringYour app's own id for this customer, such as user_123. It binds the customer to the click, so their later sales need only this id. Send it, clickId, or both.
emailstringThe customer's email address, stored with the lead. Leave it out to record the lead without one.
testModebooleanTrue records a test lead (marked is_test, never counted or paid) while you check an integration. Leave it out to record a real lead.

affitor_track_click

Record a visit that arrived through an affiliate link. Use it only to track clicks from a server; the Affitor browser tracker does this on its own. Returns { ok, status, data }, where data holds click_id (store it in the affitor_click_id cookie), partner_code and cookie_window_days.

ParameterTypeDescription
affiliateUrlstringThe full link the visitor arrived on, carrying the partner code in ?aff= (or ?via=), such as https://example.com/?aff=maya. The API needs it to find the partner; without it the call fails.
existingClickIdstringThe visitor's current affitor_click_id, so a repeat visit keeps the same click id. Send only an id that this program's tracker set. Leave it out to get a new one.
pageUrlstringThe page the visitor landed on, if it differs from affiliateUrl. Leave it out to record affiliateUrl as the landing page.
referrerUrlstringThe page that linked to you (the HTTP Referer), stored with the click to show where traffic came from. Leave it out when there is none.

affitor_get_integration_plan

Get the exact steps to connect a payment stack to Affitor: the install, the checkout metadata snippet, the trackSale snippet and the file it goes in, and the check that proves it works. Use it before writing integration code, instead of guessing the contract. Works offline: it reads a built-in recipe list and calls no API.

ParameterTypeDescription
framework *stringThe app's framework, read from its package.json and folders: next-app (app/ router), next-pages (pages/ router), fastify, express, node, or unknown. It decides which file the sale snippet goes in.
modestringHow sales reach Affitor. stripe_connect: the brand's connected Stripe account reports sales, so the plan only adds checkout metadata. s2s: your payment webhook calls trackSale. Leave it out for stripe…
providerstringThe payment provider the app checks out with, read from its dependencies. Leave it out for stripe.

affitor_run_verification

Prove the integration works: send a test click, lead and sale through Affitor's real attribution pipeline, recorded as is_test rows that are never paid. Use it after setup, then poll affitor_readiness until integration_verified is true. Limited to 10 runs per program per hour; on rate_limited, wait retry_after_seconds. Returns the API response, with http_status added on an error.