MCP Server

Connect your AI assistant to Margyn for store analytics

https://app.margyn.io/api/mcp/mcp

What is MCP?

MCP (Model Context Protocol) is an open standard that lets AI assistants connect to external tools and data sources. Margyn's MCP server gives your AI assistant direct access to your store's P&L metrics — so you can ask questions like "What was my profit last month?" and get an instant answer.


Available Tools

Once connected, your AI assistant gets access to these 9 tools:

list_clients

See connected stores with platform, currency, timezone, and ad platforms.

get_dashboard_metrics

Revenue, orders, ad spend, profit, ROAS, AOV, CPA with trend comparison.

get_profit_loss

Monthly P&L breakdown, annual summary, or expense categories.

get_product_analytics

Product-level revenue, units, cost, margin, and inventory health.

get_cohort_analysis

Customer acquisition cohorts with retention and LTV over time.

get_ad_performance

Google Ads + Meta Ads: spend, clicks, conversions, ROAS, CPA.

get_profit_health

Margin leak diagnostics: shipping, fees, discounts scored healthy/warning/unhealthy.

get_operating_expenses

Fixed & variable operating expenses: rent, salaries, subscriptions, commissions.

get_pmax_analytics

Performance Max campaign analytics: 11 views — channels, profit, products, search, placements, conversion lag, and more.


Analytics Playbook

The MCP server includes a built-in analytics playbook that auto-loads into your AI assistant. This ensures the AI analyzes your data the way an experienced e-commerce analyst would.

Profit Waterfall

RevenueCM1CM2Net Profit

CM1 = Revenue − COGS − Shipping | CM2 = CM1 − Ad Spend | Net Profit = CM2 − Operating Expenses

The playbook automatically selects the right tool for your question and compares against the previous period.


Connecting

Claude

Works on claude.ai web and the Claude Desktop app.

  1. 1Open Settings > Connectors
  2. 2Click "Add custom connector"
  3. 3Paste the server URL:
https://app.margyn.io/api/mcp/mcp
  1. 4Approve the OAuth authentication in the popup
  2. 5Done! Start asking questions about your store.

High-Value Prompts

Try these right after connecting:

Overview

How's my store doing this month?

Why did my profit drop last week?

Products

Which are my most profitable products?

Which products waste ad budget without profit?

Performance Max

How are my PMax campaigns performing by channel?

Which PMax assets are working best?

Is PMax driving brand or non-brand searches?

Customers

Show me cohort retention for the last 6 months.

How much do new vs returning customers spend on average?


FAQ