AMIRI Commercial Analytics MCP
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@AMIRI Commercial Analytics MCPSS26 is six weeks old. What should we chase and what is markdown risk?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
AMIRI Commercial Analytics MCP
A local-first, interview-ready Model Context Protocol (MCP) server for a luxury fashion commercial analytics team.
It turns executive questions such as:
“SS26 is six weeks old. What should we chase, what is becoming markdown risk, and is wholesale demand actually healthy?”
into calls to governed, deterministic analytics tools over a synthetic DTC + owned-retail + wholesale data model.
Important: every row in this repository is synthetic. This is a methodology demonstration shaped like a modern luxury-commerce analytics environment; it is not AMIRI internal data or a claim about AMIRI's actual KPIs.
Live Executive Demo
Launch the SS26 Executive Review →
Explore the interactive executive experience for commercial performance, sell-through, returns, wholesale health, inventory, and decision support.
All company, customer, product, and transaction data shown in the demo is synthetic and created solely for demonstration purposes.
Related MCP server: replenishradar
Why this project exists
The role is not just “build dashboards.” It is an operating-model problem: move from ad-hoc reporting toward a disciplined commercial analytics rhythm, give executives a consistent view across retail/e-commerce/wholesale/client data, define KPI frameworks, and pilot AI-assisted analytics with transparency and measurable value.
This project is deliberately designed around that job:
Executive rhythm: weekly flash, exceptions, and decision prompts.
Merchandising: aligned-week sell-through, chase vs hold vs markdown risk.
E-commerce: return-rate root cause with metric-validation and cohort discipline.
Retail: comparable-store growth vs total growth so new doors cannot hide comp softness.
Wholesale: sell-in vs sell-through, reorder health, stuffing warning.
Clienteling/marketing: adjusted descriptive clienteling read + causal warning; promo pull-forward check.
Finance: channel-specific P&L instead of one misleading blended margin.
Governance: named metrics, provenance, explicit caveats, synthetic-data flag, no unrestricted
run_sqltool.
Architecture
synthetic source-shaped CSVs -> governed analytics -> FastMCP tools -> MCP host / LLM
^ ^
manifest + SHA256 metric_catalog.csvThe design deliberately separates reasoning from calculation. The host LLM decides which tool to call and how to synthesize the evidence; analytics.py owns the governed math. See docs/CODE_WALKTHROUGH.md for the file-by-file explanation.
Production evolution would be:
Shopify / POS / wholesale / clienteling sources
-> Airbyte / ingestion
-> BigQuery
-> dbt staging -> intermediate -> marts
-> tested semantic metrics
-> MCP analytics service
-> authorized AI host / internal UIThe MCP server does not call an LLM. The host LLM decides which tool to call; the analytics layer computes the numbers. This keeps reasoning and metric computation separate.
See docs/PROBLEM_MAP.md for the stakeholder-by-stakeholder problem/decision map.
Tools
Tool | Executive question it answers |
| What changed commercially this week, and what needs a decision? |
| What should we chase, hold, or move toward markdown? |
| Is the return spike real, where is it localized, and what likely changed? |
| Can I trust today's numbers before I diagnose them? |
| Which channel is actually attractive after channel-specific economics? |
| Is strong wholesale sell-in translating into consumer sell-through and reorders? |
| Are stores improving, or are new doors masking comp softness? |
| Where are weeks-of-cover and inventory dollars becoming dangerous? |
| Is clienteling associated with better customer economics after reducing obvious selection bias? |
| Did a promotion create incremental demand or pull full-price demand forward? |
| How would we test whether a new owned store hurts a nearby wholesale partner? |
| Which governed tools answer each executive stakeholder's recurring questions? |
| What definitions, grains, owners, and caveats govern the KPIs? |
| What should I ask in a demo? |
Seeded stories you can demonstrate
The generator is deterministic and byte-verifiable. It uses seed 260829, writes data/manifest.json with SHA-256 hashes, and ships src/verify_reproducibility.py, which generates two independent temporary copies and compares both with the checked-in CSVs. A fresh rebuild intentionally creates several cases the tools should uncover:
Return anomaly: SS26
MX1 Hero Denim, DTC, late in the drop, with sizing dominating the reason mix and the largest seeded deterioration inUS_West. The tool uses a non-overlapping 3-week recent / 4-week prior baseline, a minimum-volume gate, geography drill-down, suggested actions, and a fixed-cohort measurement plan.Pipeline bug: six duplicated return rows that
data_quality_checkscatches; governed return-rate math dedupes first.Chase vs markdown: fast hero styles and slow styles inside the same current collection.
Wholesale sell-in trap: synthetic partner
Northstar Luxuryhas high sell-in, ~25% sell-through, and no reorders.Retail mix trap: total retail is much healthier than comp-store growth because a new Milan door adds revenue.
Promo pull-forward: a private-client event spikes the promo week and softens the next two weeks.
These are not random Easter eggs. Each corresponds to a real analytical judgment an interviewer can probe.
Quick start — local analytics first
Preferred: uv
cd amiri_commercial_analytics_mcp
uv sync # first run resolves dependencies; if uv.lock exists, it uses it
uv run python src/make_data.py
uv run python src/verify_reproducibility.py
uv run python -m unittest discover -s tests -v
uv run python src/cli.py allOr run the one-command health check:
./scripts/setup_and_test.shPip fallback
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python src/make_data.py
python src/verify_reproducibility.py
python -m unittest discover -s tests -v
python src/cli.py allDependency-lock note: pyproject.toml is included and FastMCP is pinned to the current stable 3.4.6. This build environment has no package-registry network access, so I could not honestly generate a resolved uv.lock here. On the first networked local uv sync, uv will create it; commit that file before publishing. Do not use --frozen until the lock exists.
If the generator, reproducibility check, tests, and CLI all pass, the business logic is working independently of the MCP host.
Start the MCP server
python src/mcp_server.pyThe process uses stdio and waits for an MCP client.
MCP Inspector
If Node/npm is installed:
npx @modelcontextprotocol/inspector .venv/bin/python src/mcp_server.pyInvoke the tools manually in Inspector before debugging an AI host. That isolates “analytics problem” from “MCP connection problem.”
Claude Desktop configuration
macOS configuration file:
~/Library/Application Support/Claude/claude_desktop_config.jsonExample:
{
"mcpServers": {
"amiri-commercial-analytics": {
"command": "/ABSOLUTE/PATH/amiri_commercial_analytics_mcp/.venv/bin/python",
"args": [
"/ABSOLUTE/PATH/amiri_commercial_analytics_mcp/src/mcp_server.py"
],
"env": {
"AMIRI_DATA_DIR": "/ABSOLUTE/PATH/amiri_commercial_analytics_mcp/data"
}
}
}
}Restart Claude Desktop after saving the config.
Five-minute interview demo
Use this sequence rather than clicking around randomly:
Trust first: “Before we diagnose anything, run the data-quality checks.”
Ambiguous case: “Our return rate spiked. Prove it's real, then localize the root cause.”
Commercial decision: “SS26 is six weeks old. What should we chase vs mark down?”
Cross-channel trap: “Wholesale shipments look strong. Is consumer demand actually strong by partner?”
Executive synthesis: “Give me the weekly commercial flash and the decisions leadership should discuss.”
The interview point is not “look, AI.” The point is: the same business definitions are reusable, tested, source-tagged, and callable from a natural-language interface.
Guardrails that are intentional
No unrestricted
run_sql(sql)tool for the LLM.Every tool response includes a
trustblock.Return rates are cohorted to order date, not return date.
Duplicate return IDs are detected and deduped before rate math.
Sell-through comparisons use aligned weeks of life.
Retail comp growth excludes new stores.
Wholesale sell-in is explicitly separated from sell-through.
Clienteling output contains a causal-selection warning.
Cannibalization uses a difference-in-differences framing and calls out its assumptions.
Scenario/teaching assumptions are labeled rather than presented as facts.
Repository layout
amiri_commercial_analytics_mcp/
├── README.md
├── LICENSE
├── pyproject.toml
├── requirements.txt
├── .gitignore
├── config/
│ └── metric_catalog.csv
├── data/
│ ├── dim_product.csv
│ ├── dim_customer.csv
│ ├── dim_store.csv
│ ├── fct_orders.csv
│ ├── fct_order_lines.csv
│ ├── fct_returns.csv
│ ├── fct_inventory_snapshot.csv
│ ├── fct_wholesale_sellthrough.csv
│ └── dim_promo.csv
├── src/
│ ├── analytics.py
│ ├── cli.py
│ ├── make_data.py
│ ├── verify_reproducibility.py
│ └── mcp_server.py
├── tests/
│ └── test_analytics.py
├── scripts/
│ ├── setup_and_test.sh
│ └── run_inspector.sh
└── docs/
├── ARCHITECTURE.md
├── CODE_WALKTHROUGH.md
├── DEMO_QUESTIONS_DEEP_DIVE.md
├── INTERVIEW_DEMO.md
├── PROBLEM_MAP.md
├── LOCAL_SETUP.md
├── GOLDEN_QUESTIONS.md
├── architecture.svg
├── return_rootcause.svg
└── GITHUB_PUBLISH.mdWhat I would say in the interview
“I treated this as an operating-system problem, not a chatbot project. I modeled the commercial questions the role is responsible for — sell-through, markdown exposure, returns, comp stores, wholesale sell-through, clienteling, channel economics — as governed tools. The LLM can decide which tool to call, but it cannot invent a KPI definition or silently query arbitrary raw data. The demo uses synthetic data, but the production pattern is the same one I would put over tested dbt marts in BigQuery.”
MIT licensed.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Ask questions across Shopify, Klaviyo, GA4 and 20+ e-commerce sources in plain English.
Sales analytics, ML forecasting, customer segmentation, and trend analysis.
Commerce intelligence for AI agents. Diagnose drop-offs, fix checkouts, optimize pricing.
Virtual try-on and on-model AI fashion photography: catalog search, try-on grids, HD delivery.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI-powered analytics from Stripe, PayPal, and Google Analytics 4 (BigQuery) data sources with built-in guardrails and automated workflows for financial and web performance insights.
- AlicenseAqualityBmaintenanceMulti-channel inventory intelligence for Shopify and Amazon sellers. 28 tools for stockout risk, demand forecasts, purchase order management, and sales analytics — with human-in-the-loop safeguards.501632MIT
- AlicenseBqualityCmaintenanceProvides a governed analytics layer over synthetic product data, exposing MCP tools for investigating product metrics, slicing by dimensions, and comparing periods while preventing unrestricted SQL access.6MIT
- FlicenseNot gradedqualityCmaintenanceEnables natural-language supply-chain analysis over synthetic datasets through governed SQL/Python tools, providing supplier scorecards, forecast accuracy, risk detection, landed-cost comparisons, capacity planning, and quality trend insights without the LLM performing quantitative calculations.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/maevelynz/amiri-commercial-analytics-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server