excel-master-pro
Live Demo
Open the sample interactive dashboard
π EXCEL MASTER PRO (v2.2.0 β Modular Data Intelligence SDK, CLI, MCP & BI Platform)
EXCEL MASTER PRO is a local-first enterprise data intelligence platform available as a Python SDK, Rich CLI, Model Context Protocol (MCP) Server, and Interactive SaaS Web UI. It automatically analyzes complex, messy, and large-scale Excel and tabular datasets, detects 13 distinct business rule and data quality errors, cleans records safely with user confirmation and full undo history, merges multiple files via intelligent column mapping, and exports client-ready Professional PDF, Interactive BI HTML, and Formatted Excel packages in a single click or command.
Related MCP server: precis-mcp
β¨ Key Features
1. Python SDK, CLI & AI Agent (MCP) Integration (excel_master/)
Programmatic Python SDK (
import excel_master): Clean, modular API (inspect,detect_errors,clean,export_report) to embed automated spreadsheet validation, cleaning pipelines, and reporting into any Python workflow without UI overhead.Command-Line Interface (
excel-master): Terminal-native commands (inspect,audit,clean,report,ui,mcp) built with Rich summary tables and headless batch execution.Model Context Protocol (
MCP) Server: Built-in MCP server (excel-master mcp) exposing spreadsheet inspection, error detection, cleaning, and report generation tools directly to AI agents (Claude Desktop, Cursor, Antigravity, etc.).
2. Linear / Raycast-Inspired Obsidian SaaS BI Dashboard (ui/, dashboard/, utils/i18n.py)
Bilingual Interface (
EN / TRSwitcher & URL Routing): Instant one-click switching between English (EN) and Turkish (TR) across the categorized sidebar, persistent topbar, onboarding flow, smart column detection headers, and executive overview β supporting?lang=enand?lang=trURL query parameters.High-Craft Dark Obsidian SaaS Interface: Built with an ultra-clean monochrome dark palette (
#09090B/#121215), subtle hairline borders (#27272A), monochrome SVG icons, and a unified single-card drag-and-drop upload zone.Categorized 11-Module Left Sidebar:
WORKSPACE:
Overview,Data Preview,Data QualityDATA ENGINE:
Error Detector,Auto-Cleaning,Data Analysis,ChartsOPERATIONS:
Reporting,Batch Processing,Action History,Settings
Persistent Topbar & Comparative KPIs: Displays active file name, row Γ column dimensions, worksheet selector, quick file upload trigger, one-click Generate Report button, and 6 Before/After KPI cards (
Total Records,Total Columns,Missing Data Rate,Duplicate Records,Detected Errors,Data Quality Score).
3. Advanced File Ingestion & Smart Column Detection (core/file_reader.py, core/column_detector.py)
Supported Formats:
XLSX,XLS,XLSM,ODS,CSV,TSV,TXT,JSON,Parquet.Smart Header & Column Inference:
Automatically resolves shifted headers (not located on the first row), merged cells, and two-tier (parent group + sub-header) Excel headers.
Assigns temporary identifiers (
Col_1,Col_2, ...) to headerless files without dropping the first data row, inferring semantic column types (Email,Phone,National ID,Date,City,Country,Gender,Status,Order/Customer ID,Full Name,Amount,Quantity) from cell contents.Prompts the user for confirmation whenever prediction confidence is low; never hallucinates or fabricates column names when true headers are unknown, preserving temporary names and notifying the user.
4. Automated Error Detector (core/error_detector.py, ui/error_detector.py)
Automatically scans datasets across 13 core data quality and business rule error classes:
Malformed date formats
Invalid email addresses
Invalid phone numbers
Duplicate customer records
Negative stock quantities
Unexpected price values (
<= 0)Missing required fields
Inconsistent categories (casing, whitespace, and typo variants)
Text values in numeric columns
Statistical outliers (
IQR)Corrupted or malformed column names
Data type mismatches
Logical inconsistencies (
Start Date > End Date,Quantity Γ Unit Price β Total Amount, invalid age or percentage values)
Displays Severity Level (
Critical/High/Medium/Low), affected record count, sample values, recommended remediation, and an Auto-Fix Confidence Score (0β100%) for every detected issue.Provides a row-level Before & After Comparison preview; destructive actions (row deletion or overwriting) are never executed without explicit user approval.
5. One-Click Professional Report Generation (ui/reports.py, exporters/)
Client-ready deliverables generated in a single batch via the Web UI, CLI, SDK, or MCP:
Professional PDF Analysis Report (
.pdf): Cover page, file metadata, KPI cards, data quality score, missing value analysis, error detector breakdown, outlier analysis, statistical summary, high-resolution charts, chart commentary, pre/post-cleaning comparison, and overall evaluation (with full UTF-8 / Turkish character support).Interactive HTML Dashboard (
.html): Self-contained, offline-capable SaaS BI visual analytics report.Cleaned Excel Workbook (
.xlsx): Formatted output featuring conditional formatting, auto-filters, frozen header panes, quality summary, audit log, and quarantine sheets.Data Quality Report (
.xlsx), Action History (.xlsx), Injection-Safe CSV (.csv), and a Single-File ZIP Package (.zip).
6. Multi-Excel Batch Processing (core/batch_processor.py, ui/batch.py)
MODE 1 (Clean & Report Separately): Analyzes and safely cleans multiple files individually, generating dedicated Excel + HTML + PDF reports for each workbook.
MODE 2 (Smart Map & Merge into Master Table): Automatically aligns synonymous columns across disparate files (
mΓΌΕteri_adΔ±,mΓΌΕteri adΔ±,Customer NameβCustomer Name), merging them into a unified table upon user confirmation while preserving source lineage (Source_File).Fault Isolation: A corrupted or unreadable file never halts processing for the rest of the batch; all outputs are delivered via a summary dashboard and a consolidated ZIP archive.
ποΈ Project Architecture
excel_master_pro/
βββ app.py # Main Streamlit entry point (EN/TR switcher, categorized sidebar + Topbar)
βββ pyproject.toml # Package metadata, dependencies & `excel-master` CLI entrypoint
βββ config.py # Centralized SaaS BI configuration and Obsidian color palette
βββ run.bat # Windows one-click isolated venv setup & auto-browser launcher
βββ excel_master/
β βββ __init__.py # Public Python SDK exports
β βββ api.py # High-level programmatic SDK functions
β βββ cli.py # Rich-powered CLI (`inspect`, `audit`, `clean`, `report`, `ui`, `mcp`)
β βββ mcp_server.py # Model Context Protocol (MCP) tool server for AI agents
βββ core/
β βββ file_reader.py # Multi-format, multi-row/shifted-header ingestion engine
β βββ file_validator.py # Extension, magic-byte, zip-bomb, and macro validation
β βββ column_detector.py # Type inference, content-based header detection & canonical mapping
β βββ error_detector.py # 13-rule Automated Error Detector & Before/After preview
β βββ cleaning_engine.py # Recommendation, approval, quarantine & undo-safe cleaning engine
β βββ batch_processor.py # Multi-file MODE 1 & MODE 2 batch processing engine
β βββ anomaly_detector.py # IQR, MAD Z-score, Isolation Forest & integrity checks
β βββ data_profiler.py # Column-level statistical and structural profiler
β βββ data_analyzer.py # Data quality scoring and correlation analysis
β βββ data_transformer.py # Column operations, safe AST formulas, pivot & DuckDB SQL
β βββ file_comparator.py # Two-table/file comparison and diff analysis
βββ dashboard/
β βββ kpi_generator.py # 6 core KPI card generator with Before/After delta tracking
β βββ chart_generator.py # Priority-ranked BI charts, gauges & quality heatmaps
β βββ dashboard_builder.py # Smart analytical insights, category shares & dashboard assembler
βββ exporters/
β βββ pdf_exporter.py # 12-section enterprise PDF analysis report generator
β βββ html_exporter.py # Standalone interactive SaaS BI HTML dashboard exporter
β βββ excel_exporter.py # Formatted XlsxWriter workbook & diff report exporter
β βββ csv_exporter.py # Formula-injection-protected CSV exporter
βββ ui/ # 11 localized Streamlit page modules, shared Topbar/CSS & session state
βββ utils/
β βββ i18n.py # Centralized English/Turkish (EN/TR) localization & URL query routing
β βββ helpers.py # Number, date, and formatting utilities
β βββ validators.py # Input sanitization & safe filename guards
β βββ logger.py # PII-masked application logging
β βββ history.py # SQLite action history persistence
βββ tests/ # Comprehensive Pytest suite covering Core, UI, SDK, CLI & MCPπ Installation & Usage
1. Install Package
pip install -e ".[all]"2. Launch Web UI
Windows (One-Click):
run.batVia CLI / Terminal:
excel-master ui3. CLI Usage
# Inspect file structure, inferred column types, and quality score
excel-master inspect sales_data.xlsx
# Run the 13-rule error detector audit
excel-master audit sales_data.xlsx
# Clean dataset and export formatted workbook
excel-master clean sales_data.xlsx -o cleaned_sales.xlsx
# Generate full PDF + HTML + Excel report bundle
excel-master report sales_data.xlsx -o ./reports
# Start the MCP server for AI agents
excel-master mcp4. Python SDK Usage
import excel_master as em
# Inspect & audit a messy spreadsheet
summary = em.inspect("sales_data.xlsx")
errors = em.detect_errors("sales_data.xlsx")
# Clean safely and export client-ready reports
cleaned_df = em.clean("sales_data.xlsx", output_path="cleaned_sales.xlsx")
em.export_report("sales_data.xlsx", output_dir="./reports")5. Running Tests
pytest -vπ‘οΈ Security & Data Integrity Principles
Uploaded files are processed 100% locally on your machine; no data is ever transmitted to external networks.
Original files remain untouched and are automatically backed up under
output/originals/.No rows or columns are deleted without explicit user approval; modified or removed records are preserved in quarantine and can be restored anytime via Undo.
VBA macros inside
.xlsmworkbooks are automatically detected and strictly blocked from execution.
πΊοΈ Roadmap (v2.3.0)
Zero-Configuration Autonomous Adaptation Engine (
core/autonomous_engine.py): Automatically reconstruct shifted/multi-tier headers, normalize mixed TR/US currency and date formats, resolve transposed financial models, and quarantine unrecoverable rows without manual configuration.One-Command Autopilot (
excel-master auto): Clean raw workbooks and generate interactive HTML + PDF executive BI dashboards straight from messy layouts via CLI, Python SDK, and MCP.Dynamic PDF Table Wrapping (
exporters/pdf_exporter.py): Automatic text wrapping and dynamic column width allocation for wide tables.
Available Tools
4 toolsclean_spreadsheetADestructiveIdempotent
Repair data quality errors in a spreadsheet and save the cleaned file to output_path.
Overwrites any existing file at `output_path`. Optional `rules` can filter specific
operations or categories (e.g. ["drop_duplicates", "trim"]). When omitted, safe and
high-confidence repairs are applied automatically.
Args:
file_path: Path to the source spreadsheet to clean.
output_path: Destination path where the cleaned file will be written (overwrites if exists).
rules: Optional list of specific cleaning rule identifiers to apply; defaults to all safe rules.
Returns:
JSON string with before/after quality score delta, row counts, output path, and operation log.
Inputs: file_path (required), output_path (required), rules. Returns: result
generate_bi_reportADestructiveIdempotent
Generate an executive BI report (HTML dashboard, PDF analysis report, Excel workbook, or CSV).
Reads the dataset from `file_path`, computes statistical profiles and KPIs, and writes the
rendered artifact to `output_path`. Overwrites any existing file at `output_path`.
Args:
file_path: Path to the source spreadsheet (.xlsx, .xls, .csv, .tsv, .json, .ods, or .parquet) to analyze.
output_path: Destination file path where the generated report will be saved (overwrites if exists).
format: Output report format; must be one of "html", "pdf", "xlsx", or "csv" (defaults to "html").
lang: Report localization language; "en" for English or "tr" for Turkish (defaults to "en").
Returns:
JSON string containing status, resolved `output_path`, `format`, `lang`, and `size_bytes`.
Inputs: file_path (required), output_path (required), lang, format. Returns: result
inspect_spreadsheetARead-onlyIdempotent
Inspect an Excel, CSV, TSV, JSON, ODS or Parquet spreadsheet without modifying it.
Detects column schema, calculates the 0-100 data quality score, and scans all
13 data quality & business-rule checks (invalid dates, emails, phones, negative stock,
outliers, duplicates, missing mandatory fields, type mismatches, logical contradictions)
with affected row indices and sample fixes.
Args:
file_path: Path to the input spreadsheet (.xlsx, .xls, .csv, .tsv, .json, .ods, or .parquet).
Returns:
Compact JSON string containing schema metadata, quality score, and detected issues.
Inputs: file_path (required). Returns: result
merge_spreadsheetsADestructiveIdempotent
Merge multiple spreadsheets with differing column names into one unified workbook.
Uses intelligent semantic column alignment (e.g. customer_name / musteri_adi / Customer Name),
preserves source file lineage (`Kaynak_Dosya`), cleans values prior to stacking, and saves
the unified table to `output_path` (overwriting any existing file at that path).
Args:
file_paths: List of two or more input spreadsheet paths to align and stack.
output_path: Destination path for the merged output file (overwrites if exists).
Returns:
JSON string summarizing aligned columns, source files, and total merged row count.
Inputs: file_paths (required), output_path (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 4 tools
Each tool maps to a clearly distinct phase of spreadsheet work: inspection is read-only, cleaning repairs in place to a new output, merging combines multiple files, and reporting produces a BI artifact. Overlap is minimal because the action and input shape differ substantially, and the descriptions reinforce the boundaries.
All four tools follow a consistent verb_noun snake_case pattern: inspect_spreadsheet, clean_spreadsheet, merge_spreadsheets, generate_bi_report. The naming is predictable and readable with no mixed conventions.
Four tools is well within the appropriate range and each corresponds to a distinct, useful operation in the spreadsheet workflow. There is no redundant or filler tool, and the surface feels intentionally scoped.
The set covers inspection, cleaning, merging, and reporting, which are core lifecycle operations for spreadsheet processing. Minor gaps remain, such as direct filtering/querying, row-level editing, or conversion between tabular formats beyond report output, but agents can work around these for most common tasks.
Maintenance
Related MCP Connectors
Agent verification tools: CSV quality, citation checks, AI-readiness audits, requirement extraction
AI-native data layer: sheets, databases and apps for every agent, with exact answers and audit.
Open, inspect, filter, edit and convert xlsx and csv files from your AI chat. Processing is local.
Open, inspect, filter, edit and convert xlsx and csv files from your AI chat. Processing is local.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA comprehensive Model Context Protocol (MCP) server for SQLite database operations. This server enables AI assistants to interact with SQLite databases through a standardized interface.421 npmMIT
- AlicenseAqualityBmaintenanceLocal-first data quality validation for Excel/CSV: schema-aware checks with 10 zero-code constraint types (uniqueness, ranges, foreign keys and more) and row-level error reports.43Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables small local models and other agents to read and query spreadsheet files locally, run SQL and cleaning, audit formulas, make Excel-correct edits, and generate branded dashboards with token-budgeted responses across selectable tool tiers.53 PyPIMIT
- AlicenseAqualityBmaintenanceEnables AI agents to deterministically profile, clean, normalize, and validate tabular data, including locale-aware numbers, dates, text encoding, IDs, and CSV/XLSX/JSON inputs, while flagging ambiguous values instead of guessing.633 PyPIBusiness Source 1.1