Skip to main content

Dynamic WBR (Weekly Business Review) report generator MCP server. Queries AWS Athena, auto-discovers metrics, and renders beautiful HTML/PDF reports.

Project description

Fresh WBR MCP

Dynamic Weekly Business Review (WBR) dashboard generator, deployed as an MCP server. Queries AWS Athena, auto-discovers metrics across multiple reporting lenses, and renders a full-featured interactive HTML dashboard.

Features

  • Multi-lens dashboard — Overall, Channel, City, GL, Fresh Express views in one report
  • Auto-discovering — new metrics and segments appear automatically from data
  • Interactive — collapsible sections, lens filtering, metric focus, theme switcher
  • Real per-segment data — each city/channel/GL shows actual values from Athena
  • Tamper protection — DOM mutation observer prevents client-side value editing
  • Key Movements — auto-generated insights from data
  • Top/Bottom Movers — highlights best and worst performing metrics
  • No credentials in code — uses ambient AWS credentials via CLI

Quick Start (uvx)

export WBR_ATHENA_DATABASE=your_database
export WBR_ATHENA_VIEW=your_wbr_view
export WBR_ATHENA_OUTPUT_LOCATION=s3://your-athena-results-bucket/
export WBR_ATHENA_REGION=us-east-1

uvx fresh-wbr-mcp

MCP Configuration

{
  "mcpServers": {
    "fresh-wbr": {
      "command": "uvx",
      "args": ["fresh-wbr-mcp"],
      "env": {
        "WBR_ATHENA_DATABASE": "your_database",
        "WBR_ATHENA_VIEW": "your_wbr_view",
        "WBR_ATHENA_OUTPUT_LOCATION": "s3://your-bucket/athena-results/",
        "WBR_ATHENA_REGION": "us-east-1"
      }
    }
  }
}

Tools

generate_wbr

Generate the full leadership WBR dashboard.

generate_wbr()
generate_wbr(output_path="my_report.html")

Dashboard Features

Feature Description
Reporting Lens Filter by: All, Overall, Channel, City, GL, Seller, Fresh Express
Metric Sections Growth & Demand, Conversion & Basket, Availability & Selection, Price Competitiveness
Collapse/Expand Collapse lenses, lens values, or metric sections independently
Theme Switcher Dark mode (default) or Soft Light mode
Top/Bottom Movers Auto-detected from WoW changes
Key Movements AI-generated insights from metric trends
Data Quality Alerts for missing goals, new/unmapped metrics
Export PDF/Print, Excel download, Copy table
Refresh Smooth animated page refresh
Tamper Protection DOM observer prevents inspect-element value editing

Expected Data Schema

Your Athena view must have these columns:

Column Type Description
level string Hierarchy level (01_Fresh, 02_Channel, 04_City, 06_GL)
level_value string Segment name (city/channel/GL name)
metric string Metric name
uom string Unit of measure
metric_type_num_topic number Sort order
time_period string "Week" or "Month"
time_period_val string Period label (26-W-20, 26-M-06)
time_period_sort number Sortable period (202620)
actual_topic number Actual value
goal_topic number Goal value
vs_goal_topic number Variance vs goal (%)
vs_last_period_topic number Variance vs prior period (%)

Environment Variables

Variable Required Description
WBR_ATHENA_DATABASE Athena database name
WBR_ATHENA_VIEW Table/view to query
WBR_ATHENA_OUTPUT_LOCATION S3 path for query results
WBR_ATHENA_REGION AWS region (default: us-east-1)

Project Structure

fresh_wbr_mcp/
├── __init__.py
├── __main__.py          # MCP server entry point
├── data_fetcher.py      # Athena query builder
├── processor.py         # Data → dashboard format
├── renderer.py          # Injects data into template
├── server.py            # Core generation logic
└── templates/
    └── wbr_leadership.html  # Full dashboard template

License

MIT

Credits

Created by @mondalbh • Owned by CoBRA BIE Team

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fresh_wbr_mcp-0.2.0.tar.gz (46.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fresh_wbr_mcp-0.2.0-py3-none-any.whl (46.5 kB view details)

Uploaded Python 3

File details

Details for the file fresh_wbr_mcp-0.2.0.tar.gz.

File metadata

  • Download URL: fresh_wbr_mcp-0.2.0.tar.gz
  • Upload date:
  • Size: 46.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for fresh_wbr_mcp-0.2.0.tar.gz
Algorithm Hash digest
SHA256 1747a14f4308044db8786050bed829ae2f129f9552a75ad93a269693b27826b8
MD5 eab6e3299e7afb6fe23d9ce260c7d82d
BLAKE2b-256 68632d6f03cb9936e347d234429a12dc028f9e440c106f10f6449e7c5a16f5a4

See more details on using hashes here.

File details

Details for the file fresh_wbr_mcp-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: fresh_wbr_mcp-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 46.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for fresh_wbr_mcp-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5ecb6ee6434d8641237e4f124e8b4afff45ea825d5df791e6a7a07ddf3e0001b
MD5 58fd4779a971e03cd26d397c73db420a
BLAKE2b-256 ebe2b9d0be95fde572d1c0462179f94fb29ac5e8ad9259c0fe6b722c4a5d13e6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page