How to Create a Custom Analysis Module

Step by Step: From Business Question to Interactive Report

Build Your Own Statistical Analysis

Every business has unique questions that off-the-shelf analytics tools cannot answer. Maybe you need a price elasticity analysis specific to your product catalog, a logistic regression on customer churn with your own feature set, or a time-series decomposition on a KPI no dashboard covers. MCP Analytics lets you describe that question in plain English and get a production-grade, reproducible R-based analysis module built for you automatically.

The result is not a one-off report. It is a reusable module: upload new data anytime and get an updated interactive report with charts, statistical interpretations, a full code appendix, and PDF export. This tutorial walks you through every step, from signing in to running your first analysis.

What You'll Need

What You'll Get

Step 1: Sign In to Your Account

Go to app.mcpanalytics.ai and sign in. If you do not have an account yet, click Sign Up — it takes less than a minute. No credit card is required to create an account.

Once signed in, navigate to the Modules tab in the left sidebar. You will see your existing modules (if any) and a "+ Create Module" button at the top.

Tip: If you are on the free Demo tier, you can explore existing modules and run sample analyses. To create your own module, you will need a Starter plan, Pro plan, or PAYG credits. Compare plans.

Expected Outcome: You are signed in and looking at the Modules tab with the "+ Create Module" button visible.

Step 2: Describe Your Analysis

Click "+ Create Module". An AI assistant chat opens at the bottom of the screen. This is where you describe what you want in plain English. The assistant understands statistical methods, business contexts, and data structures.

Example Prompts

"I want to analyze customer churn drivers using logistic regression.
My data has columns for tenure, monthly_charges, contract_type,
and whether the customer churned."

"I need a price elasticity analysis for my retail data. I have
weekly prices and unit sales for 50 SKUs over 2 years."

"Build me a module that does survival analysis on employee
attrition. My HR dataset has hire_date, termination_date,
department, salary, and performance_rating."

The assistant asks clarifying questions to nail down the spec:

Note: You do not need to know R or statistics. The assistant translates your business question into a formal specification. If you do know R, you can be as technical as you like — the assistant adapts to your level.

Expected Outcome: A back-and-forth conversation that results in a clear analysis specification: what the module does, what columns it needs, and what output cards (charts and tables) it will produce.

Step 3: Upload Your Dataset

Before or during the conversation, upload your data via the Datasets tab. Click "Upload Dataset", select your file, and give it a descriptive name. Supported formats:

Once uploaded, the assistant can see your dataset's columns, types, and sample values. It uses this information to suggest column mappings automatically.

Tip: Clean data produces better modules. Before uploading, check for: missing values in key columns, consistent date formats, and meaningful column names. The platform handles most data cleaning, but starting clean reduces build time.

Expected Outcome: Your dataset is uploaded and the assistant has identified the relevant columns for your analysis.

Step 4: Review and Submit

The assistant auto-fills the module specification form with everything discussed in the conversation:

Module Specification:

Title: Customer Churn Logistic Regression
Description: Identifies drivers of customer churn using logistic
             regression with odds ratios and marginal effects.

Required Columns:
  - customer_id (identifier)
  - churned (binary: 0/1)
  - tenure_months (numeric)
  - monthly_charges (numeric)
  - contract_type (categorical)
  - total_charges (numeric)

Output Cards:
  1. Model Summary — coefficients, p-values, AIC
  2. Odds Ratios — forest plot with confidence intervals
  3. ROC Curve — model discrimination
  4. Confusion Matrix — prediction accuracy
  5. Marginal Effects — how each predictor shifts churn probability
  6. Feature Importance — ranked variable contributions

Analysis Method: Logistic Regression (GLM, family=binomial)

Review each section. You can edit titles, add or remove output cards, change column mappings, or ask the assistant to adjust anything. When you are satisfied, click Submit.

A billing confirmation dialog shows the cost:

