Metadata-Version: 2.5
Name: filedashboard-mcp
Version: 1.0.0
Summary: Privacy-first Excel, CSV, PDF & Word visual comparison, ML anomaly & DuckDB SQL SEP-1865 MCP App
Project-URL: Homepage, https://hessam-mamagani.github.io
Project-URL: Repository, https://github.com/Hessam-Mamagani/filedashboard-mcp
Project-URL: Issues, https://github.com/Hessam-Mamagani/filedashboard-mcp/issues
Author-email: Hessam Mamagani <hessam.mamagani@gmail.com>
License: AGPL-3.0-only
License-File: LICENSE
Keywords: anomaly-detection,data-reconciliation,duckdb,gdpr,kvkk,mcp,mcp-app,mcp-server,pdfplumber,pii-redaction,polars,rapidfuzz,sep-1865
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Requires-Python: >=3.11
Requires-Dist: duckdb>=1.1.0
Requires-Dist: fastapi>=0.115.0
Requires-Dist: fpdf2>=2.8.1
Requires-Dist: mcp>=1.9.0
Requires-Dist: numpy>=1.26.4
Requires-Dist: openpyxl>=3.1.5
Requires-Dist: pdfplumber>=0.11.4
Requires-Dist: polars>=1.12.0
Requires-Dist: pyarrow>=18.0.0
Requires-Dist: pydantic>=2.9.0
Requires-Dist: python-docx>=1.1.2
Requires-Dist: python-multipart>=0.0.20
Requires-Dist: rapidfuzz>=3.10.0
Requires-Dist: scikit-learn>=1.5.2
Requires-Dist: uvicorn>=0.32.0
Provides-Extra: audio
Requires-Dist: faster-whisper>=1.1.0; extra == 'audio'
Provides-Extra: dev
Requires-Dist: httpx>=0.27.2; extra == 'dev'
Requires-Dist: pytest>=8.3.0; extra == 'dev'
Requires-Dist: ruff>=0.8.0; extra == 'dev'
Provides-Extra: ocr
Requires-Dist: pymupdf>=1.25.0; extra == 'ocr'
Requires-Dist: rapidocr-onnxruntime>=1.4.0; extra == 'ocr'
Description-Content-Type: text/markdown

<!-- mcp-name: io.github.Hessam-Mamagani/filedashboard-mcp -->

# FileDashboard MCP

Privacy-first Python **SEP-1865 MCP App** and local web dashboard that turns messy **Excel, CSV, JSON, Parquet, PDF, Word (`.docx`), and TXT/MD** files into interactive visual comparison dashboards, ML anomaly plots, trend forecasts, and strictly read-only **DuckDB SQL** — with automatic local **GDPR / KVKK PII masking** so sensitive data never leaves your machine.

## Key Capabilities

- **Local GDPR / KVKK PII Shield:** Deterministically detects and masks emails, EU/TR IBANs, phone numbers, Luhn-checked payment cards, checksum-validated Turkish National IDs (`TCKN`), tax IDs, and API secrets locally before data enters DuckDB or any LLM context, preserving cross-file joins without leaking raw PII.
- **Universal Multi-Format Ingestion:** Loads `.csv`, `.tsv`, `.xlsx`/`.xlsm`, `.json`/`.jsonl`, `.parquet`, `.pdf` (extracts both tables and text via `pdfplumber`, with scanned-PDF detection), `.docx` (extracts both embedded tables and contract clauses), and `.txt`/`.md`.
- **Cross-File Fuzzy Reconciliation (`RapidFuzz`):** Matches messy entity and item names across different files (e.g., an Excel order history vs. a supplier PDF price quote), calculates exact variances and estimated cost impact, and exports clean CSV audit reports.
- **ML Anomaly Detection & Trend Forecast (`scikit-learn`):** Runs `IsolationForest` outlier detection and monthly `LinearRegression` trend forecasting with 95% confidence bands.
- **Document & Contract Diff:** Compares Word, PDF, or text documents clause-by-clause and surfaces changed numbers, currencies, percentages, and durations.
- **Read-Only DuckDB SQL Sandbox:** Executes `SELECT` / `WITH` / `DESCRIBE` / `SUMMARIZE` queries across all loaded tables while blocking DDL, writes, multi-statement SQL, and filesystem reads (`read_csv`, `COPY`, `ATTACH`).
- **Dual UI (Bilingual EN / TR, Dark / Light Theme):** Renders natively as an interactive **SEP-1865 MCP App** (`ui://filedashboard/dashboard.html`) inside Antigravity, Claude Desktop, VS Code, or Cursor — and runs locally in any browser via `filedashboard-web`.

## Quick Start

### 1. Run as an MCP App Server (Antigravity, Claude Desktop, VS Code, Cursor)

Add to your `mcp_config.json` / `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "filedashboard": {
      "command": "uvx",
      "args": ["filedashboard-mcp"]
    }
  }
}
```

### 2. Run as a Local Private Browser Dashboard (Windows / Mac / Linux)

```bash
uvx --from filedashboard-mcp filedashboard-web
```

Open `http://127.0.0.1:7860` to drag and drop local files with zero cloud uploads.

## MCP Tools

| Tool | Description | Safety |
| :--- | :--- | :--- |
| `open_file_dashboard` | Open the interactive SEP-1865 FileDashboard visual cockpit (loads sample or local files). | Read-only, local |
| `ingest_workspace_files` | Ingest local CSV, Excel, JSON, Parquet, PDF, Word, or TXT/MD files with automatic PII masking. | Read-only, local |
| `reconcile_cross_files` | Fuzzy-match two mounted tables (e.g., Excel vs. PDF) and flag value variances. | Read-only, local |
| `detect_data_anomalies` | Run `IsolationForest` outlier detection on any mounted numeric column. | Read-only, local |
| `query_workspace_sql` | Execute read-only DuckDB SQL across mounted tables. | Read-only, local |
| `compare_documents` | Compare two documents clause-by-clause and extract numeric/SLA shifts. | Read-only, local |

## Development & Tests

```bash
uv sync --python 3.12 --extra dev
uv run pytest -v
uv run ruff check src tests
```

## License

Dual-licensed under **GNU AGPL-3.0-only** ([LICENSE](https://github.com/Hessam-Mamagani/filedashboard-mcp/blob/main/LICENSE)) and a **Commercial License** ([COMMERCIAL_LICENSE.md](https://github.com/Hessam-Mamagani/filedashboard-mcp/blob/main/COMMERCIAL_LICENSE.md)).
