클릭, 리드, 판매 및 환불을 보고하고 통합 준비 상태를 추적하여 AI 에이전트가 제휴 프로그램을 관리할 수 있도록 합니다.
다른 이름 Affitor/cli, mcp, @affitor/mcp
- 스타
- 0
- Tools
- 10
- 다운로드, 30일
- 750
- 최신 버전
- 0.2.5
- 마지막 커밋
- 2026년 10월 21일
- 라이선스
- MIT
Affitor MCP란?
Affitor은(는) MCP server입니다. 클릭, 리드, 판매 및 환불을 보고하고 통합 준비 상태를 추적하여 AI 에이전트가 제휴 프로그램을 관리할 수 있도록 합니다. 10개 도구를 제공합니다. 예: affitor_readiness, affitor_track_lead, affitor_track_sale.
프로젝트 README에서 생성된 요약
Affitor MCP server 정보
Affitor를 사용하면 Claude Desktop 또는 Cursor와 같은 클라이언트가 클릭, 리드, 판매 및 환불을 보고할 수 있어 AI 에이전트를 통한 제휴 프로그램 관리가 가능합니다. 이 stdio 서버는 AFFITOR_API_KEY 환경 변수를 통해 제공되는 프로그램 API key를 사용하여 에이전트를 Affitor 플랫폼에 연결합니다. 개발 환경에서 제휴 어트리뷰션 및 통합 상태 추적을 직접 자동화하려는 개발자를 위해 설계되었습니다.
실수로 인한 금융 변경을 방지하기 위해, affitor_track_sale 및 affitor_track_refund 도구를 사용하려면 AFFITOR_MCP_WRITE 환경 변수가 1로 설정되어 있어야 합니다. 또한 이 서버에는 구현 단계를 가져오는 affitor_get_integration_plan 및 어트리뷰션 파이프라인을 테스트하는 affitor_run_verification과 같은 기술적 설정을 위한 전문 도구가 포함되어 있습니다. 사용자는 affitor_readiness 도구를 사용하여 차단 요소나 필요한 다음 작업을 확인하고 설정 진행 상황을 모니터링할 수 있습니다.
활용 사례
- 1제휴 통합 준비 상태 확인현재 제휴 프로그램 설정이 완전히 검증되었으며 운영 환경에 적용할 준비가 되었는지 에이전트에게 확인하도록 요청합니다.
- 2신규 고객 판매 보고에이전트에게 특정 인보이스 ID를 사용하여 완료된 트랜잭션과 관련 수수료를 기록하도록 지시합니다.
- 3기술 구현 계획 생성특정 웹 프레임워크 및 결제 제공업체 스택에 추적 스니펫을 삽입하기 위한 단계별 가이드를 요청합니다.
- 4트랜잭션 환불 처리이전에 기록된 인보이스에 대해 전체 또는 부분 환불을 보고하여 에이전트가 수수료를 취소하도록 합니다.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
Affitor MCP 설치 방법
형식 확인: 2026년 11월 10일Cursor에 추가Goose에 추가Claude Code에 Affitor MCP 설치
$ claude mcp add --env 'AFFITOR_API_KEY=<YOUR_AFFITOR_API_KEY>' mcp -- npx -y @affitor/mcpCursor에 Affitor MCP 설치
~/.cursor/mcp.json
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@affitor/mcp"
],
"env": {
"AFFITOR_API_KEY": "<YOUR_AFFITOR_API_KEY>"
}
}
}
}VS Code에 Affitor MCP 설치
.vscode/mcp.json
{
"servers": {
"mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@affitor/mcp"
],
"env": {
"AFFITOR_API_KEY": "<YOUR_AFFITOR_API_KEY>"
}
}
}
}VS Code CLI에 Affitor MCP 설치
$ code --add-mcp '{"name":"mcp","type":"stdio","command":"npx","args":["-y","@affitor/mcp"],"env":{"AFFITOR_API_KEY":"<YOUR_AFFITOR_API_KEY>"}}'Claude Desktop에 Affitor MCP 설치
claude_desktop_config.json
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@affitor/mcp"
],
"env": {
"AFFITOR_API_KEY": "<YOUR_AFFITOR_API_KEY>"
}
}
}
}Codex에 Affitor MCP 설치
$ codex mcp add mcp --env 'AFFITOR_API_KEY=<YOUR_AFFITOR_API_KEY>' -- npx -y @affitor/mcpCodex config.toml에 Affitor MCP 설치
~/.codex/config.toml
[mcp_servers.mcp] command = "npx" args = ["-y", "@affitor/mcp"] [mcp_servers.mcp.env] AFFITOR_API_KEY = "<YOUR_AFFITOR_API_KEY>"
Gemini CLI에 Affitor MCP 설치
$ gemini mcp add -s user -e 'AFFITOR_API_KEY=<YOUR_AFFITOR_API_KEY>' mcp npx -- -y @affitor/mcpGemini settings.json에 Affitor MCP 설치
~/.gemini/settings.json
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@affitor/mcp"
],
"env": {
"AFFITOR_API_KEY": "<YOUR_AFFITOR_API_KEY>"
}
}
}
}Affitor MCP 도구 10
README에서 감지됨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 | — |
구성
AFFITOR_API_KEY필수비밀Your 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.
| 이름 | 설명 | 유형 |
|---|---|---|
| AFFITOR_API_KEY | Your Affitor program API key. Server-side only. | 필수비밀 |
| 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. |
자동 검사
2026년 11월 12일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 이는 보안 감사가 아닙니다. 코드를 직접 읽고 서버에 필요한 최소한의 권한만 부여하십시오. 검사 방식
- 소스 저장소 연결 및 접근 가능통과
- 오픈 소스 라이선스 (OSI)통과
- 최근 1년 내 커밋 또는 릴리스통과
- 패키지 이름이 인기 패키지와 유사하지 않음통과
- 원격 엔드포인트가 HTTPS 사용통과
- 파괴적인 도구에 라벨 표시됨통과
- 모델에 대한 숨겨진 지침 없음통과
- 패키지 및 해당 종속성에 중요한 보안 권고 없음통과
README
GitHub에서 보기@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 질문
Affitor MCP를 Claude Code에 추가하려면 어떻게 하나요?
터미널에서 claude mcp add --env 'AFFITOR_API_KEY=<YOUR_AFFITOR_API_KEY>' mcp -- npx -y @affitor/mcp를 실행합니다. 모든 프로젝트에서 사용할 수 있게 하려면 --scope user를 추가합니다.
Affitor MCP를 Cursor에 추가하려면 어떻게 하나요?
~/.cursor/mcp.json를 열고 mcpServers 아래에 서버를 추가합니다. 위 설치 섹션에 표시된 Cursor 구성을 사용합니다.
Affitor MCP는 어떤 도구를 제공하나요?
10개 도구를 제공합니다. 예: affitor_readiness, affitor_track_lead, affitor_track_sale, affitor_track_refund, affitor_track_click.
판매 및 환불 추적을 활성화하려면 어떻게 해야 하나요?
자금 이동 관련 도구를 활성화하려면 AFFITOR_MCP_WRITE 환경 변수를 1로 설정해야 합니다.
Affitor는 어떤 인증 방식을 사용하나요?
이 서버는 AFFITOR_API_KEY 환경 변수를 통해 제공되는 프로그램 API key를 사용합니다.
통합이 올바르게 작동하는지 어떻게 확인할 수 있나요?
affitor_run_verification 도구를 사용하여 실제 어트리뷰션 파이프라인을 통해 가상의 클릭, 리드 및 판매 검증 체인을 실행할 수 있습니다.
실제 수수료에 영향을 주지 않고 판매를 테스트할 수 있나요?
네, testMode 파라미터를 사용하여 실제 수수료를 생성하지 않는 테스트 판매를 기록할 수 있습니다.