Skip to main content
Glama

AIVA MCP Server

npm version License: MIT

Model Context Protocol server for AIVA - Connect your AI coding tools to AIVA's customer intelligence and Shopify data.

What is this?

AIVA MCP is a Model Context Protocol server that gives AI coding assistants (Claude, Cursor, Windsurf, etc.) direct access to:

  • Customer Intelligence - RFM segments, health scores, churn predictions

  • Subscription Data - Active subscriptions, delivery schedules, lifecycle events

  • Affiliate Tracking - Referral codes, commissions, leaderboards

  • Shopify Store Data - Products, orders, customers (proxied through AIVA)

Related MCP server: InventPay MCP Server

Quick Start

Installation

npm install @getaiva/mcp

Configuration

Add to your MCP configuration file:

Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "aiva": {
      "command": "npx",
      "args": ["@getaiva/mcp"],
      "env": {
        "AIVA_API_KEY": "your-api-key-here"
      }
    }
  }
}

Cursor (.cursor/mcp.json in your project):

{
  "mcpServers": {
    "aiva": {
      "command": "npx",
      "args": ["@getaiva/mcp"],
      "env": {
        "AIVA_API_KEY": "your-api-key-here"
      }
    }
  }
}

VS Code with Continue (.continue/config.json):

{
  "mcpServers": [
    {
      "name": "aiva",
      "command": "npx",
      "args": ["@getaiva/mcp"],
      "env": {
        "AIVA_API_KEY": "your-api-key-here"
      }
    }
  ]
}

Getting Your API Key

  1. Log in to your AIVA Merchant Dashboard

  2. Go to Settings > API Keys

  3. Create a new API key with the scopes you need

  4. Copy the key and add it to your MCP configuration

Available Tools

Once connected, your AI assistant can use these tools:

Customer Intelligence

Tool

Description

aiva_get_customer

Get customer profile by ID or email

aiva_search_customers

Search customers with filters

aiva_get_rfm_segments

Get RFM segment breakdown

aiva_get_churn_risk

Get customers at risk of churning

Subscriptions

Tool

Description

aiva_get_subscription

Get subscription details

aiva_list_subscriptions

List subscriptions with filters

aiva_get_delivery_schedule

Get upcoming deliveries

aiva_subscription_actions

Pause, resume, skip, swap products

Affiliates

Tool

Description

aiva_get_affiliate

Get affiliate details

aiva_list_affiliates

List affiliates with stats

aiva_get_referrals

Get referral history

Shopify (Proxied)

Tool

Description

shopify_get_products

Search/list products

shopify_get_product

Get product by ID

shopify_get_orders

List orders

shopify_get_customer

Get Shopify customer

Environment Variables

Variable

Required

Description

AIVA_API_KEY

Yes

Your AIVA API key

AIVA_API_URL

No

Custom API URL (default: https://api.aiva.io)

SHOPIFY_ACCESS_TOKEN

No

Direct Shopify access (bypasses proxy)

SHOPIFY_STORE

No

Your Shopify store domain

Example Usage

Once configured, ask your AI assistant things like:

"Show me customers at high risk of churning"

"Get the subscription details for customer john@example.com"

"List all products in the 'dog-food' collection"

"What are our top-performing affiliates this month?"

"Find customers in the 'Champions' RFM segment"

Development

Running Locally

git clone https://github.com/0800tim/aiva-mcp.git
cd aiva-mcp
npm install
npm run dev

Testing

npm test

Building

npm run build

Troubleshooting

"AIVA_API_KEY not configured"

Make sure your API key is set in the env section of your MCP configuration.

"Connection refused"

Check that:

  1. Your API key is valid

  2. You have network access to the AIVA API

  3. The MCP server started correctly

Debug Mode

Set DEBUG=aiva:* environment variable for verbose logging:

{
  "env": {
    "AIVA_API_KEY": "your-key",
    "DEBUG": "aiva:*"
  }
}

License

MIT - see LICENSE for details.

Support

Available Tools

15 tools
aiva_get_affiliateC

Get affiliate details and stats.

Inputs: affiliateId, code.

aiva_get_churn_riskC

Get customers at risk of churning, sorted by risk score.

Inputs: riskLevel, limit.

aiva_get_customerC

Get customer profile by ID or email. Returns customer details, RFM segment, health score, and subscription status.

Inputs: customerId, email.

aiva_get_delivery_scheduleC

Get upcoming deliveries for a customer or all subscriptions.

Inputs: customerId, days.

aiva_get_referralsC

Get referral history for an affiliate.

Inputs: affiliateId (required), dateRange.

aiva_get_rfm_segmentsC

Get RFM (Recency, Frequency, Monetary) segment breakdown with customer counts and trends.

Inputs: dateRange.

aiva_get_subscriptionC

Get subscription details by ID or customer.

Inputs: subscriptionId, customerId.

aiva_list_affiliatesC

List affiliates with stats, sortable by performance.

Inputs: sortBy, status, limit.

aiva_list_subscriptionsC

List subscriptions with filters.

Inputs: status, productId, limit, offset.

aiva_search_customersC

Search customers with filters. Supports filtering by segment, subscription status, tags, and more.

Inputs: query, segment, subscriptionStatus, limit, +1 more.

aiva_subscription_actionsC

Perform actions on subscriptions: pause, resume, skip, swap products.

Inputs: subscriptionId (required), action (required), newProductId, skipDate.

shopify_get_customerC

Get Shopify customer details.

Inputs: customerId, email.

shopify_get_ordersC

List orders with filters.

Inputs: customerId, status, limit.

shopify_get_productB

Get product details by ID or handle.

Inputs: productId, handle.

shopify_get_productsC

Search and list products from the connected Shopify store.

Inputs: query, collection, productType, limit.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 15 tools

    Disambiguation4/5

    Most tools have distinct purposes, but some potential confusion exists between aiva_get_customer and aiva_search_customers (both retrieve customer data with different approaches) and between shopify_get_product and shopify_get_products (single vs. multiple retrieval). The descriptions help clarify the differences, but agents might occasionally misselect between these pairs.

    Naming Consistency5/5

    All tools follow a consistent naming pattern: prefix (aiva_ or shopify_) + verb (get, list, search, or actions) + noun. This makes the tool set predictable and easy to understand, with no deviations in style or convention.

    Tool Count5/5

    With 15 tools, the count is well-scoped for the server's purpose of managing customer and subscription data across AIVA and Shopify. It covers multiple domains without being overwhelming, and each tool appears to serve a specific, useful function.

    Completeness4/5

    The tool set provides strong coverage for customer, subscription, and product data retrieval, with notable features like churn risk analysis and subscription actions. Minor gaps include no update or delete operations for customers or products, and limited write capabilities beyond subscription actions, but agents can likely work around these for most workflows.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to access and manage Shopify store data including products, orders, inventory, and analytics through the Model Context Protocol. It allows users to query store performance and customer details using natural language.
      -
    • A
      license
      C
      quality
      D
      maintenance
      Enables AI assistants like Cursor or Claude Desktop to fully manage a Shopify store using the Model Context Protocol, with tools for products, orders, customers, inventory, discounts, and analytics.
      32
      MIT
    • F
      license
      A
      quality
      B
      maintenance
      Enables AI agents to access real co-purchase intelligence and merchant operations tooling from an ecommerce store's order history, including product recommendations, bundle analysis, insights, replenishment forecasts, and merchant ops workflows.
      19
      45 npm
      1
      -