Note: The module is private to your account by default. Only you can see and run it. You can share it later if you choose.

Expected Outcome: Your module request is submitted and you see a confirmation with the module name and a link to the tracking page.

Step 5: Track Your Build

Your module enters the autonomous build pipeline. You can track its progress in real-time at:

https://mcpanalytics.ai/track.html?m={module_name}

The tracking page is linked from your account page and from the confirmation email you receive after submission.

What Happens During the Build

The autonomous pipeline runs through these stages:

  1. Spec Validation — confirms the specification is complete and internally consistent
  2. R Code Generation — AI writes the analysis code card by card, following the spec
  3. Visual Verification — renders the report and checks each chart for correctness
  4. Deployment — packages the module and deploys it to the production platform
  5. Production Test — runs the module against your dataset on the live server
  6. Quality Review — automated review of statistical output and narrative
  7. Marketing Assets — generates a description page and catalog entry

Typical build time: 20–45 minutes. You do not need to keep the page open. The system sends you an email when your module is ready, with a direct link to run your first analysis.

Tip: If a build step fails (rare), the pipeline automatically attempts a fix and retries. If it still fails, you receive an email with details and can contact support or adjust the spec and resubmit.

Expected Outcome: The tracking page shows your module progressing through each pipeline stage, and you receive an email when it is ready.

Step 6: Run Your Analysis

Once the build completes, your module appears in two places:

To run the analysis:

  1. Click on your module
  2. Upload a CSV (or select an existing dataset) with matching columns
  3. Map any columns if the names differ from the spec
  4. Click Run Analysis

Within seconds, you receive a full interactive report:

Your Report Includes:

- Interactive Charts — hover, zoom, filter
- Statistical Tables — coefficients, p-values, confidence intervals
- AI Interpretations — plain-English explanations of each finding
- Code Appendix — full R source code used to generate the analysis
- PDF Export — print-ready report with citations
- Data Quality Summary — missing values, outliers, distributions
Reusable: Your module is not a one-time analysis. Upload new data next week, next month, or next quarter and get an updated report instantly. The module persists in your account forever.

Expected Outcome: A complete interactive report for your custom analysis, ready to share, export, or re-run on new data.

Ready to Build Your Custom Module?

Stop forcing your business questions into generic dashboards. Describe what you need, upload your data, and get a publication-quality analysis module built in under an hour.

Create Your First Module

Sign in, describe your analysis in plain English, and the platform builds it for you. No R knowledge required.

Create a Module Now →

Compare plans →

What you get:

Learn more about the custom module system on the Custom Analysis overview page, or check pricing and plans.

Next Steps

1. Run It from Your AI Agent

If you use Claude Desktop, Cursor, or another MCP client, you can request and run modules directly from your AI assistant without opening a browser. See the MCP agent tutorial.

2. Explore the Analysis Catalog

Browse pre-built modules for common analyses — churn prediction, cohort retention, price elasticity, A/B testing, and more — at the analysis catalog.

3. Connect Live Data Sources

Instead of uploading CSVs manually, connect Google Analytics, Google Search Console, Shopify, or Stripe as live data sources. See the API documentation.

4. Share with Your Team

Modules are private by default. You can share a module with team members or make it available to your organization from the module settings page.

Troubleshooting

"+ Create Module" button is not visible

Module creation requires a paid plan (Starter, Pro, or PAYG with credits). If you are on the Demo tier, upgrade your plan to unlock this feature.

Build failed or stuck

The pipeline retries automatically on transient failures. If your module stays in a failed state for more than an hour, check the tracking page for error details. Common causes: ambiguous column mappings, unsupported analysis types, or datasets with too few rows. Adjust the spec and resubmit.

Report looks wrong

If a chart is blank or an interpretation seems off, check that your data matches the column spec (correct types, no unexpected nulls). You can re-run the analysis with a cleaned dataset. For persistent issues, contact support.