CAILculator MCP Server - High-dimensional data analysis with dual algebra frameworks
Project description
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 AGI research and development.
CAILculator MCP Server
High-dimensional mathematical structure analysis for AI agents
"Better math, less suffering"
What This Is
A Model Context Protocol server that lets AI agents compute with Cayley-Dickson algebras (sedenions 16D, pathions 32D, up to 256D) and associated Clifford algebras. Built on verified mathematical research into zero divisor patterns and structural properties discovered through systematic computational enumeration.
Why "Pathological" Might Mean "Powerful"
Beyond quaternions (4D) and octonions (8D), the Cayley-Dickson construction produces algebras with properties that violate conventional mathematical expectations:
- Non-associativity: (a × b) × c ≠ a × (b × c)
- Zero divisors: Non-zero numbers P, Q where P × Q = 0
- Loss of division algebra structure: Not every non-zero element has a multiplicative inverse
- Dimensional complexity scaling: Pattern counts grow superlinearly
These properties are called "pathological" because they break the rules of "nice" algebra that works for reals, complex numbers, quaternions, and octonions.
Pathological, however, doesn't mean useless.
Zero divisors exhibit patterns and symmetries. Non-associativity encodes order-dependence and context-sensitivity. The vast space of algebraic dark matter in higher-dimensional math becomes huntable through hypothesis-driven computational enumeration: structure over brute force, verification over assumption.
This server based on Applied Pathological Mathematics™ was designed to offer advantages for:
- High-dimensional representation learning
- Pattern detection in complex systems
- Algebraic approaches to neural architecture
- Structure-preserving embeddings
- Time series regime detection
Mathematical Foundation
Cayley-Dickson Construction
The Cayley-Dickson construction recursively doubles dimension:
- R (reals, 1D) → C (complex, 2D) → H (quaternions, 4D) → O (octonions, 8D)
- S (sedenions, 16D) → P (pathions, 32D) → 64D → 128D → 256D...
Each doubling loses algebraic properties:
- C: loses ordering
- H: loses commutativity
- O: loses associativity
- S and beyond: gain zero divisors, lose division algebra structure
Zero Divisors
A zero divisor is a pair of non-zero elements P, Q in an algebra where P × Q = 0.
In our research, we focus on two-term zero divisors of the form:
(e_a ± e_b) × (e_c ± e_d) = 0
where e_i are basis elements and a, b, c, d are distinct indices.
Verified Pattern Counts:
- 16D (Sedenions): 84 base patterns, 168 ordered patterns
- 32D (Pathions): 460 base patterns, 920 ordered patterns
These patterns exhibit:
- Block structure: 16D blocks replicate with cross-block mixing
- Conjugation symmetry: Predictable sign-flip behavior
- Computational stability: Numerical verification to machine precision (< 1e-13)
Research Foundation
Built on systematic computational enumeration published at DOI: 10.5281/zenodo.17402496 - Framework-Independent Zero Divisor Patterns in Higher-Dimensional Cayley-Dickson Algebras: Discovery and Verification of The Canonical Six
Recent work has identified connections to E8 exceptional Lie algebra structure (October 2025 discoveries) with modular development integrated. Ongoing research will continue further development into 512D.
Installation
pip install cailculator-mcp
For HTTP transport (Gemini CLI support):
pip install cailculator-mcp[http]
Setup
CAILculator MCP Server supports two transport modes:
- stdio (default): For Claude Desktop, Claude Code
- http: For Gemini CLI and other HTTP-based MCP clients
Setup for Claude Desktop (stdio mode)
Add to your MCP client configuration:
Mac/Linux: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"cailculator": {
"command": "cailculator-mcp",
"env": {
"CAILCULATOR_API_KEY": "your_api_key_here"
}
}
}
}
Setup for Gemini CLI (HTTP mode)
1. Start the HTTP server:
cailculator-mcp --transport http --port 8080
Set your API key via environment variable:
export CAILCULATOR_API_KEY="your_api_key_here"
# Windows: set CAILCULATOR_API_KEY=your_api_key_here
Note: The server requires a valid API key. Contact paul@chavezailabs.com for research access.
2. Configure Gemini CLI:
Add to ~/.gemini/settings.json:
{
"mcpServers": {
"cailculator": {
"manifestUrl": "http://localhost:8080/mcp/manifest"
}
}
}
3. HTTP endpoints:
- GET /mcp/manifest - Tool definitions
- POST /message - MCP JSON-RPC messages
- GET /health - Health check
Available Tools
Core Mathematical Operations
chavez_transform
Apply proprietary transform that maps data into high-dimensional Cayley-Dickson space for structural analysis.
Parameters:
data: Input numerical datadimension: Target dimension (16, 32, 64, 128, 256)framework: Algebra framework ("cayley_dickson" or "clifford")
Returns: Transformed representation with structural metadata
detect_patterns
Find conjugation symmetries and zero divisor resonances in transformed data.
Parameters:
transformed_data: Output from chavez_transformpattern_type: "conjugation", "zero_divisor", or "all"
Returns: Detected patterns with confidence scores
compute_high_dimensional
Direct high-dimensional algebra calculations.
Parameters:
operation: "multiply", "add", "conjugate", "norm", "is_zero_divisor"operands: List of hypercomplex numbers (as coefficient arrays)dimension: Dimension of algebra (16, 32, 64, 128, 256)
Returns: Result of computation
analyze_dataset
End-to-end analysis pipeline combining transform, pattern detection, and interpretation.
Parameters:
data: Input datasetdimension: Analysis dimensionanalysis_type: "full", "quick", "custom"
Returns: Complete analysis report with detected structures
illustrate
Generate visualizations of algebraic structures and patterns.
Parameters:
visualization_type: "zero_divisor_network", "pattern_heatmap", "e8_mandala", "dimension_comparison"data: Optional data for visualization context
Returns: Image or structured visualization data
zdtp_transmit
Zero Divisor Transmission Protocol - transmit 16D data through verified mathematical gateways to 32D and 64D spaces with convergence analysis.
Parameters:
input_16d: 16-element coefficient arraygateway: Gateway to use:"S1"- Master Gateway: (e₁ + e₁₄) × (e₃ + e₁₂) = 0"S2"- Multi-Modal Gateway: (e₃ + e₁₂) × (e₅ + e₁₀) = 0"S3A"- Discontinuous Gateway: (e₄ + e₁₁) × (e₆ + e₉) = 0"S3B"- Conjugate Pair Gateway: (e₁ - e₁₄) × (e₃ - e₁₂) = 0"S4"- Linear Gateway: (e₁ - e₁₄) × (e₅ + e₁₀) = 0"S5"- Transformation Gateway: (e₂ - e₁₃) × (e₆ + e₉) = 0"all"- Full cascade through all 6 gateways with convergence scoring
Returns:
- Dimensional states (16D → 32D → 64D lossless transmission)
- Zero divisor verification status
- Convergence score (for "all"): 0.0-1.0 measuring structural stability
- >0.8: High convergence - robust structure
- 0.5-0.8: Moderate - some variance
- <0.5: Low - structural shift detected
Use Cases:
- Data integrity verification through mathematical structure
- High-dimensional embedding stability analysis
- Detecting structural shifts in time series data
Financial Analysis Tools
The server includes specialized tools for time series and financial data analysis:
load_market_data
Load and validate financial time series data from CSV, Excel, or JSON files.
Features:
- Auto-detects OHLCV columns (flexible naming: "Close"/"close"/"CLOSE"/"price")
- Data quality validation and cleaning
- Large file handling (>1GB via chunked reading)
- Date range filtering
- Multi-symbol support
market_indicators
Calculate technical indicators with signal interpretation.
Available indicators:
- Momentum: RSI, MACD, Stochastic Oscillator
- Trend: SMA, EMA, ADX, Ichimoku Cloud
- Volatility: Bollinger Bands, ATR
- Volume: OBV, VWAP
Terminology levels:
technical: Full mathematical notationstandard: Industry terminologysimple: Plain English explanations
regime_detection
Dual-method regime analysis combining statistical and structural approaches.
Two independent methods:
- Statistical baseline: Hidden Markov Models (HMM) for momentum-based regime classification
- Mathematical structure: Chavez Transform analysis in 32D sedenion space
Output includes:
- Regime classification (bull/bear/sideways) from both methods
- Conjugation symmetry (structural stability measure)
- Zero divisor count (bifurcation risk indicator)
- Agreement score between methods
- Confidence assessment
- Actionable interpretation
When methods agree: High confidence in regime classification When methods disagree: Potential regime transition warning
batch_analyze_market
Smart sampling strategy for GB-scale datasets.
Process:
- Sample ~5000 points for quick analysis
- Calculate confidence score
- If confidence > 70%, identify suspicious periods
- Deep dive on flagged periods only
Analysis types:
- Regime detection
- Pattern discovery
- Anomaly detection
Usage Examples
Mathematical Research
# Find zero divisors in 32D pathion algebra
result = compute_high_dimensional(
operation="multiply",
operands=[
[0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, ...], # e_1 + e_10
[0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, ...] # e_4 - e_15
],
dimension=32
)
# Check if norm ≈ 0 for zero divisor verification
Pattern Detection in Data
"Apply Chavez Transform to this dataset in 32D and detect conjugation patterns"
"Analyze this high-dimensional embedding for structural instabilities"
"Find zero divisor resonances in this time series"
Financial Analysis
"Load bitcoin_daily.csv and run dual-method regime detection"
"Calculate RSI and MACD with technical terminology"
"Batch analyze this 5GB tick data file for anomalies"
For AGI Researchers
If you're working on:
- High-dimensional embedding spaces: Explore algebraic structure beyond Euclidean/Hilbert spaces
- Pattern emergence: Study how zero divisors create branching structures in representations
- Neural architecture design: Investigate non-associative operations for context-dependent computation
- Time series modeling: Use structural stability measures alongside statistical methods
- Representation learning: Test whether "pathological" algebras offer benefits for certain data types
Research Collaboration
Interested in applying these tools to AGI research? Contact Paul Chavez at iknowpi@gmail.com for:
- Research access and collaboration
- Custom tool development
- Mathematical consultation
- Data analysis support
Technical Details
Numerical Precision
- Zero divisor threshold: |P × Q| < 1e-10
- Typical verified patterns: norm < 1e-13
- Uses Python's
hypercomplexlibrary for stable computation
Supported Dimensions
- 16D (Sedenions): 84 base zero divisor patterns
- 32D (Pathions): 460 base patterns
- 64D, 128D, 256D: Pattern catalogs under active research
Pattern Classes (32D)
- Within-block patterns: Inherited from 16D structure (84 base per block)
- Cross-block patterns: Terms span different 16D blocks (132 base)
- Constant-offset patterns: Same offset k for both terms (126 base)
- Variable-offset patterns: Different offsets k1, k2 (216 base)
Known Issues
- Large file processing (>10GB) may require manual chunking for optimal memory usage.
Contact
Research Collaboration: paul@chavezailabs.com GitHub: https://github.com/pchavez2029/cailculator-mcp General Inquiries: iknowpi@gmail.com
Chavez AI Labs - "Better math, less suffering"
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 cailculator_mcp-1.4.0.tar.gz.
File metadata
- Download URL: cailculator_mcp-1.4.0.tar.gz
- Upload date:
- Size: 94.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a447971e5037d4a79852dc28ff87290ebfae6c64fd7735aafe728dfb728cf1bd
|
|
| MD5 |
c5b37899203a0f2b96372da8a9ac40a2
|
|
| BLAKE2b-256 |
0c818dab9abfa1830c12d9a463d4d2702dff65cfb0a85aa64f0b2f537717ae50
|
File details
Details for the file cailculator_mcp-1.4.0-py3-none-any.whl.
File metadata
- Download URL: cailculator_mcp-1.4.0-py3-none-any.whl
- Upload date:
- Size: 94.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5ccb5dde8ae85726ecb1c58be107589f6ae6adc180de5818f455e66a74e748f
|
|
| MD5 |
e4ff622e8161095b6f26cefa5051a265
|
|
| BLAKE2b-256 |
228f5205379a2d041336edf70d7bea2601c2379240df1a6fceeb82e2e62071bc
|