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) report generator, deployed as an MCP server. Queries AWS Athena, auto-discovers metrics, and renders beautiful HTML/PDF reports.
Features
- Dynamic columns — auto-detects latest 5 weeks and trailing 12 months from data
- Auto-expanding metrics — new metrics in the data automatically appear in reports
- Beautiful HTML output — dark theme, responsive, RAG color indicators
- Server-side PDF — tamper-proof PDF generation via WeasyPrint
- No credentials in code — uses ambient AWS credentials (AWS CLI)
- MCP integration — use from Kiro, Claude Desktop, or any MCP client
Quick Start (uvx)
# Set your environment variables
export WBR_ATHENA_DATABASE=my_database
export WBR_ATHENA_VIEW=my_wbr_view
export WBR_ATHENA_OUTPUT_LOCATION=s3://my-bucket/athena-results/
export WBR_ATHENA_REGION=us-east-1
# Run via uvx (no install needed)
uvx fresh-wbr-mcp
MCP Configuration
Add to your MCP client config (e.g., .kiro/settings/mcp.json):
{
"mcpServers": {
"fresh-wbr": {
"command": "uvx",
"args": ["fresh-wbr-mcp"],
"env": {
"WBR_ATHENA_DATABASE": "my_database",
"WBR_ATHENA_VIEW": "my_wbr_view",
"WBR_ATHENA_OUTPUT_LOCATION": "s3://my-bucket/athena-results/",
"WBR_ATHENA_REGION": "us-east-1"
},
"disabled": false
}
}
}
Tools
generate_wbr
Generate a WBR report as HTML.
generate_wbr(level="01_Fresh")
generate_wbr(level="02_Category", level_value="grocery")
generate_wbr(level="11_Channel", level_value="Online", metrics="Traffic,GV,Orders")
generate_wbr_pdf
Generate a tamper-proof PDF (server-side, not from browser DOM).
generate_wbr_pdf(level="01_Fresh")
list_wbr_levels
Discover available hierarchy levels in your data.
list_wbr_metrics
List metrics available for a given level.
preview_wbr_data
Preview data without generating a file.
Expected Data Schema
Your Athena view/table must have these columns:
| Column | Type | Description |
|---|---|---|
level |
string | Hierarchy level identifier |
level_dim_1 |
string | First dimension name |
level_value |
string | First dimension value |
level_dim_2 |
string | Second dimension name |
level_value_2 |
string | Second dimension value |
metric |
string | Metric name |
uom |
string | Unit of measure (#, %, ₹, etc.) |
metric_type |
string | Metric type |
metric_type_num_topic |
number | Sort order for metrics |
time_period_type |
string | "1.Weekly" or "2.Monthly" |
time_period |
string | "Week" or "Month" |
time_period_val |
string | Period label (e.g., "26-W-20", "26-M-06") |
time_period_sort |
number | Sortable period number (e.g., 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 (%) |
Prerequisites
- AWS CLI configured with valid credentials
- Access to the Athena database specified in env vars
- Python 3.9+ (for local install) or just
uvx(for direct run)
Environment Variables
| Variable | Required | Description |
|---|---|---|
WBR_ATHENA_DATABASE |
✅ | Athena database name |
WBR_ATHENA_VIEW |
✅ | Table/view name to query |
WBR_ATHENA_OUTPUT_LOCATION |
✅ | S3 path for query results |
WBR_ATHENA_REGION |
❌ | AWS region (default: us-east-1) |
Local Development
git clone https://github.com/mondalbh/fresh-wbr-mcp.git
cd fresh-wbr-mcp
python -m venv .venv
source .venv/bin/activate
pip install -e .
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fresh_wbr_mcp-0.1.0.tar.gz.
File metadata
- Download URL: fresh_wbr_mcp-0.1.0.tar.gz
- Upload date:
- Size: 18.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
785253d65bad0485e1ae91000290f53bbfc7e8d19cd8bda7475a66dcd630ce8e
|
|
| MD5 |
0c56f2f6e6bc21d36eb3836a61fa60ef
|
|
| BLAKE2b-256 |
6d9de7d086ab44a7ab39f0f5daa5a933c1d1ca1fa0c590fabc021bad2546e3ef
|
File details
Details for the file fresh_wbr_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: fresh_wbr_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 18.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3a117157adfb99479acd6bc0245929c187971959d0d2ef0c38c02bf107dfcd8
|
|
| MD5 |
5257e88e9cc84f6f5aa4badf5677a251
|
|
| BLAKE2b-256 |
85f9a9a06dcd3dbdbb01a4869fd64b45669582bea9ba1461a34b4e671e5fb8ed
|