Yapay zeka ajanlarının tıklama, potansiyel müşteri, satış ve iade raporları oluşturarak bağlılık programlarını yönetmesine ve entegrasyon hazırlığını takip etmesine olanak tanır.
Ayrıca bilinen adı Affitor/cli, mcp, @affitor/mcp
- Yıldızlar
- 0
- Araçlar
- 10
- İndirmeler, 30 gün
- 750
- En son sürüm
- 0.2.5
- Son commit
- 21 Eki 2026
- Lisans
- MIT
Affitor MCP nedir?
Affitor bir MCP sunucusudur. Yapay zeka ajanlarının tıklama, potansiyel müşteri, satış ve iade raporları oluşturarak bağlılık programlarını yönetmesine ve entegrasyon hazırlığını takip etmesine olanak tanır. 10 araç sunar; örneğin affitor_readiness, affitor_track_lead, affitor_track_sale.
Özet, projenin README dosyasından oluşturuldu
Affitor MCP sunucusu hakkında
Claude Desktop veya Cursor gibi istemcilerin tıklama, potansiyel müşteri, satış ve iade raporlamasına olanak tanıyan Affitor ile bağlılık programlarını yapay zeka ajanları aracılığıyla yönetmek mümkündür. Bu stdio sunucusu, ajanınızı AFFITOR_API_KEY ortam değişkeni ile sağlanan bir program API key kullanarak Affitor platformuna bağlar. Doğrudan geliştirme ortamınızdan bağlılık atıf takibini ve entegrasyon durumunu otomatikleştirmek isteyen geliştiriciler için tasarlanmıştır.
Yanlışlıkla finansal değişiklikleri önlemek için, affitor_track_sale ve affitor_track_refund araçları kullanılabilir hale gelmeden önce AFFITOR_MCP_WRITE ortam değişkeninin 1 olarak ayarlanması gerekir. Sunucu ayrıca, uygulama adımlarını almak için affitor_get_integration_plan ve atıf hattını test etmek için affitor_run_verification gibi teknik kurulum için özelleşmiş araçlar içerir. Kullanıcılar ayrıca engelleyicileri veya gerekli sonraki adımları kontrol etmek için affitor_readiness aracını kullanarak kurulum ilerlemelerini izleyebilirler.
Neler yapabilirsiniz
- 1Bağlılık entegrasyon hazırlığını doğrulayınMevcut bağlılık programı kurulumunun tam olarak doğrulandığını ve üretime hazır olup olmadığını kontrol etmesi için ajana talimat verin.
- 2Yeni müşteri satışlarını raporlayınBelirli bir fatura ID'sini kullanarak tamamlanmış bir işlemi ve ilgili komisyonu kaydetmesi için ajana talimat verin.
- 3Teknik uygulama planları oluşturunBelirli bir web framework ve ödeme sağlayıcısı yığınına takip kod parçacıklarını eklemek için adım adım bir kılavuz isteyin.
- 4İşlem iadelerini işleyinDaha önce kaydedilmiş bir fatura için tam veya kısmi iade bildirerek ajanın bir komisyonu tersine çevirmesini sağlayın.
Projenin README dosyasından alınmıştır. Her kullanım durumu, oradaki bir alıntı ile kontrol edilir.
Affitor MCP nasıl yüklenir
Biçimler 10 Kas 2026 tarihinde doğrulandıCursor'a ekleGoose'a ekleAffitor MCP'yi Claude Code içine yükleyin
$ claude mcp add --env 'AFFITOR_API_KEY=<YOUR_AFFITOR_API_KEY>' mcp -- npx -y @affitor/mcpAffitor MCP'yi Cursor içine yükleyin
~/.cursor/mcp.json
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@affitor/mcp"
],
"env": {
"AFFITOR_API_KEY": "<YOUR_AFFITOR_API_KEY>"
}
}
}
}Affitor MCP'yi VS Code içine yükleyin
.vscode/mcp.json
{
"servers": {
"mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@affitor/mcp"
],
"env": {
"AFFITOR_API_KEY": "<YOUR_AFFITOR_API_KEY>"
}
}
}
}Affitor MCP'yi VS Code CLI içine yükleyin
$ code --add-mcp '{"name":"mcp","type":"stdio","command":"npx","args":["-y","@affitor/mcp"],"env":{"AFFITOR_API_KEY":"<YOUR_AFFITOR_API_KEY>"}}'Affitor MCP'yi Claude Desktop içine yükleyin
claude_desktop_config.json
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@affitor/mcp"
],
"env": {
"AFFITOR_API_KEY": "<YOUR_AFFITOR_API_KEY>"
}
}
}
}Affitor MCP'yi Codex içine yükleyin
$ codex mcp add mcp --env 'AFFITOR_API_KEY=<YOUR_AFFITOR_API_KEY>' -- npx -y @affitor/mcpAffitor MCP'yi Codex config.toml içine yükleyin
~/.codex/config.toml
[mcp_servers.mcp] command = "npx" args = ["-y", "@affitor/mcp"] [mcp_servers.mcp.env] AFFITOR_API_KEY = "<YOUR_AFFITOR_API_KEY>"
Affitor MCP'yi Gemini CLI içine yükleyin
$ gemini mcp add -s user -e 'AFFITOR_API_KEY=<YOUR_AFFITOR_API_KEY>' mcp npx -- -y @affitor/mcpAffitor MCP'yi Gemini settings.json içine yükleyin
~/.gemini/settings.json
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@affitor/mcp"
],
"env": {
"AFFITOR_API_KEY": "<YOUR_AFFITOR_API_KEY>"
}
}
}
}Affitor MCP araçları 10
README dosyasından algılandıaffitor_readinessaffitor_track_leadaffitor_track_saleaffitor_track_refundaffitor_track_clickaffitor_get_integration_planaffitor_run_verificationamountinvoiceIdframework
| affitor_readiness | — | |
| affitor_track_lead | — | |
| affitor_track_sale | — | |
| affitor_track_refund | — | |
| affitor_track_click | — | |
| affitor_get_integration_plan | — | |
| affitor_run_verification | — | |
| amount | — | |
| invoiceId | — | |
| framework | — |
Yapılandırma
AFFITOR_API_KEYGerekliGizliYour Affitor program API key. Server-side only.
AFFITOR_API_URLAPI base override. Defaults to https://api.affitor.com.
AFFITOR_MCP_WRITESet to 1 to register the two tools that move money (track sale, track refund). Off by default.
| Ad | Açıklama | Sunucu |
|---|---|---|
| AFFITOR_API_KEY | Your Affitor program API key. Server-side only. | GerekliGizli |
| AFFITOR_API_URL | API base override. Defaults to https://api.affitor.com. | |
| AFFITOR_MCP_WRITE | Set to 1 to register the two tools that move money (track sale, track refund). Off by default. |
Otomatik kontroller
Çalıştırıldı 12 Kas 2026Tam rapor →Otomatik kontrollerimizden geçti. Bu bir güvenlik denetimi değildir: kodu okuyun ve sunucuya ihtiyaç duyduğu en dar erişimi verin. Kontroller nasıl çalışır
- Kaynak deposu bağlantılı ve erişilebilirGeçti
- Açık kaynak lisansı (OSI)Geçti
- Son bir yıl içinde commit veya sürüm mevcutGeçti
- Paket adı popüler bir pakete yakın değilGeçti
- Uzak uç nokta HTTPS kullanıyorGeçti
- Yıkıcı araçlar etiketlenmişGeçti
- Modele yönelik gizli talimat yokGeçti
- Pakette veya bağımlılıklarında kritik uyarı yokGeçti
@affitor/mcp
A Model Context Protocol (MCP) stdio server for Affitor.
It exposes Affitor's affiliate-tracking capabilities as MCP tools so AI agents — Claude Desktop, Cursor, and any other MCP client — can report clicks, leads, sales and refunds, and poll integration readiness, directly as tool calls.
Under the hood it wraps the consolidated server client @affitor/sdk/server (the Affitor class). Authentication is your program API key, supplied via the AFFITOR_API_KEY environment variable.
Add it to your MCP client
Add this to your client's MCP server config (e.g. claude_desktop_config.json for Claude Desktop, or .cursor/mcp.json for Cursor):
{
"mcpServers": {
"affitor": {
"command": "npx",
"args": ["-y", "@affitor/mcp"],
"env": {
"AFFITOR_API_KEY": "your_program_key"
}
}
}
}
Restart your client and the affitor tools will be available to the agent.
Environment variables
| Variable | Required | Description |
|---|---|---|
AFFITOR_API_KEY |
Yes | Your Affitor program API key (Bearer). Server-side only — never ship it to a browser. |
AFFITOR_API_URL |
No | API base override. Defaults to https://api.affitor.com. |
AFFITOR_MCP_WRITE |
No | Set to 1 to register the two tools that move money: affitor_track_sale and affitor_track_refund. Off by default, so an agent exploring tools cannot create a real sale or reverse a commission. |
If AFFITOR_API_KEY is not set, the server prints a clear message to stderr and exits.
Tools
Every tool carries MCP annotations (readOnlyHint, destructiveHint, idempotentHint), so a client can ask before a write. affitor_track_sale and affitor_track_refund are marked destructive and only exist with AFFITOR_MCP_WRITE=1.
| Tool | Description |
|---|---|
affitor_readiness |
Check this program's integration/onboarding readiness — returns a 5-gate verdict + blocker + next_action. Poll until integration_verified is true. |
affitor_track_lead |
Report a lead/signup. Binds the customer to the click so later sales attribute by customerExternalId alone. |
affitor_track_sale |
Needs AFFITOR_MCP_WRITE=1. Report a sale: creates a real sale and commission unless testMode is true. Resolves attribution by customerExternalId (bound at lead time). |
affitor_track_refund |
Needs AFFITOR_MCP_WRITE=1. Report a refund (omit amount = full → commission reversed; partial → refunded). Idempotent by invoiceId. testMode is a dry run. |
affitor_track_click |
Report a click (usually browser-side; public, no customer needed). |
affitor_get_integration_plan |
Return the deterministic payment-tracking integration plan for a stack — install, checkout-metadata snippet, trackSale snippet + where to inject it, and the verify step. Pure — reads the canonical @affitor/recipes registry; no SDK client, no network, no side-effects. The agent follows this instead of guessing a contract. |
affitor_run_verification |
Fire the synthetic click → lead → sale verification chain through Affitor's REAL attribution pipeline (isolated is_test rows). The agent's proof step: run it, then poll affitor_readiness until integration_verified is true. Rate-limited to 10/program/hour — on a rate_limited result, wait retry_after_seconds, don't hammer. |
Inputs
affitor_readiness
forceRecheck?: boolean— force a fresh server-side recheck instead of the cached verdict.
affitor_track_lead (one of customerExternalId / clickId is required)
customerExternalId?: string— your own user id; binds this customer to the click.clickId?: string— Affitor click id (from theaffitor_click_idcookie).email?: stringtestMode?: boolean— record a test lead (is_test).
affitor_track_sale (one of customerExternalId / clickId is required)
customerExternalId?: string— your own user id; resolves attribution (noclickIdneeded once bound at lead time).clickId?: stringamount: number— sale amount in integer cents (e.g.4999= $49.99).invoiceId: string— idempotency key (your invoice / transaction id).currency?: string— ISO currency code (defaultUSD).saleType?: "payment" | "subscription"isRecurring?: booleansubscriptionId?: stringsubscriptionInterval?: "monthly" | "quarterly" | "annual"testMode?: boolean— record a test sale (is_test, no commission), sent as transactiontest_<invoiceId>so it never blocks the real sale with the same invoice.
affitor_track_refund
invoiceId: string— the sale's idempotency key (theinvoiceIdyou passed toaffitor_track_sale).refundAmountCents?: number— integer cents. Omit (or0) = full refund → commission reversed; partial → refunded.refundReason?: stringtestMode?: boolean— dry run: returns the refund that would be sent and calls nothing (the API has no test refunds).
affitor_track_click (all optional)
affiliateUrl?: stringpageUrl?: stringreferrerUrl?: stringexistingClickId?: string
affitor_get_integration_plan
framework: "next-app" | "next-pages" | "fastify" | "express" | "node" | "unknown"— the detected app framework; determines wheretrackSaleis injected.provider?: "stripe" | "polar" | "lemonsqueezy" | "paddle" | "unknown"— the detected payment provider (defaultstripe).mode?: "stripe_connect" | "s2s"— payment-tracking mode (defaultstripe_connect).stripe_connect= Connect autocaptures the sale (metadata only, notrackSale);s2s= injecttrackSalein your webhook. Returns{ steps, recipe }.
affitor_run_verification (no input)
- Fires the synthetic verification chain and returns the parsed result. On a rate limit it returns
{ http_status: 429, retry_after_seconds, … }rather than throwing — back off and retry.
Each tool returns the Affitor API's JSON payload as text content. On a failed request (a thrown error or an { ok: false } envelope) the tool returns an MCP error result with the message.
License
MIT
Affitor MCP soruları
Affitor MCP'yi Claude Code'a nasıl eklerim?
Terminalinizde claude mcp add --env 'AFFITOR_API_KEY=<YOUR_AFFITOR_API_KEY>' mcp -- npx -y @affitor/mcp komutunu çalıştırın. Her projede kullanılabilir olması için --scope user ekleyin.
Affitor MCP'yi Cursor'a nasıl eklerim?
~/.cursor/mcp.json dosyasını açın ve yukarıdaki yükleme bölümünde gösterilen Cursor yapılandırmasını kullanarak sunucuyu mcpServers altına ekleyin.
Affitor MCP hangi araçları sunar?
10 araç sunar; bunlar arasında affitor_readiness, affitor_track_lead, affitor_track_sale, affitor_track_refund, affitor_track_click yer alır.
Satış ve iade takibini nasıl etkinleştiririm?
Para transferi işlemlerini gerçekleştiren araçları etkinleştirmek için AFFITOR_MCP_WRITE ortam değişkenini 1 olarak ayarlamanız gerekir.
Affitor hangi kimlik doğrulama yöntemini kullanıyor?
Sunucu, AFFITOR_API_KEY ortam değişkeni aracılığıyla sağlanan bir program API key kullanır.
Entegrasyonumun doğru çalışıp çalışmadığını nasıl doğrulayabilirim?
Gerçek atıf hattı üzerinden sentetik bir tıklama, potansiyel müşteri ve satış doğrulama zinciri çalıştırmak için affitor_run_verification aracını kullanabilirsiniz.
Gerçek komisyonları etkilemeden satışları test edebilir miyim?
Evet, gerçek bir komisyon oluşturmayan bir test satışı kaydetmek için testMode parametresini kullanabilirsiniz.