Affitor — Claude Code MCP server: what it does, how to install
Connects Affitor affiliate tools to AI agents. It tracks referrals, checks onboarding readiness, and guides payment integrations.
claude mcp add --transport http mcp https://mcp.affitor.com/mcpWhat Affitor does
The server exposes Affitor affiliate features to MCP clients through a stdio interface. Coding assistants can inspect onboarding progress, register referral clicks, bind customer signups, and generate payment tracking snippets for frameworks like Next.js or Fastify.
Writing operations that touch balance or commission records stay disabled by default. You have to pass AFFITOR_MCP_WRITE=1 to expose sale and refund tools to the model. Without AFFITOR_API_KEY, the process exits immediately with a message on stderr. Synthetic test runs also enforce a rate limit of 10 executions per hour for each program.
What it helps with
- fetch code snippets for payment attribution based on the tech stack
- verify onboarding readiness gates before going live
- record referral clicks and bind user IDs to signups
- run synthetic verification passes without billing real commissions
Example prompts for the agent
- Check the Affitor integration readiness for our project.
- Get the payment tracking implementation steps for Stripe and Express.
- Execute a synthetic attribution verification run in Affitor.
How to install Affitor
1Platform CLI: remote server
claude mcp add --transport http mcp https://mcp.affitor.com/mcp2Platform CLI
claude mcp add --env AFFITOR_API_KEY=<AFFITOR_API_KEY> --env AFFITOR_API_URL=<AFFITOR_API_URL> --env AFFITOR_MCP_WRITE=<AFFITOR_MCP_WRITE> --transport stdio mcp -- npx -y @affitor/mcpReplace <…> with your own values
1Platform CLI: remote server
codex mcp add mcp --url https://mcp.affitor.com/mcp2Platform CLI
codex mcp add mcp --env AFFITOR_API_KEY=<AFFITOR_API_KEY> --env AFFITOR_API_URL=<AFFITOR_API_URL> --env AFFITOR_MCP_WRITE=<AFFITOR_MCP_WRITE> -- npx -y @affitor/mcpReplace <…> with your own values
Config file
{
"mcpServers": {
"mcp": {
"url": "https://mcp.affitor.com/mcp"
}
}
}{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@affitor/mcp"
],
"env": {
"AFFITOR_API_KEY": "<AFFITOR_API_KEY>",
"AFFITOR_API_URL": "<AFFITOR_API_URL>",
"AFFITOR_MCP_WRITE": "<AFFITOR_MCP_WRITE>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"mcp": {
"type": "http",
"url": "https://mcp.affitor.com/mcp"
}
}
}{
"servers": {
"mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@affitor/mcp"
],
"env": {
"AFFITOR_API_KEY": "<AFFITOR_API_KEY>",
"AFFITOR_API_URL": "<AFFITOR_API_URL>",
"AFFITOR_MCP_WRITE": "<AFFITOR_MCP_WRITE>"
}
}
}
}Replace <…> with your own values
1Platform CLI: remote server
gemini mcp add -t http mcp https://mcp.affitor.com/mcp2Platform CLI
gemini mcp add -e AFFITOR_API_KEY=<AFFITOR_API_KEY> -e AFFITOR_API_URL=<AFFITOR_API_URL> -e AFFITOR_MCP_WRITE=<AFFITOR_MCP_WRITE> mcp npx -y @affitor/mcpReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Affitor
How do I install Affitor in Claude Code?
Run `claude mcp add --env AFFITOR_API_KEY=<AFFITOR_API_KEY> --env AFFITOR_API_URL=<AFFITOR_API_URL> --env AFFITOR_MCP_WRITE=<AFFITOR_MCP_WRITE> --transport stdio mcp -- npx -y @affitor/mcp` in your terminal.
What does Affitor do?
It provides affiliate attribution tools to AI agents. Agents can query setup instructions, test attribution flows, and track referral conversions.
Why are sale and refund tracking tools unavailable?
Tools modifying revenue or commissions require AFFITOR_MCP_WRITE=1 in your environment. They stay hidden until that variable is explicitly provided.