RGM MCP Server
Enables Revenue Growth Management analysis for the Alco-Bev industry using NIQ data, including price elasticity, promo effectiveness, and pricing optimization.
README
RGM MCP Server
A Python MCP server exposing analytical tools for Revenue Growth Management (RGM) in the Consumer Goods and Services space. Designed to work with flat-file exports from NIQ / NielsenIQ (CSV or Parquet).
Tools
| Tool | Description |
|---|---|
get_nielsen_input_schema |
Show the required and optional column schema for each NIQ input file before you start |
build_analytical_base_table |
Join NIQ sales + distribution + pricing exports into a clean, model-ready Analytical Base Table (ABT) with log-transformed columns |
calculate_price_elasticity |
OLS log-log regression → own-price & cross-price elasticity per segment (market, channel, SKU, etc.) |
score_promo_effectiveness |
Rolling-baseline lift %, incremental volume/revenue, and trade ROI per promo event |
recommend_dynamic_pricing |
Grid-search over ±N% price moves to find the revenue-maximising price given a margin floor and elasticity |
optimize_promo_calendar |
Greedy ROI-ranked promo event scheduling within total budget + max-events-per-SKU constraints |
compute_competitive_price_index |
Volume-weighted Competitive Price Index (own price / competitor price × 100) by category / brand / pack size / market |
Requirements
- Python 3.10+
- Dependencies:
fastmcp,pandas,pyarrow,numpy,scipy
Setup
# 1. Create and activate a virtual environment
python -m venv .venv
source .venv/bin/activate # macOS/Linux
.\.venv\Scripts\activate # Windows
# 2. Install dependencies
pip install -r requirements.txt
Running locally (stdio — for use with Bob / Claude Desktop)
python src/server.py
Register in your MCP client config (mcp.json):
{
"mcpServers": {
"rgm-mcp-server": {
"command": "/absolute/path/to/.venv/bin/python",
"args": ["/absolute/path/to/src/server.py"]
}
}
}
Typical workflow
-
Check the input schema for your NIQ files:
"What columns do I need in my NIQ sales file?"
-
Build the ABT from your NIQ exports:
"Build me the analytical base table from sales.csv, dist.csv, and pricing.csv, save to abt.csv"
-
Compute price elasticities by market:
"What are the price elasticities by market from abt.csv?"
-
Score past promos:
"Score promo effectiveness by market from abt.csv"
-
Get pricing recommendations (uses elasticity output):
"Recommend prices for Chicago and New York given a 30% margin floor and COGS of $5"
-
Build the promo calendar:
"Optimise a promo calendar for H2 2025 with a $200k budget"
-
Competitive price indexing:
"Compute the competitive price index for BrandA across all markets"
NIQ input file schemas
Call get_nielsen_input_schema() at any time to get the full column spec. Quick reference:
sales file (sales_file)
| Column | Type | Required | Description |
|---|---|---|---|
period_end_date |
date | ✅ | Week- or month-ending date (YYYY-MM-DD) |
upc |
string | ✅ | SKU / Universal Product Code |
market |
string | ✅ | NIQ retail geography |
channel |
string | ✅ | Trade channel (Grocery, Liquor, Club, etc.) |
unit_sales |
numeric | ✅ | Units sold in the period |
dollar_sales |
numeric | ✅ | Dollar revenue in the period |
avg_price_per_unit |
numeric | ✅ | Average shelf price (USD, no $ symbol) |
brand |
string | — | Brand name (required for CPI tool) |
category |
string | — | Category / sub-category |
pack_size |
string | — | Pack size / volume format |
any_promo_flag |
0 / 1 | — | 1 = promoted week (required for promo tools) |
trade_spend |
numeric | — | Trade spend in USD (required for promo ROI) |
distribution file (distribution_file)
| Column | Type | Required | Description |
|---|---|---|---|
period_end_date |
date | ✅ | Must match sales file exactly |
upc |
string | ✅ | Must match sales file exactly |
market |
string | ✅ | Must match sales file exactly |
channel |
string | ✅ | Must match sales file exactly |
total_distribution_points |
numeric | ✅ | NIQ TDP (% ACV weighted distribution) |
pricing file (pricing_file)
| Column | Type | Required | Description |
|---|---|---|---|
period_end_date |
date | ✅ | Must match sales file exactly |
upc |
string | ✅ | Must match sales file exactly |
market |
string | ✅ | Must match sales file exactly |
channel |
string | ✅ | Must match sales file exactly |
competitor_brand |
string | ✅ | Competitor brand name |
comp_avg_price |
numeric | ✅ | Competitor average shelf price (USD) |
avg_price_per_unit |
numeric | — | Own price (can be omitted if in sales file) |
All three files are joined on
period_end_date + upc + market + channel. Values must match exactly (case-sensitive) across files.All column names can be overridden via tool parameters when calling each tool.
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.