{"mcpVersion":"2025-06-18","name":"revclamp-mcp","registryId":"io.github.revclamp/revclamp-mcp","npmPackage":"revclamp-mcp","packageUrl":"https://revclamp.com/packages/revclamp-mcp.tgz","packageSha256":"4ae00ff406ff16154a475350f28b9691f5c513e8409644b418d8d03bf129853a","installCommands":["npx -y https://revclamp.com/packages/revclamp-mcp.tgz","npx -y github:revclamp/revclamp-mcp#v1.20.0"],"title":"RevClamp B2B Revenue, Chargeback & EU VAT MCP Server","version":"1.20.0","description":"Stateless B2B revenue leakage auditing, Stripe 2025-03-31.basil ghost-usage detection, Visa Compelling Evidence 3.0 dispute staging (submit: false), EU/XI VIES VAT validation, Shopify Plus B2B Net-15/30/60 integer-cent reconciliation, Stripe/Shopify/RevClamp webhook HMAC-SHA256 signature verification, 0% take-rate ROI & plan-fit calculation, 72-hour webhook replay & out-of-order monotonic state-machine simulation, and Stripe dispute evidence 18,000 UTF-16 code unit & CE 3.0 completeness linting.","homepage":"https://revclamp.com/mcp","documentationUrl":"https://revclamp.com/docs/onboarding","repositoryUrl":"https://github.com/revclamp/revclamp-mcp","glamaUrl":"https://glama.ai/mcp/servers/revclamp/revclamp-mcp","smitheryUrl":"https://smithery.ai/server/revclamp/revclamp-mcp","pulseMcpUrl":"https://www.pulsemcp.com/servers/revclamp","capabilities":{"tools":{"listChanged":false}},"transport":{"type":"streamable-http","endpoint":"https://api.revclamp.com/api/mcp","authentication":{"sandbox":"none (zero-key stateless sandbox supported)","workspace":"Authorization: Bearer rg_live_<workspace_key>"}},"tools":[{"name":"revclamp_audit_revenue_leakage","title":"Audit B2B Revenue Leakage & Dispute Readiness","description":"Run a deterministic 90-day B2B revenue leakage and chargeback readiness audit across Stripe subscriptions, AI/API usage telemetry events, and open disputes. Executes as a 100% read-only, stateless diagnostic with zero external Stripe mutations. Returns structuredContent containing ok, mode, statelessEphemeralAudit, tenantId, dunningGracePeriodDays, costPerEventCents, and audit (scannedCustomers, scannedEvents, ghostLeakEventsCount, affectedCustomersCount, estimatedBleedUsd, disputesEligibleForAutoEvidence). Use this tool for portfolio-wide multi-customer audits; use revclamp_evaluate_ghost_usage for single-customer entitlement checks or revclamp_stage_stripe_dispute_ce3 to build a single dispute's Visa CE 3.0 evidence bundle.","annotations":{"title":"Audit B2B Revenue Leakage & Dispute Readiness","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"inputSchema":{"type":"object","properties":{"dunningGracePeriodDays":{"type":"integer","minimum":0,"maximum":14,"description":"Custom dunning grace window in integer days (valid range: 0 to 14, default: 3) allowed after latest_invoice_failed_at before flagging past_due subscriptions as unpaid ghost usage."},"costPerEventCents":{"type":"integer","minimum":1,"maximum":10000,"description":"Estimated marginal compute or API cost per leaked usage event in integer USD cents (valid range: 1 to 10000, default: 142 i.e. $1.42/event)."},"customers":{"type":"array","description":"Optional array of up to 50 Stripe customer snapshots (each with id like 'cus_123', optional email, subscriptions array or list object, and subscriptionsHasMore: false). Omit to run against workspace telemetry or deterministic sandbox fixtures."},"usageEvents":{"type":"array","description":"Optional array of up to 200 product/AI API usage telemetry events (each with stripe_customer_id or email, event_name, and occurredAtSec Unix timestamp in seconds)."},"disputes":{"type":"array","description":"Optional array of up to 50 Stripe dispute objects (each with id like 'du_123', customer, amount in cents, reason such as 'fraudulent', and status such as 'needs_response')."}},"additionalProperties":false}},{"name":"revclamp_evaluate_ghost_usage","title":"Evaluate Single-Customer Stripe Basil Ghost Usage","description":"Evaluate whether a specific customer's AI or API usage event constitutes unpaid ghost usage across multi-subscription Stripe 2025-03-31.basil state, enforcing fail-closed pagination (has_more must be explicitly false) and configurable 0-14 day dunning grace windows. Executes as a stateless, read-only entitlement evaluator with zero side effects. Returns structuredContent containing ok, mode, statelessEphemeralAudit, tenantId, and evaluation (isGhostLeak, isGhostUsage, reason). Use this tool for real-time per-customer entitlement gating; use revclamp_audit_revenue_leakage for batch multi-customer portfolio audits.","annotations":{"title":"Evaluate Single-Customer Stripe Basil Ghost Usage","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"inputSchema":{"type":"object","required":["customerId","subscriptions"],"properties":{"customerId":{"type":"string","description":"Required Stripe customer identifier to evaluate (format example: 'cus_9s6XKzkNRiz8i3', max 64 chars)."},"subscriptions":{"description":"Required Stripe customer subscriptions payload: either a Stripe list object ({ data: [...], has_more: false }) or a raw array of up to 50 subscription objects containing id, status ('active', 'trialing', 'past_due', 'canceled', 'unpaid'), current_period_end, or items.data[].current_period_end in Unix seconds."},"subscriptionsHasMore":{"type":"boolean","description":"Pagination completeness flag (boolean). Must be explicitly set to false when passing a raw subscriptions array so RevClamp can verify no active subscription was truncated on a later page."},"dunningGracePeriodDays":{"type":"integer","minimum":0,"maximum":14,"description":"Dunning grace window in integer days (valid range: 0 to 14, default: 3) after latest_invoice_failed_at during which past_due subscriptions remain entitled."},"usageTimestampSec":{"type":"integer","description":"Optional Unix epoch timestamp in integer seconds (e.g. 1761264000) when the AI/API usage event occurred (defaults to current server Unix timestamp if omitted)."},"occurredAtSec":{"type":"integer","description":"Optional alias for usageTimestampSec: Unix epoch timestamp in integer seconds (e.g. 1761264000) when the usage event occurred (used when usageTimestampSec is omitted)."}},"additionalProperties":false}},{"name":"revclamp_stage_stripe_dispute_ce3","title":"Stage Visa CE 3.0 Stripe Dispute Evidence Draft","description":"Evaluate Visa Compelling Evidence 3.0 (CE 3.0) qualification across 120-to-365-day historical charges (requiring at least 2 settled, non-refunded, non-disputed prior transactions sharing IP address, device fingerprint, or billing email) and assemble a non-destructive Stripe dispute evidence draft with submit hardcoded to false. Executes as a pure read-only staging computation that never auto-submits to card networks. Returns structuredContent containing ok, mode, statelessEphemeralAudit, tenantId, submitForcedFalse, ce3Qualification, and drawer (including stripeUpdateParams with submit: false and merged access_activity_log). Use this tool for single-dispute CE 3.0 qualification and evidence staging; use revclamp_audit_revenue_leakage for portfolio-wide dispute readiness counts.","annotations":{"title":"Stage Visa CE 3.0 Stripe Dispute Evidence Draft","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"inputSchema":{"type":"object","properties":{"disputeId":{"type":"string","description":"Stripe dispute identifier being staged (format example: 'du_1QxyzEnterpriseDispute01', default: 'du_mcp_staged_01', max 64 chars)."},"customerId":{"type":"string","description":"Stripe customer identifier associated with the disputed charge (format example: 'cus_enterprise_88', default: 'cus_mcp_enterprise_01', max 64 chars)."},"disputeReason":{"type":"string","description":"Stripe dispute reason code (e.g. 'fraudulent', 'unrecognized', 'subscription_canceled'; default: 'fraudulent'; Visa CE 3.0 applies to 'fraudulent' disputes)."},"existingUncategorizedText":{"type":"string","description":"Optional existing merchant evidence notes in Stripe evidence.uncategorized_text or access_activity_log (up to 18,000 chars) to preserve via append-only merge without overwriting."},"disputedTransaction":{"type":"object","description":"Optional disputed charge snapshot object containing id (e.g. 'ch_disputed_01'), occurredAtSec (Unix seconds), customer_id, email, ip_address, and device_id."},"priorTransactions":{"type":"array","description":"Optional array of up to 50 historical Stripe charge objects (each with id, status: 'succeeded', disputed: false, refunded: false, occurredAtSec 120-365 days prior to disputedTransaction, email, ip_address, and device_id)."},"usageEvents":{"type":"array","description":"Optional array of up to 200 customer product/API usage telemetry events (each with occurredAtSec Unix seconds, stripe_customer_id, and event_name) for append-only access_activity_log staging."}},"additionalProperties":false}},{"name":"revclamp_validate_eu_vat_vies","title":"Validate EU/XI B2B VAT ID & VIES Reverse-Charge State","description":"Normalize EU-27 and Northern Ireland (XI) B2B VAT identifiers (including mandatory Greece ISO-3166 GR to EL prefix normalization) and evaluate cross-border 0% VAT reverse-charge eligibility, VIES consultation evidence, or MS_UNAVAILABLE circuit-breaker fulfillment hold actions. Read-only and non-destructive; supports deterministic simulation modes ('VALID', 'INVALID', 'MS_UNAVAILABLE') or real-time European Commission VIES SOAP/REST lookup ('LIVE'). Returns structuredContent containing ok, mode, statelessEphemeralAudit, simulatedViesLookup, tenantId, normalizedVat, reverseChargeEligible, and viesDecision (status, action, zeroRateAllowed, consultationId). Use this tool for EU/XI VAT tax compliance; use revclamp_reconcile_b2b_net_terms for wholesale Net-15/30/60 deposit and credit-note accounting.","annotations":{"title":"Validate EU/XI B2B VAT ID & VIES Reverse-Charge State","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true},"inputSchema":{"type":"object","required":["buyerVatId"],"properties":{"sellerCountry":{"type":"string","description":"Two-letter EU-27 or XI member state prefix of the merchant's dispatch warehouse (e.g. 'DE', 'NL', 'FR', 'EL', 'XI'; 'GR' is automatically normalized to 'EL'; default: 'DE')."},"buyerVatId":{"type":"string","description":"Required buyer EU or Northern Ireland VAT registration number to normalize and validate (e.g. 'DE123456789', 'GR123456789', 'NL123456789B01', 'XI123456789', max 40 chars)."},"viesMode":{"type":"string","enum":["VALID","INVALID","MS_UNAVAILABLE","LIVE"],"description":"VIES evaluation mode: 'VALID' (deterministic active VAT simulation, default), 'INVALID' (deterministic rejected VAT simulation), 'MS_UNAVAILABLE' (deterministic member-state outage circuit-breaker simulation), or 'LIVE' (real-time European Commission VIES lookup)."},"consultationNumber":{"type":"string","description":"Optional VIES requester consultation reference number (e.g. 'WAPIAAAAW998877', max 64 chars) to attach to deterministic 'VALID' mode tax audit records."}},"additionalProperties":false}},{"name":"revclamp_reconcile_b2b_net_terms","title":"Reconcile B2B Wholesale Net-15/30/60 Deposits & Credit Notes","description":"Reconcile B2B wholesale Net-15, Net-30, and Net-60 invoice deposits, partial payments, and credit notes using exact integer minor-unit (EUR/USD cent) arithmetic with zero IEEE-754 floating-point drift. Executes as a pure, stateless, read-only financial reconciliation function. Returns structuredContent containing ok, mode, statelessEphemeralAudit, tenantId, and reconciliation (state, status, fulfillmentHold, releaseHoldAction, requiredDepositCents, remainingBalanceCents, creditDueCents, overpaidWarning, orderTag). Use this tool for B2B wholesale order deposit gating and Net-terms balance calculation; use revclamp_validate_eu_vat_vies for cross-border EU VAT number validation.","annotations":{"title":"Reconcile B2B Wholesale Net-15/30/60 Deposits & Credit Notes","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"inputSchema":{"type":"object","required":["orderId","totalOrderCents","paidAmountCents"],"properties":{"orderId":{"type":"string","description":"Required B2B wholesale order or invoice identifier (e.g. 'gid://shopify/Order/908812' or 'ORD-2026-9088', max 64 chars)."},"totalOrderCents":{"type":"integer","description":"Required gross invoice total in positive integer minor currency units / cents (e.g. 250000 for 2,500.00 EUR; must be > 0)."},"paidAmountCents":{"type":"integer","description":"Required cumulative amount collected from the buyer in non-negative integer cents (e.g. 75000 for 750.00 EUR; must be >= 0)."},"creditNoteCents":{"type":"integer","description":"Optional post-invoice credit notes or return adjustments in integer cents (valid range: 0 to totalOrderCents, default: 0; singular alias for creditNotesCents)."},"creditNotesCents":{"type":"integer","description":"Optional post-invoice credit notes or return adjustments in integer cents (valid range: 0 to totalOrderCents, default: 0; plural alias for creditNoteCents)."},"requiredDepositCents":{"type":"integer","description":"Optional explicit upfront deposit threshold in integer cents (valid range: 0 to totalOrderCents). Overrides requiredDepositPercent when provided."},"requiredDepositPercent":{"type":"integer","description":"Optional upfront deposit percentage required before releasing warehouse fulfillment hold (valid range: 0 to 100, default: 30 i.e. 30% upfront deposit)."},"paymentTermsDays":{"type":"integer","description":"Optional B2B net payment terms maturity window in integer days (allowed values: 15, 30, or 60 for Net-15, Net-30, or Net-60; default: 30)."}},"additionalProperties":false}},{"name":"revclamp_verify_webhook_signature","title":"Verify Stripe, Shopify & RevClamp Webhook HMAC-SHA256 Signatures","description":"Generate and verify canonical Stripe-Signature (t=<unix>,v1=<hex_sha256>), X-Shopify-Hmac-Sha256 (<base64_sha256>), and X-RevClamp-Signature (t=<unix>,v1=<hex_sha256>) headers over exact UTF-8 webhook payload bytes using crypto.timingSafeEqual and a 300-second replay window guard. Enforces a Zero-Trust guard that blocks known live/production credential patterns (sk_live_, rk_live_, non-test whsec_..., shpss_..., shpat_..., rg_live_, rc_live_, AKIA..., and PEM private keys) with -32602 LIVE_SECRET_FORBIDDEN_IN_SANDBOX. Returns structuredContent containing ok, mode, statelessEphemeralAudit, tenantId, and verification (provider, verificationMode, headerName, generatedHeader, expectedSignature, signatureValid, verificationReason, timingSafeCompared, replayWindowApplicable, timestampSec, timestampSkewSeconds, toleranceSeconds, withinReplayWindow, payloadByteLength, payloadSha256, commonIntegrationTrap). Use this tool to debug webhook signature mismatches and replay skew.","annotations":{"title":"Verify Stripe, Shopify & RevClamp Webhook HMAC-SHA256 Signatures","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"inputSchema":{"type":"object","properties":{"provider":{"type":"string","enum":["stripe","shopify","revclamp"],"description":"Webhook signature provider scheme to evaluate: 'stripe' (Stripe-Signature t=<sec>,v1=<hex>, default), 'shopify' (X-Shopify-Hmac-Sha256 Base64 raw UTF-8 HMAC), or 'revclamp' (X-RevClamp-Signature t=<sec>,v1=<hex>)."},"secret":{"type":"string","description":"Synthetic or test webhook signing secret (default: 'whsec_test_revclamp_sandbox_secret_2026', max 256 chars). Live production secrets (sk_live_, rk_live_, non-test whsec_..., shpss_..., shpat_..., rg_live_, rc_live_, AKIA..., and PEM private keys) are rejected."},"rawPayload":{"type":"string","description":"Exact unparsed UTF-8 webhook request body string (up to 16,384 chars) used to compute the canonical SHA-256 HMAC digest. Defaults to a provider-specific sample JSON event if omitted."},"timestampSec":{"type":"integer","minimum":1,"maximum":9999999999,"description":"Optional Unix epoch timestamp in integer seconds (valid range: 1 to 9999999999; defaults to current server Unix timestamp) used when generating or verifying timestamped Stripe/RevClamp headers."},"signatureHeader":{"type":"string","description":"Optional supplied HTTP signature header value to verify via crypto.timingSafeEqual (e.g. 't=1760000000,v1=...' or Base64 digest, max 512 chars). Omit to run in GENERATE_AND_SELF_VERIFY mode."}},"additionalProperties":false}},{"name":"revclamp_calculate_roi_and_plan_fit","title":"Calculate B2B 0% Take-Rate ROI & Optimal Plan Fit","description":"Deterministically calculate monthly and annual B2B margin savings using exact integer USD cents when replacing a 25%-30% contingency chargeback agency with RevClamp flat-rate 0% commission plans ($19 Starter, $59 Growth, $199 Scale). Evaluates monthlyWonDisputeUsd, monthlyGhostBleedUsd, contingencyTakeRatePercent, and monthlyUsageEvents to recommend the optimal tier. Returns structuredContent containing ok, mode, statelessEphemeralAudit, tenantId, recommendedTier, annualNetMarginSavedUsd, roiMultiple, and calculation.","annotations":{"title":"Calculate B2B 0% Take-Rate ROI & Optimal Plan Fit","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"inputSchema":{"type":"object","properties":{"monthlyWonDisputeUsd":{"type":"number","minimum":0,"maximum":10000000,"description":"Monthly won Stripe chargeback volume in USD (valid range: 0 to 10000000, default: 10000) subject to legacy agency take-rate fees."},"monthlyGhostBleedUsd":{"type":"number","minimum":0,"maximum":10000000,"description":"Monthly unpaid AI/API or SaaS usage bleed stopped by RevClamp basil entitlement guards in USD (valid range: 0 to 10000000, default: 600)."},"contingencyTakeRatePercent":{"type":"number","minimum":1,"maximum":50,"description":"Competitor chargeback agency contingency commission percentage (valid range: 1 to 50, default: 25 for 25% take-rate tools)."},"monthlyUsageEvents":{"type":"integer","minimum":0,"maximum":50000000,"description":"Monthly verified usage events across your workspace (integer 0 to 50000000, default: 250000) used to recommend Starter (<=100k), Growth (<=1M), or Scale (<=5M)."}},"additionalProperties":false}},{"name":"revclamp_simulate_webhook_replay","title":"Simulate Webhook Replay & Out-of-Order State Machine","description":"Deterministically evaluate an ordered or out-of-order sequence of 1-10 Stripe/Shopify/RevClamp subscription lifecycle webhooks against a 72-hour idempotency deduplication Set (eventId), a configurable idempotencyWindowSec (60s-2592000s, default: 259200s / 72h), and a monotonic transition timestamp guard (event.createdSec >= lastAppliedCreatedSec). Compares RevClamp's monotonic FSM against a naive overwrite-on-arrival handler to detect resurrected canceled subscriptions, stale tier downgrades, and duplicate retry side-effects. Returns structuredContent containing ok, mode, statelessEphemeralAudit, tenantId, simulation, steps, finalStatus, finalTier, finalEntitlementDecision, naiveFinalStatus, and naiveHandlerBug.","annotations":{"title":"Simulate Webhook Replay & Out-of-Order State Machine","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"inputSchema":{"type":"object","properties":{"scenarioPreset":{"type":"string","enum":["out_of_order_stale_update_after_cancel","duplicate_event_id_replay_72h","valid_monotonic_upgrade_sequence","expired_72h_window_stale_event","custom"],"description":"Scenario preset to evaluate when custom events are omitted (default: 'out_of_order_stale_update_after_cancel')."},"events":{"type":"array","minItems":1,"maxItems":10,"description":"Optional custom array of 1 to 10 webhook events ({ eventId, eventType, createdSec, subscriptionStatus, tier, currentPeriodEndSec }) in arrival order.","items":{"type":"object","properties":{"eventId":{"type":"string","minLength":1,"maxLength":96,"pattern":"^[A-Za-z0-9_.:-]{1,96}$","description":"Unique provider webhook event ID (e.g. evt_cancel_final_1050) checked against the 72-hour deduplication Set."},"eventType":{"type":"string","minLength":1,"maxLength":96,"pattern":"^[A-Za-z0-9_.-]{1,96}$","description":"Webhook event type string (e.g. customer.subscription.deleted, customer.subscription.updated, invoice.payment_failed)."},"createdSec":{"type":"integer","minimum":946684800,"maximum":4102444800,"description":"Provider event creation timestamp in Unix seconds (must be <= nowSec + 34560000 / 400 days) compared monotonically against lastAppliedCreatedSec."},"subscriptionStatus":{"type":"string","enum":["active","trialing","past_due","paused","canceled","cancelled","unpaid","cancel_at_period_end","expired"],"description":"Subscription lifecycle status carried by this webhook event."},"tier":{"type":"string","enum":["free","starter_19","growth_59","scale_199"],"description":"Optional RevClamp plan tier associated with the subscription state (default: 'growth_59')."},"currentPeriodEndSec":{"type":"integer","minimum":946684800,"maximum":4102444800,"description":"Optional subscription current_period_end timestamp in Unix seconds."}},"required":["eventId","eventType","createdSec","subscriptionStatus"],"additionalProperties":false}},"nowSec":{"type":"integer","minimum":946684800,"maximum":4102444800,"description":"Reference evaluation timestamp in Unix seconds used to check the 72-hour idempotency window."},"idempotencyWindowSec":{"type":"integer","minimum":60,"maximum":2592000,"description":"Deduplication and replay-acceptance window in seconds (valid range: 60 to 2592000, default: 259200 for 72 hours)."}},"additionalProperties":false}},{"name":"revclamp_lint_dispute_evidence","title":"Stripe Dispute Evidence UTF-16 & CE 3.0 Completeness Linter","description":"Deterministically lint a Stripe dispute evidence[access_activity_log] payload against Stripe's 18,000 UTF-16 code unit (String.prototype.length) ceiling, UTF-8 byte length, non-destructive --- BEGIN REVCLAMP CE3 EVIDENCE --- / --- END REVCLAMP CE3 EVIDENCE --- delimiter markers, existing merchant note preservation, and Visa Compelling Evidence 3.0 (CE 3.0) prior-charge (>= 2) + IP/device overlap qualification. Returns structuredContent containing ok, mode, statelessEphemeralAudit, tenantId, lint, utf16CodeUnits, maxUtf16Ceiling, remainingUtf16Units, withinCeiling, utf8Bytes, nonDestructiveMarkersPresent, merchantNotesPreserved, priorMatchedCount, hasIpMatch, hasDeviceMatch, ce3RubricPassed, and overallVerdict.","annotations":{"title":"Stripe Dispute Evidence UTF-16 & CE 3.0 Completeness Linter","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"inputSchema":{"type":"object","properties":{"preset":{"type":"string","enum":["valid_ce3_non_destructive","utf16_overflow_19k","missing_device_and_overwrite_risk","custom"],"description":"Scenario preset to evaluate when custom evidenceLogText is omitted (default: 'valid_ce3_non_destructive')."},"existingMerchantNotes":{"type":"string","maxLength":18000,"description":"Existing human AE/support notes inside evidence[access_activity_log] that must be preserved."},"evidenceLogText":{"type":"string","maxLength":30000,"description":"Merged or candidate Stripe dispute evidence[access_activity_log] payload evaluated against the 18,000 UTF-16 code unit ceiling and non-destructive delimiter markers."},"priorMatchedCount":{"type":"integer","minimum":0,"maximum":50,"description":"Number of prior undisputed Stripe charges (120d-365d old) with matching customer_id and IP/device fingerprint (Visa CE 3.0 requires >= 2)."},"hasIpMatch":{"type":"boolean","description":"Whether the disputed charge IPv4/IPv6 address matches the historical undisputed charges."},"hasDeviceMatch":{"type":"boolean","description":"Whether the disputed charge device_id fingerprint matches the historical undisputed charges."}},"additionalProperties":false}}]}