Model Context Protocol
Connect MarginWhiz to AI assistants and agentic systems
MarginWhiz MCP is an AI-access layer that lets AI assistants query your pricing data directly — live projects, active cycles, margin recommendations, and cycle results — at query time.
Works today with Claude Desktop. Built on MCP, an open standard for AI tool access.
Why this matters
This turns MarginWhiz from a dashboard into a system AI can query directly.
Until now, getting insights out of MarginWhiz meant logging in, navigating to the right cycle, and copy-pasting data into an AI chat. MCP removes that step entirely.
No exports or copy-paste
AI assistants retrieve pricing data at query time. Nothing to download, format, or paste into a prompt.
Live data, not snapshots
Queries return current cycle status, active recommendations, and real margin figures — not a cached export from last week.
Works in natural language
Ask in plain English. The assistant retrieves the right data and synthesizes an answer — without you specifying which endpoint to call.
Two access layers
API and MCP serve different use cases
Use the REST API to build integrations with your apps, services, and backend systems. Full control over requests, responses, and automation logic.
Open API Portal →Use MCP to give AI assistants and agentic systems structured access to MarginWhiz data. The assistant decides which tools to call based on your question — no manual API wiring needed.
How to connect →What is Model Context Protocol?
MCP is an open standard that lets AI assistants connect directly to external tools and data sources. Instead of working from static context, the assistant can call live data at query time — structured and scoped to what it needs.
The MarginWhiz MCP server exposes your pricing projects, active cycles, and margin recommendations as structured tools and prompts. You ask a question — the assistant fetches what it needs and answers with your actual data.
Instead of this
"Here's a CSV export of my products... can you tell me which categories have the lowest margins and what I should focus on next?"
You say this
"Summarize my current margin health and suggest what to optimize next."
Example
What a real query looks like
You ask Claude Desktop:
"Which category performed worst in my last cycle?"
The assistant calls get_projects to identify your active project, then get_cycle_results to retrieve completed cycle data.
It reads the before/after margin deltas across categories and identifies which segment had the largest negative movement or lowest absolute margin.
It returns a plain-English answer with the category name, the margin figures, and optionally what the recommendations suggest for the next cycle — all from live MarginWhiz data.
Connect in three steps
Currently supported: Claude Desktop. Requires Node.js.
API keys are issued through the API Portal, which is MarginWhiz's central developer access layer.
01
Get your API key
Sign up or log in to the API Portal and copy your mw_... key. MCP uses the same key as the REST API.
02
Add the server config
Open Claude Desktop → Settings → Developer → Edit Config, and paste the snippet below. Replace the placeholder with your key.
03
Restart and start asking
Restart Claude Desktop after saving the config. A MarginWhiz connection will appear. Use the built-in prompts or ask anything about your data directly.
claude_desktop_config.json
{
"mcpServers": {
"marginwhiz": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://marginwhiz-mcp.onrender.com/mcp",
"--header",
"x-api-key:${MARGINWHIZ_API_KEY}"
],
"env": {
"MARGINWHIZ_API_KEY": "mw_your_api_key_here"
}
}
}
}Requires Node.js. The mcp-remote package is fetched automatically via npx. Restart Claude Desktop after editing the config file for changes to take effect.
Under the hood
How MarginWhiz MCP works
MCP acts as a bridge between the AI assistant and MarginWhiz's data layer. Here's what happens when you ask a question.
1
You ask
You type a question in Claude Desktop in plain English.
2
Assistant selects tools
Claude identifies which MarginWhiz tools are relevant and calls them.
3
MCP fetches live data
The MarginWhiz MCP server authenticates via your API key and returns structured data.
4
You get an answer
The assistant synthesizes the data into a clear, natural-language response.
Built-in prompts
Structured analyses, ready to run
These prompts combine your live data with structured reasoning. Invoke them by name in Claude Desktop — no additional setup required.
What actually moved — and why.
analyze_cycle_performanceWalks through a completed cycle: which products shifted, by how much, and whether the adjustments had the intended effect on margins.
Plain-English view of where you stand.
summarize_margin_healthGenerates a structured summary of current margins across your catalog — with low-margin products, outliers, and concentration risks called out explicitly.
A concrete starting point for the next cycle.
suggest_next_optimizationLooks at current data and recommends where to focus — which segments, attributes, or products have the most room to improve.
Tools
The AI assistant calls these automatically when answering data questions. You can also request them explicitly by name.
get_projectsReturns all MarginWhiz projects associated with your account.
get_cycle_statusFetches the current in-progress cycle for a given project — stage, date, and active product count.
get_recommendationsRetrieves margin adjustment recommendations for a cycle, ordered by potential impact.
get_cycle_resultsReturns full impact results from a completed cycle — before and after margins, deltas, and outcomes.
Resource
Resources provide live context the assistant can read directly without a tool call.
product-marginsCurrent effective margin for every product in your catalog — used as background context in margin health and optimization prompts.
Access and security
Access is controlled by your API key. MCP uses the same authentication infrastructure as the MarginWhiz REST API. No separate credentials or auth system.
API keys are issued from the API Portal. The MCP page does not issue keys. Visit the API Portal to generate or manage yours.
Scoped to your account data. MCP tools return data associated with your account only — projects, cycles, and recommendations you have access to.
Read-oriented access. Current MCP tools retrieve and summarize data. They do not write to or modify your MarginWhiz projects.
Ready to connect?
Get an API key from the API Portal, paste the config into Claude Desktop, and start querying your pricing data in plain English.