Metadata-Version: 2.4
Name: cailculator-mcp
Version: 2.0.0
Summary: CAILculator MCP Server - High-dimensional data analysis with dual algebra frameworks
Author-email: Paul Chavez <paul@chavezailabs.com>
License: MIT
Project-URL: Homepage, https://github.com/ChavezAILabs/cailculator-mcp
Project-URL: Documentation, https://github.com/ChavezAILabs/cailculator-mcp#readme
Project-URL: Repository, https://github.com/ChavezAILabs/cailculator-mcp
Project-URL: Issues, https://github.com/ChavezAILabs/cailculator-mcp/issues
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: mcp>=0.9.0
Requires-Dist: numpy>=1.24.0
Requires-Dist: scipy>=1.10.0
Requires-Dist: pandas>=2.0.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: pydantic-settings>=2.0.0
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: httpx>=0.27.0
Requires-Dist: matplotlib>=3.7.0
Requires-Dist: networkx>=3.0
Requires-Dist: hypercomplex>=0.3.4
Requires-Dist: clifford>=1.5.0
Requires-Dist: pandas-ta>=0.3.14b
Requires-Dist: openpyxl>=3.1.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: ruff>=0.1.0; extra == "dev"
Provides-Extra: premium
Requires-Dist: plotly>=5.18.0; extra == "premium"
Requires-Dist: kaleido>=0.2.1; extra == "premium"
Provides-Extra: web
Requires-Dist: gradio>=4.0.0; extra == "web"
Provides-Extra: http
Requires-Dist: aiohttp>=3.9.0; extra == "http"
Dynamic: license-file

**Applied Pathological Mathematics™** was born from this hypothesis:

*Higher-dimensional algebras following the Cayley-Dickson sequence, which have been wrongly dismissed as "pathological" mathematics, can be interpreted and exploited for computational advantage, with particular benefits for data journalism, AGI research, and high-frequency quantitative analysis.*

---

# CAILculator MCP Server v2.0

**Universal High-Precision Mathematical Structure Analysis for AI Agents**

*"Leveling the playing field with high-end, formally verified data analysis tools"*

### 🏆 Milestone: High-Precision Universal Engine (v2.0 - April 2026)
CAILculator has been completely overhauled to meet a **$10^{-15}$ machine precision** standard. The core engine is now strictly governed by **Lean 4 formal verification**, grounding every calculation in machine-verified mathematical truth.

- **[BilateralCollapse.lean](./lean/BilateralCollapse.lean)**: Formally proves the bilateral zero divisor identity ($PQ=0 \land QP=0$) used to gate all v2.0 transmissions.
- **[ChavezTransform_genuine.lean](./lean/ChavezTransform_genuine.lean)**: Proved stability constant $M$, ensuring transform outputs never exceed rigorous theoretical bounds.
- **Dual Frameworks**: v2.0 natively supports both non-associative **Cayley-Dickson** and associative **Clifford (Geometric)** algebras.

## The Mission: Data Analysis for Everyone

CAILculator v2.0 is designed to "level the playing field." By translating high-dimensional algebraic structures into domain-specific insights, we empower journalists, students, and researchers with tools previously reserved for elite quantitative shops.

### Specialized Profiles
v2.0 introduces the **Profile Manager**, which projects universal algebraic patterns into semantic leads:

*   **Journalism Profile**: Leveraging 30+ years of reporting expertise.
    *   **Tipping Points**: Detects sudden structural collapses in budgets, consensus, or policy (Bilateral Zeros).
    *   **Sourcing Confidence**: Measures signal robustness against noisy FOIA data (Transform Convergence).
    *   **Beats**: Optimized mappers for Politics (Campaign Finance), Public Health, and Poverty.
*   **Quant Equity Profile**: Designed for AGI-driven financial analysis.
    *   **Regime Detection**: Bridges HMM statistical baselines with algebraic structural analysis.
    *   **Volatility Anchors**: Identifies bifurcation risks using verified zero-divisor loci.
*   **RHI & General Data**: Spectral research mapping (Riemann Hypothesis Investigation) and general-purpose CSV analysis.

## Core v2.0 Upgrades

### 1. High-Precision standard ($10^{-15}$)
Unlike v1.x which relied on approximate $10^{-8}$ thresholds, v2.0 enforces full double-precision accuracy across all hypercomplex operations. If a pattern isn't a zero divisor to $10^{-15}$, it doesn't pass the v2.0 gate.

### 2. The "Option A" Embedding Fix
v2.0 resolves the "dispatch collapse" issue. Instead of embedding scalars into the $e_0$ channel, data is strictly mapped to non-real sedenion channels ($e_1$-$e_{15}$). This enables true mathematical differentiation across the **Canonical Six** patterns.

### 3. ZDTP 2.0 (Zero Divisor Transmission Protocol)
The protocol now uses **Bilateral Grounding**. Transmissions (16D → 32D → 64D) are derived from the four-factor bilateral interaction $\{Px, xQ, Qx, xP\}$, ensuring data integrity is verified by the same physics that governs the transform.

### 4. Cross-Algebra Universality
v2.0 identifies **Pattern 2** as the "Universal Bilateral Anchor"—a zero divisor pattern that holds identically across both Cayley-Dickson and Clifford algebras.

## System Requirements

- **Python:** 3.10 to 3.13 (64-bit)
- **OS:** Windows 10/11, macOS 10.15+, Linux (Ubuntu 20.04+)
- **Architecture:** 64-bit required for high-precision `scipy` and `numpy` operations.

## Installation

```powershell
pip install cailculator_mcp
```

### Configuration (Claude Desktop)

Open your configuration file and add the CAILculator server:

```json
{
  "mcpServers": {
    "cailculator": {
      "command": "cailculator-mcp",
      "args": ["--transport", "stdio"],
      "env": {
        "CAILCULATOR_API_KEY": "your_api_key_here"
      }
    }
  }
}
```

## Available Tools (v2.0)

### 🔬 High-Precision Tools
*   **`chavez_transform`**: Apply the formally verified transform to find hidden structure in data.
*   **`detect_patterns`**: Algebraic detection of Tipping Points and Pattern Consistency.
*   **`verify_bilateral_oracle`**: High-precision check ($10^{-15}$) for any zero divisor pair.
*   **`map_e8_orbit`**: Project 16D/32D vectors onto verified E8 Weyl orbits.

### 📰 Domain Intelligence
*   **`list_domain_profiles`**: Explore Journalism, Quant, and RHI tiers.
*   **`zdtp_transmit`**: Protocol-level structural data transmission with convergence scoring.
*   **`illustrate`**: High-precision visualizations (Refactored to resolve System32 path regressions).

### 📈 Financial & Batch Analysis
*   **`regime_detection`**: Dual-method market analysis.
*   **`batch_analyze_market`**: Smart sampling strategy for GB-scale datasets.

## Research & Collaboration

Built on formal research published at DOI: [10.5281/zenodo.17402495](https://doi.org/10.5281/zenodo.17402495). All core structural claims are verified in Lean 4.

Interested in custom profile development for **LHC**, **F1 Teams**, or **Biotech**? 
Contact **Chavez AI Labs** at [paul@chavezailabs.com](mailto:paul@chavezailabs.com) or [iknowpi@gmail.com](mailto:iknowpi@gmail.com).

---
**Chavez AI Labs** - *"Verification over assumption. Better math, less suffering."*
