MCP Server
Connect your AI assistant to Margyn for store analytics
https://app.margyn.io/api/mcp/mcpWhat 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_clientsSee connected stores with platform, currency, timezone, and ad platforms.
get_dashboard_metricsRevenue, orders, ad spend, profit, ROAS, AOV, CPA with trend comparison.
get_profit_lossMonthly P&L breakdown, annual summary, or expense categories.
get_product_analyticsProduct-level revenue, units, cost, margin, and inventory health.
get_cohort_analysisCustomer acquisition cohorts with retention and LTV over time.
get_ad_performanceGoogle Ads + Meta Ads: spend, clicks, conversions, ROAS, CPA.
get_profit_healthMargin leak diagnostics: shipping, fees, discounts scored healthy/warning/unhealthy.
get_operating_expensesFixed & variable operating expenses: rent, salaries, subscriptions, commissions.
get_pmax_analyticsPerformance 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
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.
- 1Open Settings > Connectors
- 2Click "Add custom connector"
- 3Paste the server URL:
https://app.margyn.io/api/mcp/mcp- 4Approve the OAuth authentication in the popup
- 5Done! Start asking questions about your store.
High-Value Prompts
Try these right after connecting:
“How's my store doing this month?”
“Why did my profit drop last week?”
“Which are my most profitable products?”
“Which products waste ad budget without profit?”
“How are my PMax campaigns performing by channel?”
“Which PMax assets are working best?”
“Is PMax driving brand or non-brand searches?”
“Show me cohort retention for the last 6 months.”
“How much do new vs returning customers spend on average?”