{"_id":"@affise/mcp-server","_rev":"7-b2bee8f3948d8f6bcd4bc99867d6a656","name":"@affise/mcp-server","dist-tags":{"latest":"3.2.1"},"versions":{"2.0.0":{"name":"@affise/mcp-server","version":"2.0.0","keywords":["mcp","affise","api","affiliate","marketing","analytics"],"author":"","license":"ISC","_id":"@affise/mcp-server@2.0.0","maintainers":[{"name":"affise","email":"vk@affise.com"}],"homepage":"https://github.com/affise/mcp-affise#readme","bugs":{"url":"https://github.com/affise/mcp-affise/issues"},"bin":{"affise-mcp-server":"build/index.js"},"dist":{"shasum":"6cc5fbfc81b39c6d1b8705c6de24fea9c1cea4ed","tarball":"https://registry.npmjs.org/@affise/mcp-server/-/mcp-server-2.0.0.tgz","fileCount":141,"integrity":"sha512-xGjjYcEtQKb70Cner8gNvY0BAChTO/in/F54Xk1JljS34izW+SGddCVkDbQkmu4y7Joshr3DPTotkMgIp9zoMw==","signatures":[{"sig":"MEUCIQDR9MgHP092QsCLjkgj6ldqHf0lg+MMsd4tzVa9uj2qzgIgC8qUnrhsnwg+pY9TC62iYeOycXng8J74BuIl7qbImZM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@affise%2fmcp-server@2.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1108760},"main":"build/index.js","type":"module","types":"./build/index.d.ts","gitHead":"ac23285f6cbdd46de090ac2229fa272fc389a003","scripts":{"dev":"tsx src/index.ts","test":"vitest run","build":"npm run security:audit && tsc && chmod +x build/index.js","clean":"rm -rf build dist coverage","start":"npm run build && node build/index.js","rebuild":"npm run clean && npm run build","test-dxt":"npm run build-dxt && npm run validate-dxt","build-dxt":"npm run build && npm prune --omit=dev && npm run package-dxt && npm install --no-audit --no-fund","docker:up":"docker-compose up -d","test:unit":"vitest run tests/unit tests/services","test:watch":"vitest","docker:down":"docker-compose down","docker:logs":"docker-compose logs -f","package-dxt":"npx -y -p @anthropic-ai/dxt dxt pack","build:unsafe":"tsc && chmod +x build/index.js","docker:build":"docker build -t affise-mcp-server .","security:fix":"npm audit fix","validate-dxt":"npx -y -p @anthropic-ai/dxt dxt validate manifest.json","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build","security:audit":"npm audit --audit-level moderate","security:check":"npm outdated && npm audit","test:integration":"vitest run tests/integration"},"_npmUser":{"name":"affise","email":"vk@affise.com"},"repository":{"url":"git+https://github.com/affise/mcp-affise.git","type":"git"},"_npmVersion":"10.9.8","description":"MCP server for the Affise public API: stdio transport, 23 tools, 6 analysis prompts","directories":{},"_nodeVersion":"22.22.3","dependencies":{"axios":"^1.15.2","dotenv":"^16.5.0","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.4","vitest":"^4.1.6","typescript":"^5.8.3","@types/node":"^22.15.27","@vitest/coverage-v8":"^4.1.6"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server_2.0.0_1780493020449_0.4910382952712413","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"name":"@affise/mcp-server","version":"2.0.1","keywords":["mcp","affise","api","affiliate","marketing","analytics"],"author":"","license":"ISC","_id":"@affise/mcp-server@2.0.1","maintainers":[{"name":"affise","email":"vk@affise.com"}],"homepage":"https://github.com/affise/mcp-affise#readme","bugs":{"url":"https://github.com/affise/mcp-affise/issues"},"bin":{"affise-mcp-server":"build/index.js"},"dist":{"shasum":"60d5ff908f7f6437f8a7ce6e636d3e990c2aa4c4","tarball":"https://registry.npmjs.org/@affise/mcp-server/-/mcp-server-2.0.1.tgz","fileCount":141,"integrity":"sha512-/fRnQHPNXCrI6rLxyuXHnf7GuB3suo6m0Dm/d5ipLD5AOMxAZhTGf775ExQSCz/8bshhjVYxV2tWHlOkvz5d9Q==","signatures":[{"sig":"MEQCIBipVAF1xchAuiPahUe+3nmMVI5P3z0ilKl7nU0BSKqmAiAVLdiI4oSLci5ELcA4YGNwQ4AG2hzYBoS7EwMJZeJwsQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@affise%2fmcp-server@2.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1112369},"main":"build/index.js","type":"module","types":"./build/index.d.ts","gitHead":"5a452c1e85ac7a1a6afcbd63c0edf3aa4d5752c4","scripts":{"dev":"tsx src/index.ts","test":"vitest run","build":"npm run security:audit && tsc && chmod +x build/index.js","clean":"rm -rf build dist coverage","start":"npm run build && node build/index.js","rebuild":"npm run clean && npm run build","test-dxt":"npm run build-dxt && npm run validate-dxt","build-dxt":"npm run build && npm prune --omit=dev && npm run package-dxt && npm install --no-audit --no-fund","docker:up":"docker-compose up -d","test:unit":"vitest run tests/unit tests/services","test:watch":"vitest","docker:down":"docker-compose down","docker:logs":"docker-compose logs -f","package-dxt":"npx -y -p @anthropic-ai/dxt dxt pack","build:unsafe":"tsc && chmod +x build/index.js","docker:build":"docker build -t affise-mcp-server .","security:fix":"npm audit fix","validate-dxt":"npx -y -p @anthropic-ai/dxt dxt validate manifest.json","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build","security:audit":"npm audit --audit-level moderate","security:check":"npm outdated && npm audit","test:integration":"vitest run tests/integration"},"_npmUser":{"name":"affise","email":"vk@affise.com"},"repository":{"url":"git+https://github.com/affise/mcp-affise.git","type":"git"},"_npmVersion":"10.9.8","description":"MCP server for the Affise public API: stdio transport, 23 tools, 6 analysis prompts","directories":{},"_nodeVersion":"22.22.3","dependencies":{"axios":"^1.15.2","dotenv":"^16.5.0","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.4","vitest":"^4.1.6","typescript":"^5.8.3","@types/node":"^22.15.27","@vitest/coverage-v8":"^4.1.6"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server_2.0.1_1780928356239_0.7178366812325558","host":"s3://npm-registry-packages-npm-production"}},"2.0.3":{"name":"@affise/mcp-server","version":"2.0.3","keywords":["mcp","affise","api","affiliate","marketing","analytics"],"author":"","license":"ISC","_id":"@affise/mcp-server@2.0.3","maintainers":[{"name":"affise","email":"vk@affise.com"}],"homepage":"https://github.com/affise/mcp-affise#readme","bugs":{"url":"https://github.com/affise/mcp-affise/issues"},"bin":{"affise-mcp-server":"build/index.js"},"dist":{"shasum":"557013cb7723c97befd2d01a135a0ef1bfd6082f","tarball":"https://registry.npmjs.org/@affise/mcp-server/-/mcp-server-2.0.3.tgz","fileCount":141,"integrity":"sha512-xogm4tB/jauGa9ziyHqs+rNpXQy/rmlywUE4FkTTEulGQl35k7hwMcFjJN9Vu+gUTuJ97y53tI0JRROGRHqL0w==","signatures":[{"sig":"MEYCIQDi8LxEjyyRNR3mYE00mFEsY/15UbIIUF+4SmJOENGVIwIhAIX3zPANpJyXApRHFBg81BCaT9YgNBD08teteyUai4/X","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@affise%2fmcp-server@2.0.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1123464},"main":"build/index.js","type":"module","types":"./build/index.d.ts","gitHead":"e227c02796343f70cd5f8f10ee4684ff8d1912c8","scripts":{"dev":"tsx src/index.ts","test":"vitest run","build":"npm run security:audit && tsc && chmod +x build/index.js","clean":"rm -rf build dist coverage","start":"npm run build && node build/index.js","rebuild":"npm run clean && npm run build","test-dxt":"npm run build-dxt && npm run validate-dxt","build-dxt":"npm run build && npm prune --omit=dev && npm run package-dxt && npm install --no-audit --no-fund","docker:up":"docker-compose up -d","test:unit":"vitest run tests/unit tests/services","test:watch":"vitest","docker:down":"docker-compose down","docker:logs":"docker-compose logs -f","package-dxt":"npx -y -p @anthropic-ai/dxt dxt pack","build:unsafe":"tsc && chmod +x build/index.js","docker:build":"docker build -t affise-mcp-server .","security:fix":"npm audit fix","validate-dxt":"npx -y -p @anthropic-ai/dxt dxt validate manifest.json","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build","security:audit":"npm audit --audit-level moderate","security:check":"npm outdated && npm audit","test:integration":"vitest run tests/integration"},"_npmUser":{"name":"affise","email":"vk@affise.com"},"repository":{"url":"git+https://github.com/affise/mcp-affise.git","type":"git"},"_npmVersion":"10.9.8","description":"MCP server for the Affise public API: stdio transport, 23 tools, 6 analysis prompts","directories":{},"_nodeVersion":"22.23.1","dependencies":{"axios":"^1.15.2","dotenv":"^17.4.2","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.4","vitest":"^4.1.6","typescript":"^5.8.3","@types/node":"^26.1.2","@vitest/coverage-v8":"^4.1.6"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server_2.0.3_1785838481251_0.37544139905684415","host":"s3://npm-registry-packages-npm-production"}},"2.1.0":{"name":"@affise/mcp-server","version":"2.1.0","keywords":["mcp","affise","api","affiliate","marketing","analytics"],"author":"","license":"ISC","_id":"@affise/mcp-server@2.1.0","maintainers":[{"name":"affise","email":"vk@affise.com"}],"homepage":"https://github.com/affise/mcp-affise#readme","bugs":{"url":"https://github.com/affise/mcp-affise/issues"},"bin":{"affise-mcp-server":"build/index.js"},"dist":{"shasum":"24b2920cbc8ae7a1fcffde8e956913e3a2e40441","tarball":"https://registry.npmjs.org/@affise/mcp-server/-/mcp-server-2.1.0.tgz","fileCount":141,"integrity":"sha512-q2mHDXlCIk6ELiY25HP4HeSbLNkdregRG4MKNwAsolqM/pQRtAer26b6OrfQ7FGbuTE5hluSqtZWW+LlFlh+pA==","signatures":[{"sig":"MEQCICDDeQ1deNlHh8qK29BVmNnQax9/9xG4PY180THEVVSwAiAD+HKpiHzApDJXaMYFQ2rrRfH5fb9c2SZMhkdRF3usrA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@affise%2fmcp-server@2.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1128108},"main":"build/index.js","type":"module","types":"./build/index.d.ts","gitHead":"a19de8f535ccc291a0f87bce2e74cb8cc002ef56","scripts":{"dev":"tsx src/index.ts","test":"vitest run","build":"npm run security:audit && tsc && chmod +x build/index.js","clean":"rm -rf build dist coverage","start":"npm run build && node build/index.js","rebuild":"npm run clean && npm run build","test-dxt":"npm run build-dxt && npm run validate-dxt","build-dxt":"npm run build && npm prune --omit=dev && npm run package-dxt && npm install --no-audit --no-fund","docker:up":"docker-compose up -d","test:unit":"vitest run tests/unit tests/services","test:watch":"vitest","docker:down":"docker-compose down","docker:logs":"docker-compose logs -f","package-dxt":"npx -y -p @anthropic-ai/dxt dxt pack","build:unsafe":"tsc && chmod +x build/index.js","docker:build":"docker build -t affise-mcp-server .","security:fix":"npm audit fix","validate-dxt":"npx -y -p @anthropic-ai/dxt dxt validate manifest.json","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build","security:audit":"npm audit --audit-level moderate","security:check":"npm outdated && npm audit","test:integration":"vitest run tests/integration"},"_npmUser":{"name":"affise","email":"vk@affise.com"},"repository":{"url":"git+https://github.com/affise/mcp-affise.git","type":"git"},"_npmVersion":"10.9.8","description":"MCP server for the Affise public API: stdio transport, 23 tools, 6 analysis prompts","directories":{},"_nodeVersion":"22.23.1","dependencies":{"axios":"^1.15.2","dotenv":"^17.4.2","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.4","vitest":"^4.1.6","typescript":"^5.8.3","@types/node":"^26.1.2","@vitest/coverage-v8":"^4.1.6"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server_2.1.0_1785839028612_0.13234329291206648","host":"s3://npm-registry-packages-npm-production"}},"3.1.1":{"name":"@affise/mcp-server","version":"3.1.1","keywords":["mcp","affise","api","affiliate","marketing","analytics"],"author":{"name":"Affise"},"license":"MIT","_id":"@affise/mcp-server@3.1.1","maintainers":[{"name":"affise","email":"vk@affise.com"}],"homepage":"https://github.com/affise/mcp-affise#readme","bugs":{"url":"https://github.com/affise/mcp-affise/issues"},"bin":{"affise-mcp-server":"build/index.js"},"dist":{"shasum":"2ecfe57b692574f109f13dc2bcc15ca3a3979dfc","tarball":"https://registry.npmjs.org/@affise/mcp-server/-/mcp-server-3.1.1.tgz","fileCount":233,"integrity":"sha512-Ye0tn8u4Kin5GAIlLc9hUMKIzJ5Bnhyl+WG2kD1WIRYG/RslIhAwYmk9dCPsqZlqDC+5w+CHrEMqeH1wfEmrEA==","signatures":[{"sig":"MEUCIFwPRnsfmY4cV0YNBzxpTTz5a/OKtYViytrMQcQYxeaoAiEAoO+QMcAsxeeme54nYvYI+81rGDFG5fx9OQQGi1Y+DTE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQDtIZq9nwlv5eqFTRTs/DL5kf0sHChv8RReR/jPKHU5wgIhANAaXmUyha2qKMQ5kdvEb2iZYkM9IpRDLv2khB/voNkd","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@affise%2fmcp-server@3.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1337457},"main":"build/index.js","type":"module","types":"./build/index.d.ts","gitHead":"bfe07d22546c695ccacd28cb4f8d85013b3e0f2a","scripts":{"dev":"tsx src/index.ts","test":"npm run build:unsafe && vitest run","build":"npm run security:audit && tsc && chmod +x build/index.js && mkdir -p build/skills && rm -rf build/skills/content && cp -r src/skills/content build/skills/","clean":"rm -rf build dist coverage","start":"npm run build && node build/index.js","health":"node build/health/health-check.js","rebuild":"npm run clean && npm run build","test-dxt":"npm run build-dxt && npm run validate-dxt","build-dxt":"npm run build && npm prune --omit=dev && npm run package-dxt && npm install --no-audit --no-fund","docker:up":"docker-compose up -d","test:unit":"vitest run tests/unit tests/services","test:watch":"vitest","docker:down":"docker-compose down","docker:logs":"docker-compose logs -f","package-dxt":"npx -y -p @anthropic-ai/dxt dxt pack","build:unsafe":"tsc && chmod +x build/index.js && mkdir -p build/skills && rm -rf build/skills/content && cp -r src/skills/content build/skills/","docker:build":"docker build -t affise-mcp-server .","security:fix":"npm audit fix","test:nobuild":"vitest run","validate-dxt":"npx -y -p @anthropic-ai/dxt dxt validate manifest.json","test:coverage":"npm run build:unsafe && vitest run --coverage","prepublishOnly":"npm run build","security:audit":"npm audit --audit-level moderate","security:check":"npm outdated && npm audit","test:integration":"npm run build:unsafe && vitest run tests/integration"},"_npmUser":{"name":"affise","email":"vk@affise.com"},"repository":{"url":"git+https://github.com/affise/mcp-affise.git","type":"git"},"_npmVersion":"10.9.8","description":"MCP server for the Affise public API: stdio transport, 24 tools, 6 analysis prompts","directories":{},"_nodeVersion":"22.23.2","dependencies":{"zod":"^4.4.3","axios":"^1.20.0","dotenv":"^17.4.2","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.23.12","vitest":"^4.1.6","typescript":"^5.8.3","@types/node":"^26.4.0","@vitest/coverage-v8":"^4.1.11"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server_3.1.1_1788183776628_0.1176624382673217","host":"s3://npm-registry-packages-npm-production"}},"3.2.0":{"name":"@affise/mcp-server","version":"3.2.0","keywords":["mcp","affise","api","affiliate","marketing","analytics"],"author":{"name":"Affise"},"license":"MIT","_id":"@affise/mcp-server@3.2.0","maintainers":[{"name":"affise","email":"vk@affise.com"}],"homepage":"https://github.com/affise/mcp-affise#readme","bugs":{"url":"https://github.com/affise/mcp-affise/issues"},"bin":{"affise-mcp-server":"build/index.js"},"dist":{"shasum":"c34fc55b38837efaa4f70f47d8fdb7820c133c59","tarball":"https://registry.npmjs.org/@affise/mcp-server/-/mcp-server-3.2.0.tgz","fileCount":238,"integrity":"sha512-JZgfVfNURy5OVvFhcx2wLSNHqxw+7u3G4EWjhtucN6LQkyL+z5XP0oXw12bdjb7+zR9lWG/LGAlpZMrW9/GAxA==","signatures":[{"sig":"MEUCIFQHVlghJha7io6a5ZB4iwqXjk/n2JaWr+txWmV0lbxcAiEA372cFHVmMvn7CvekdVPmDVngp13FBLJe9D0q0I8nRTo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQDBu8tSgNxclTXpRvYlzHguPAS4FYzhP1S4nXe2edjipAIhAMGJDE/FAsEHZiR8HXb2uXuHW00BdFOaXRZHzB/7CmWy","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@affise%2fmcp-server@3.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1347310},"main":"build/index.js","type":"module","types":"./build/index.d.ts","gitHead":"a7bbd0990f2ea8e3a037b5ca3c452f84eb0f6df3","scripts":{"dev":"tsx src/index.ts","test":"npm run build:unsafe && vitest run","build":"npm run security:audit && tsc && chmod +x build/index.js && mkdir -p build/skills && rm -rf build/skills/content && cp -r src/skills/content build/skills/","clean":"rm -rf build dist coverage","start":"npm run build && node build/index.js","health":"node build/health/health-check.js","rebuild":"npm run clean && npm run build","test-dxt":"npm run build-dxt && npm run validate-dxt","build-dxt":"npm run build && npm prune --omit=dev && npm run package-dxt && npm install --no-audit --no-fund","docker:up":"docker-compose up -d","test:unit":"vitest run tests/unit tests/services","test:watch":"vitest","docker:down":"docker-compose down","docker:logs":"docker-compose logs -f","package-dxt":"npx -y -p @anthropic-ai/dxt dxt pack","build:unsafe":"tsc && chmod +x build/index.js && mkdir -p build/skills && rm -rf build/skills/content && cp -r src/skills/content build/skills/","docker:build":"docker build -t affise-mcp-server .","security:fix":"npm audit fix","test:nobuild":"vitest run","validate-dxt":"npx -y -p @anthropic-ai/dxt dxt validate manifest.json","test:coverage":"npm run build:unsafe && vitest run --coverage","prepublishOnly":"npm run build","security:audit":"npm audit --audit-level moderate","security:check":"npm outdated && npm audit","test:integration":"npm run build:unsafe && vitest run tests/integration"},"_npmUser":{"name":"affise","email":"vk@affise.com"},"repository":{"url":"git+https://github.com/affise/mcp-affise.git","type":"git"},"_npmVersion":"10.9.8","description":"MCP server for the Affise public API: stdio transport, 24 tools, 6 analysis prompts","directories":{},"_nodeVersion":"22.23.2","dependencies":{"zod":"^4.4.3","axios":"^1.20.0","dotenv":"^17.4.2","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.23.12","vitest":"^4.1.6","typescript":"^5.8.3","@types/node":"^26.4.0","@vitest/coverage-v8":"^4.1.11"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server_3.2.0_1788186541098_0.4179828277254598","host":"s3://npm-registry-packages-npm-production"}},"3.2.1":{"_id":"@affise/mcp-server@3.2.1","bin":{"affise-mcp-server":"build/index.js"},"bugs":{"url":"https://github.com/affise/mcp-affise/issues"},"dist":{"shasum":"3f60edb8637ee5b75415d5fcfb20eb5ca2c680ae","tarball":"https://registry.npmjs.org/@affise/mcp-server/-/mcp-server-3.2.1.tgz","fileCount":238,"integrity":"sha512-MaDdwKbb/B/rflSgLk9xzAeNhT20fzHr9M2oj+qe1KAS57sYKSAMBLDtpOWqJxjnw5KMsqF9xKYIUkP/NJjuGw==","signatures":[{"sig":"MEQCIBKt3y/tenbbXG+XBTP6eVIx0Jf84U2dP6oGRzht72X+AiBwswTj4TulVR8LFlvyfDPabXy9pHbDVzc62Jj+zSCA7w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGUKp5KKjMaogkGTXesxJI7eIUB2HpaBItilce68IgmbAiEA8XzNccJrR+WHuDxToy9BBUmt064bhtyrP5JP+Gct4cM="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@affise%2fmcp-server@3.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1347303},"main":"build/index.js","name":"@affise/mcp-server","type":"module","types":"./build/index.d.ts","author":{"name":"Affise"},"gitHead":"c3366b20bfd65939c4053b7c71a9b66b9742ea6d","license":"MIT","scripts":{"dev":"tsx src/index.ts","test":"npm run build:unsafe && vitest run","build":"npm run security:audit && tsc && chmod +x build/index.js && mkdir -p build/skills && rm -rf build/skills/content && cp -r src/skills/content build/skills/","clean":"rm -rf build dist coverage","start":"npm run build && node build/index.js","health":"node build/health/health-check.js","rebuild":"npm run clean && npm run build","test-dxt":"npm run build-dxt && npm run validate-dxt","build-dxt":"npm run build && npm prune --omit=dev && npm run package-dxt && npm install --no-audit --no-fund","docker:up":"docker-compose up -d","test:unit":"vitest run tests/unit tests/services","test:watch":"vitest","docker:down":"docker-compose down","docker:logs":"docker-compose logs -f","package-dxt":"npx -y -p @anthropic-ai/dxt dxt pack","build:unsafe":"tsc && chmod +x build/index.js && mkdir -p build/skills && rm -rf build/skills/content && cp -r src/skills/content build/skills/","docker:build":"docker build -t affise-mcp-server .","security:fix":"npm audit fix","test:nobuild":"vitest run","validate-dxt":"npx -y -p @anthropic-ai/dxt dxt validate manifest.json","test:coverage":"npm run build:unsafe && vitest run --coverage","prepublishOnly":"npm run build","security:audit":"npm audit --audit-level moderate","security:check":"npm outdated && npm audit","test:integration":"npm run build:unsafe && vitest run tests/integration"},"version":"3.2.1","_npmUser":{"name":"affise","email":"vk@affise.com"},"homepage":"https://github.com/affise/mcp-affise#readme","keywords":["mcp","affise","api","affiliate","marketing","analytics"],"repository":{"url":"git+https://github.com/affise/mcp-affise.git","type":"git"},"_npmVersion":"10.9.8","description":"MCP server for the Affise public API: stdio transport, 24 tools, 6 analysis prompts","directories":{},"maintainers":[{"name":"affise","email":"vk@affise.com"}],"_nodeVersion":"22.23.2","dependencies":{"zod":"^4.4.3","axios":"^1.20.0","dotenv":"^17.4.2","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.23.12","vitest":"^4.1.6","typescript":"^5.8.3","@types/node":"^26.4.0","@vitest/coverage-v8":"^4.1.11"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-server_3.2.1_1788516191507_0.521776778354786"}}},"time":{"created":"2026-06-03T13:23:40.253Z","modified":"2026-09-04T10:03:11.981Z","2.0.0":"2026-06-03T13:23:40.655Z","2.0.1":"2026-06-08T14:19:16.444Z","2.0.3":"2026-08-04T10:14:41.431Z","2.1.0":"2026-08-04T10:23:48.767Z","3.1.1":"2026-08-31T13:42:56.729Z","3.2.0":"2026-08-31T14:29:01.191Z","3.2.1":"2026-09-04T10:03:11.602Z"},"bugs":{"url":"https://github.com/affise/mcp-affise/issues"},"author":{"name":"Affise"},"license":"MIT","homepage":"https://github.com/affise/mcp-affise#readme","keywords":["mcp","affise","api","affiliate","marketing","analytics"],"repository":{"url":"git+https://github.com/affise/mcp-affise.git","type":"git"},"description":"MCP server for the Affise public API: stdio transport, 24 tools, 6 analysis prompts","maintainers":[{"name":"affise","email":"vk@affise.com"}],"readme":"# Affise MCP Server\n\n[![Docker Build](https://img.shields.io/badge/docker-ready-blue.svg)](https://hub.docker.com)\n[![Node.js](https://img.shields.io/badge/node.js-18%2B-green.svg)](https://nodejs.org)\n[![TypeScript](https://img.shields.io/badge/typescript-5.8-blue.svg)](https://www.typescriptlang.org)\n\nA Model Context Protocol (MCP) server that provides access to Affise affiliate marketing platform data and analytics. This server enables AI assistants like Claude to interact with Affise APIs for comprehensive affiliate marketing analysis and monitoring using natural language queries.\n\n## Features\n\n### 🔧 Tools (24 total)\n\n**Status & search**\n- **`affise_search_offers`** — Search offers with natural-language queries (e.g. *\"find gaming offers for US mobile\"*)\n- **`affise_smart_search`** 🧠 — Intelligent offer search with auto category/country resolution\n- **`affise_offer_categories`** — List/search offer categories\n- **`affise_get_offer`** — Fetch detail for a single offer by id\n- **`affise_offer_tracking_link`** — Generate a tracking link for `offer × affiliate × sub IDs`\n\n**Statistics**\n- **`affise_stats`** — Statistics by natural language (*\"top 10 partners by income last week\"*)\n- **`affise_stats_raw`** — Structured stats query with `slice` / `fields` / `filter` (Affise `/3.0/stats/custom`)\n- **`affise_stats_compare`** — Period-over-period comparison with the range auto-aligned, so month-to-date compares against the same day-range of the prior period\n- **`affise_conversions_raw`** — Per-event conversion records from `/3.0/stats/conversions`\n- **`affise_get_conversion`** — Fetch a single conversion by id\n- **`affise_trafficback`** — Trafficback reason / partner / geo breakdown\n- **`affise_affiliate_analysis`** — One-call account review for a single affiliate: KPIs, per-offer breakdown, trafficback split and rule-based insights\n- **`affise_retention_rate`** — Retention analytics across periods\n- **`affise_time_to_action`** — Time-to-action distribution analytics\n\n**Admin: partners & advertisers**\n- **`affise_list_partners`** — Paginated affiliate list\n- **`affise_get_partner`** — Affiliate detail by id\n- **`affise_list_advertisers`** — Paginated advertiser list\n- **`affise_get_advertiser`** — Advertiser detail by MongoId\n\n**Partner-role (requires a partner-scoped API key)**\n- **`affise_partner_profile`** — Calling affiliate's own profile\n- **`affise_partner_balance`** — Calling affiliate's own balance\n- **`affise_partner_news`** — News feed visible to the affiliate\n- **`affise_partner_offers`** — Offers visible to the affiliate\n- **`affise_partner_live_offers`** — Currently-live offers\n- **`affise_partner_find_subs`** — Discover sub-ID values the affiliate has used\n\n### 📊 Analysis Prompts (6)\n- **`analyze_offers`** — Offer-portfolio analysis (performance, market, technical, competitive, compliance)\n- **`analyze_stats`** — Stats analysis (geo, performance, conversion, traffic)\n- **`analyze_trafficback`** — Trafficback root-cause and optimization insights\n- **`analyze_conversions`** — Conversion-level analysis (fraud review, attribution, partner quality, geo/tech, payouts)\n- **`workflow_analysis`** — End-to-end offer search → analysis pipeline\n- **`auto_analysis`** — Multi-data-type orchestration across stats/conversions/offers\n\n### 🚀 Capabilities\n- **Natural-language queries** — ask in plain English; the parser handles dimensions, top-N, filters, sub-IDs, periods\n- **Auto-resolution** — partner `clientId` → numeric `id`, advertiser/category names → IDs, vertical keywords → category IDs\n- **Response compaction** — tabular outputs (stats, conversions, partners, advertisers) ship a `{columns, rows, dropped_columns?}` envelope, saving 50–70% tokens vs raw JSON\n- **Strict validation** — security-aware input sanitization with defensive coercion of numeric-keyed objects back to arrays\n- **Smart caching** — per-tool TTL (e.g. 5 min for categories, 3 min for stats, longer for static lookups)\n\n## Installation\n\n### Prerequisites\n- Node.js 18+ (LTS recommended)\n- Docker (recommended)\n- Affise API credentials\n\n### Method 1: Docker\n\n1. **Clone the repository:**\n   ```bash\n   git clone <repository-url>\n   cd mcp-affise\n   ```\n\n2. **Build the Docker image:**\n   ```bash\n   docker build -t affise-mcp-server:latest .\n   ```\n\n3. **Configure environment variables:**\n   Create a `.env` file in the project root:\n   ```env\n   AFFISE_BASE_URL=https://api-demo.affise.com\n   AFFISE_API_KEY=your_affise_api_key_here\n   NODE_ENV=production\n   ```\n\n### Method 2: Local Development\n\n1. **Install dependencies:**\n   ```bash\n   npm install\n   ```\n\n2. **Build the project:**\n   ```bash\n   npm run build\n   ```\n\n3. **Start the MCP server:**\n   ```bash\n   npm start\n   ```\n\n## Configuration\n\n### Environment Variables\n\n| Variable | Required | Description | Default |\n|----------|----------|-------------|---------|\n| `AFFISE_BASE_URL` | ✅ | Base URL for your Affise instance | `https://api-demo.affise.com` |\n| `AFFISE_API_KEY` | ✅ | Your Affise API key | - |\n| `NODE_ENV` | ❌ | Environment mode | `development` |\n\n### Getting Affise API Credentials\n\n1. Log into your Affise dashboard\n2. Navigate to **Settings** → Users → Add & Manage →  Get User\n3. Get current user API key\n4. Copy the API key and your instance API URL\n\n## Usage with Claude Desktop\n\n### Method 1: Desktop Extension (Recommended) 🚀\n\nThe easiest way to install is using the Desktop Extension (.dxt) - a one-click installation package.\n\n#### Step 1: Install DXT Toolchain\n```bash\nnpm install -g @anthropic-ai/dxt\n```\n\n#### Step 2: Build and Package\n```bash\n# Build TypeScript and create .dxt package\nnpm run build-dxt\n\n# Or step by step:\nnpm run build          # Compile TypeScript\nnpm run package-dxt     # Create .dxt file\nnpm run validate-dxt    # Validate package\n```\n\n#### Step 3: Install in Claude Desktop\n1. **Build the extension**: Run `npm run build-dxt` in your project directory\n2. **Find the .dxt file**: Look for `mcp-affise.dxt` in your project root\n3. **Install in Claude Desktop**:\n   - Open Claude Desktop Settings\n   - Go to Extensions section\n   - Drag your `.dxt` file into the window\n   - Click \"Install\"\n4. **Configure credentials**:\n   - Find \"Affise Analytics Extension\" in your extensions\n   - Set your Affise API URL (e.g., `https://api-yourcompany.affise.com`)\n   - Set your Affise API Key\n5. **Test**: Ask Claude Desktop for your offer categories\n\n**Benefits of Desktop Extension:**\n- ✅ **One-click install** - No JSON editing required\n- ✅ **Secure credentials** - API keys stored in OS keychain  \n- ✅ **Automatic updates** - Extensions update automatically\n- ✅ **No crashes** - Graceful handling of missing configuration\n- ✅ **Better UX** - Configuration through Claude Desktop UI\n\n### Method 2: Manual MCP Server Configuration\n\n#### Docker Installation\n\nAdd this configuration to your Claude Desktop settings file:\n\n**Location:** `~/Library/Application Support/Claude/claude_desktop_config.json`\n\n```json\n{\n  \"mcpServers\": {\n    \"affise-mcp-server\": {\n      \"command\": \"docker\",\n      \"args\": [\n        \"run\",\n        \"--rm\",\n        \"-i\",\n        \"-e\",\n        \"AFFISE_API_KEY\",\n        \"-e\",\n        \"AFFISE_BASE_URL\",\n        \"-e\",\n        \"NODE_ENV=production\",\n        \"affise-mcp-server:latest\"\n      ],\n      \"env\": {\n        \"AFFISE_API_KEY\": \"your_affise_api_key_here\",\n        \"AFFISE_BASE_URL\": \"https://your-affise-instance.com\"\n      }\n    }\n  }\n}\n```\n\n#### Local Installation\n\nIf you prefer running locally without Docker:\n\n```json\n{\n  \"mcpServers\": {\n    \"affise-mcp-server\": {\n      \"command\": \"node\",\n      \"args\": [\"/path/to/affise-mcp-server/build/index.js\"],\n      \"env\": {\n        \"AFFISE_API_KEY\": \"your_affise_api_key_here\",\n        \"AFFISE_BASE_URL\": \"https://your-affise-instance.com\"\n      }\n    }\n  }\n}\n```\n\n## Example Interactions\n\n### Performance Analytics\n```\nHuman: Show me conversion performance by country for the last 7 days\n\nClaude: I'll analyze your conversion performance by country.\n> Uses affise_stats tool with natural language parsing\n📊 Top performing countries:\n- US: 2,847 conversions (4.2% CR)\n- UK: 1,238 conversions (3.8% CR)\n- DE: 892 conversions (3.1% CR)\n```\n\n### Offer Analysis\n```\nHuman: Find high-performing offers in the gaming category\n\nClaude: I'll search for gaming offers using natural language processing.\n> Uses affise_search_offers tool\n🎮 Top Gaming Offers:\n1. Mobile Casino Pro - $45 EPC, 85% approval rate\n2. Fantasy Sports App - $32 EPC, 92% approval rate\n```\n\n### Intelligent Category Resolution\n```\nHuman: Find gaming offers for US mobile traffic\n\nClaude: I'll search for gaming offers with smart category resolution.\n> Uses affise_smart_search\n🧠 **Smart Resolution Applied**\n- Searched for: \"gaming\"\n- Auto-corrected to: \"Games & Entertainment\" (92% confidence)\n- Found 23 active offers for US mobile traffic\n\n🎯 Top Results:\n1. Mobile Casino Pro - $45 EPC, 4.2% CR\n2. Puzzle Games Hub - $32 EPC, 5.1% CR\n3. Sports Betting App - $38 EPC, 3.8% CR\n\n💡 Note: Automatically corrected \"gaming\" to the actual category name\n```\n\n### Offer Category Management\n```\nHuman: What offer categories are available in our Affise account?\n\nClaude: I'll get all the available offer categories for you.\n> Uses affise_offer_categories tool\n📂 Available Categories (18 total):\n- Gaming (ID: 1) - 45 active offers\n- Finance (ID: 2) - 23 active offers  \n- Dating (ID: 3) - 31 active offers\n- Health & Beauty (ID: 4) - 12 active offers\n- E-commerce (ID: 5) - 67 active offers\n```\n\n### Intelligent Workflow\n```\nHuman: Give me a complete analysis of our best offers with revenue trends\n\nClaude: I'll perform a comprehensive analysis of your top offers.\n> Uses auto_analysis prompt with combined data types\n📈 Complete Performance Report:\n- Revenue Analysis: $847K total (↑23% vs last month)\n- Top Performers: 12 offers exceeding targets\n- Optimization Opportunities: 5 offers need attention\n- Traffic Quality: 94% legitimate traffic\n```\n\n## 📚 Detailed Examples & Guides\n\nFor comprehensive examples and real-world usage scenarios, check out these detailed guides:\n\n### 🚀 **[Smart Features Guide](guides/SMART_FEATURES_GUIDE.md)**\nYour key differentiator vs competitors - AI-powered capabilities:\n- Natural language understanding with typo correction\n- Intelligent category resolution and auto-correction\n- Context-aware search with geographic intelligence\n- Smart pagination for large datasets\n- Predictive insights and recommendations\n\n### 🔬 **[Advanced Analysis Guide](guides/ADVANCED_ANALYSIS_GUIDE.md)**\nUnlock the full power of enterprise-grade analysis:\n- Strategic business intelligence workflows\n- Multi-dimensional performance analysis\n- Predictive modeling and forecasting\n- Crisis management and recovery protocols\n- Complete workflow orchestration\n\n### 👥 **Role-Specific User Journey Guides**\n\n#### 👨‍💼 **[Affiliate Manager Guide](guides/AFFILIATE_MANAGER_GUIDE.md)**\nDaily operations and partner optimization:\n- Morning routine workflows (15 min)\n- Partner performance management\n- Issue resolution protocols\n- Weekly reporting templates\n- Crisis management procedures\n\n#### 📊 **[Advertiser Manager Guide](guides/ADVERTISER_MANAGER_GUIDE.md)**\nCampaign management and revenue optimization:\n- Advertiser health monitoring\n- Campaign performance optimization\n- Cross-advertiser collaboration strategies\n- Revenue forecasting and analysis\n- Quality assurance workflows\n\n#### 🏢 **[General Manager Guide](guides/GENERAL_MANAGER_GUIDE.md)**\nStrategic leadership and business intelligence:\n- Executive morning briefing (10 min)\n- Strategic decision frameworks\n- Competitive analysis and positioning\n- Financial performance and forecasting\n- M&A evaluation and strategic planning\n\n### 🔧 **[Tool Selection Guide](guides/TOOL_SELECTION_GUIDE.md)**\nMaster the art of choosing the right tool for your analysis:\n- Tool comparison matrix\n- Use case scenarios\n- Performance optimization tips\n- Best practices for different user roles\n- Advanced workflow combinations\n\n### 🤖 **[AI Search Examples](guides/AI_SEARCH_EXAMPLES.md)**\nHarness the power of AI-driven search capabilities:\n- Natural language query processing\n- Smart category resolution\n- Intelligent typo correction\n- Context-aware search suggestions\n- Advanced filtering techniques\n\n### 📂 **[Offer Categories Examples](guides/OFFER_CATEGORIES_EXAMPLES.md)**\nMaster offer categorization and vertical analysis:\n- Complete category taxonomy\n- Vertical performance comparison\n- Category-specific optimization tips\n- Cross-category opportunity identification\n- Industry benchmarking data\n\n### 🔍 **[Trafficback Analysis Examples](guides/TRAFFICBACK_EXAMPLES.md)**\nLearn how to analyze traffic quality and identify redirection issues:\n- Geographic trafficback patterns\n- Device-specific analysis\n- Partner quality assessment\n- Real-time issue detection\n- All 7 preset configurations\n\n### 📊 **[Performance Stats Examples](guides/STATS_EXAMPLES.md)**\nMaster performance analytics and conversion optimization:\n- Revenue and earnings analysis\n- Conversion rate breakdowns\n- Geographic performance comparison\n- Partner and affiliate metrics\n- Time-based trend analysis\n\n### 🎯 **[Offer Search Examples](guides/OFFERS_EXAMPLES.md)**\nDiscover and research affiliate offers effectively:\n- Category-based searches (gaming, finance, dating)\n- Geographic targeting and compliance\n- Performance-based filtering\n- Competitive research techniques\n- Natural language search queries\n\n### 🚀 **[Client Prompts Guide](guides/CLIENT_PROMPTS_GUIDE.md)**\nReady-to-use prompts for common affiliate marketing tasks:\n- Daily operations and monitoring\n- Revenue and performance analysis\n- Geographic and device targeting\n- Optimization and troubleshooting\n\n### 🗺️ **Quick Guide Reference**\n\n| Guide | Purpose | Target User |\n|-------|---------|-------------|\n| [Smart Features Guide](guides/SMART_FEATURES_GUIDE.md) | AI-powered capabilities overview | All users |\n| [Advanced Analysis Guide](guides/ADVANCED_ANALYSIS_GUIDE.md) | Enterprise-grade analysis workflows | Analysts, Managers |\n| [Tool Selection Guide](guides/TOOL_SELECTION_GUIDE.md) | Choose the right tool for your task | All users |\n| [Affiliate Manager Guide](guides/AFFILIATE_MANAGER_GUIDE.md) | Daily operations for affiliate managers | Affiliate Managers |\n| [Advertiser Manager Guide](guides/ADVERTISER_MANAGER_GUIDE.md) | Campaign management workflows | Advertiser Managers |\n| [General Manager Guide](guides/GENERAL_MANAGER_GUIDE.md) | Strategic leadership insights | Executives |\n| [AI Search Examples](guides/AI_SEARCH_EXAMPLES.md) | Natural language search techniques | All users |\n| [Offer Categories Examples](guides/OFFER_CATEGORIES_EXAMPLES.md) | Category analysis and optimization | Analysts |\n| [Trafficback Analysis Examples](guides/TRAFFICBACK_EXAMPLES.md) | Traffic quality assessment | Traffic Managers |\n| [Performance Stats Examples](guides/STATS_EXAMPLES.md) | Analytics and KPI tracking | Analysts |\n| [Offer Search Examples](guides/OFFERS_EXAMPLES.md) | Basic offer discovery | All users |\n| [Client Prompts Guide](guides/CLIENT_PROMPTS_GUIDE.md) | Ready-to-use prompt templates | All users |\n\n> 💡 **Pro Tip**: These guides show you exactly how to talk to Claude naturally - no need to learn complex JSON syntax!\n\n## Available Tools\n\n### Core API Tools\n\n#### `affise_stats`\nGet statistics using natural language queries.\n```json\n{\n  \"name\": \"affise_stats\",\n  \"arguments\": {\n    \"query\": \"Show me revenue by country for the last 30 days\"\n  }\n}\n```\n\n#### `affise_stats_raw`\nGet raw statistics with specific API parameters (`/3.0/stats/custom`).\n```json\n{\n  \"name\": \"affise_stats_raw\",\n  \"arguments\": {\n    \"slice\": [\"country\", \"day\"],\n    \"date_from\": \"2024-01-01\",\n    \"date_to\": \"2024-01-07\",\n    \"fields\": [\"clicks\", \"conversions\", \"income\"],\n    \"filter\": {\n      \"country\": [\"US\", \"GB\", \"DE\"]\n    }\n  }\n}\n```\n\n#### `affise_search_offers`\nSearch offers using natural language queries.\n```json\n{\n  \"name\": \"affise_search_offers\",\n  \"arguments\": {\n    \"query\": \"Find gaming offers for US mobile traffic\"\n  }\n}\n```\n\n### Analysis Prompts\n\n#### `analyze_offers`\nExpert offer analysis with recommendations.\n```json\n{\n  \"name\": \"analyze_offers\",\n  \"arguments\": {\n    \"offers_data\": \"...\",\n    \"analysis_type\": \"performance\",\n    \"format\": \"actionable\"\n  }\n}\n```\n\n#### `auto_analysis`\nComprehensive multi-data analysis.\n```json\n{\n  \"name\": \"auto_analysis\",\n  \"arguments\": {\n    \"data_type\": \"combined\",\n    \"period\": \"last30days\",\n    \"analysis_type\": \"comprehensive\",\n    \"format\": \"executive\"\n  }\n}\n```\n\n## Development\n\n### Project Structure\n```\naffise-mcp-server/\n├── src/\n│   ├── handlers/          # MCP request handlers (enhanced-tools, prompts)\n│   ├── tools/             # 23 Affise API integration tools\n│   ├── prompts/           # 6 analysis prompt factories\n│   ├── services/          # Cache, error handling, validation, secure config\n│   ├── types/             # Type definitions + simple-parser\n│   ├── utils/             # Response compaction, stats normalizer\n│   ├── shared/            # Shared utilities (date-utils)\n│   ├── health/            # Health-check helpers\n│   └── index.ts           # Main MCP server entry point (stdio)\n├── tests/                 # Vitest test suite (~380 tests)\n├── guides/                # Usage guides and examples\n├── manifest.json          # Claude Desktop DXT extension manifest\n├── vitest.config.ts       # Vitest configuration\n├── Dockerfile             # Optional Docker build\n├── docker-compose.yml     # Optional Docker development environment\n└── package.json           # Node.js dependencies\n```\n\n### Available Scripts\n\n```bash\n# Development\nnpm run dev                # Start with hot reload (tsx)\n\n# Building\nnpm run build             # Compile TypeScript (+ npm audit)\nnpm run build:unsafe      # Compile without audit (faster iteration)\nnpm run clean             # Clean build directory\nnpm run rebuild           # Clean and build\n\n# Tests\nnpm test                  # Run Vitest suite\nnpm run test:watch        # Vitest in watch mode\nnpm run test:coverage     # With coverage report\nnpm run test:unit         # Unit tests only\nnpm run test:integration  # Integration tests only\n\n# Production\nnpm start                 # Start MCP server (stdio)\n\n# Claude Desktop extension package\nnpm run build-dxt         # Build + package as .dxt\nnpm run validate-dxt      # Validate the .dxt\n```\n\n### Docker Commands\n\n```bash\n# Build image\ndocker build -t affise-mcp-server:latest .\n\n# Run with docker-compose\ndocker-compose up -d\n\n# Test with Docker\necho '{\"jsonrpc\": \"2.0\", \"id\": 1, \"method\": \"initialize\", \"params\": {\"protocolVersion\": \"2024-11-05\", \"capabilities\": {}, \"clientInfo\": {\"name\": \"test\", \"version\": \"1.0.0\"}}}' | docker run --rm -i \\\n  -e AFFISE_API_KEY=your_key \\\n  -e AFFISE_BASE_URL=https://api-demo.affise.com \\\n  -e NODE_ENV=production \\\n  affise-mcp-server:latest\n\n# Check logs\ndocker-compose logs -f affise-mcp-server\n```\n\n## Troubleshooting\n\n### Common Issues\n\n#### 1. Authentication Errors\n```\nError: 401 Unauthorized\n```\n**Solution:** Verify your `AFFISE_API_KEY` is correct and has proper permissions.\n\n#### 2. Connection Timeouts\n```\nError: Request timeout\n```\n**Solution:** Check your `AFFISE_BASE_URL` and network connectivity.\n\n#### 3. Docker Permission Issues\n```\nError: Permission denied\n```\n**Solution:** Ensure Docker has proper permissions and the user is in the docker group.\n\n#### 4. Claude Desktop Not Detecting Server\n**Solutions:**\n- Restart Claude Desktop after configuration changes\n- Verify JSON syntax in `claude_desktop_config.json`\n- Check that Docker image is built and tagged correctly\n- Ensure environment variables are set properly\n\n### Debug Mode\n\nEnable debug logging by setting:\n```bash\nexport NODE_ENV=development\n```\n\nThis will provide detailed logging including:\n- API request/response details\n- MCP message tracing\n- Performance metrics\n- Error stack traces\n\n### MCP Protocol Testing\n\nTest MCP server:\n```bash\n# Test MCP protocol with initialize\necho '{\"jsonrpc\": \"2.0\", \"id\": 1, \"method\": \"initialize\", \"params\": {\"protocolVersion\": \"2024-11-05\", \"capabilities\": {}, \"clientInfo\": {\"name\": \"test\", \"version\": \"1.0.0\"}}}' | npm start\n```\n\n## Architecture\n\n### Simplified Design\n\nThe server uses a **simplified architecture** focused on direct API integration:\n\n- **Direct Tool Handlers** - No complex abstraction layers\n- **Natural Language Processing** - Simple pattern matching for user queries\n- **Unified Types** - Single source of truth for response types\n- **Minimal Dependencies** - Clean, maintainable codebase\n\n### Benefits\n\n- ✅ **Easy to understand** - Direct API calls without complexity\n- ✅ **Fast performance** - Minimal processing layers\n- ✅ **Easy to maintain** - Simple codebase structure\n- ✅ **Reliable** - Fewer points of failure\n- ✅ **Extensible** - Easy to add new tools and features\n\n## Security\n\nFound a vulnerability? **[SECURITY.md](SECURITY.md)** has the reporting address, what to include, and what is in scope. Please report privately rather than opening an issue — and never put a live API key in a report.\n\n### Best Practices\n- ✅ **API keys in environment variables** (never hardcoded)\n- ✅ **Runtime API key encryption** with AES-256-GCM\n- ✅ **Comprehensive input validation** with injection protection\n- ✅ **Non-root Docker user** for container security\n- ✅ **Alpine Linux base** for minimal attack surface\n- ✅ **No sensitive data logging** in production mode\n- ✅ **HTTPS-only API communication**\n- ✅ **Automated dependency security auditing**\n\n### Data Privacy\n- No API keys or sensitive data are stored locally\n- All communication uses secure HTTPS connections\n- Logs contain no personally identifiable information\n- Containers are ephemeral and stateless\n\n### Dependency Security\n- ✅ **Automated security audits** on every build\n- ✅ **Regular dependency updates** for security patches\n- ✅ **Vulnerability scanning** with npm audit\n- 🔧 **Security scripts**: `npm run security:check`, `npm run security:fix`\n\n## License\n\nThis project is licensed under the MIT License — see [LICENSE](LICENSE).\n\n## Support\n\n### Getting Help\n- 📖 **Documentation:** Check this README and inline code comments\n- 🐛 **Bug Reports:** Open an issue with detailed reproduction steps\n- 💡 **Feature Requests:** Open an issue with use case description\n- 📧 **Direct Support:** support@affise.com\n- 🔒 **Security Issues:** do not open an issue — see [SECURITY.md](SECURITY.md)\n\n### Useful Resources\n- [Model Context Protocol Documentation](https://modelcontextprotocol.io/)\n- [Affise API Documentation](https://affise.com/docs/api/)\n- [Claude Desktop MCP Guide](https://docs.anthropic.com/claude/desktop)\n- [Docker Best Practices](https://docs.docker.com/develop/dev-best-practices/)\n\n---\n\n**Made with ❤️ for the affiliate marketing community**\n\n*This MCP server bridges the gap between AI assistants and affiliate marketing data, enabling intelligent analysis and optimization of your Affise campaigns using natural language.*\n","readmeFilename":"README.md"}