kmath-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Citadel-Math (citadel_math_core / kmath-mcp)
Deterministic Mathematical Proof Kernel, Dimensional Analysis Shield, and Physics/Engineering MCP Server.
Deterministik Matematiksel İspat Çekirdeği, $\mathbb{Z}^7$ Boyut Analizi Kalkanı ve Fizik/Mühendislik MCP Sunucusu.
Why Citadel-Math? / Neden Citadel-Math?
Large Language Models hallucinate units, drop denominator domain guards, confuse classical/relativistic regimes, and leak IEEE-754 rounding errors into engineering safety factors.
Citadel-Math (kmath-mcp) gives AI coding agents (Claude, Cursor, Windsurf, Antigravity) and human engineers a pure-Rust (#![forbid(unsafe_code)]) + Python deterministic verification oracle backed by curated NIST CODATA constants, SI dimensional lattice proofs, and an executable physics engine.
Büyük Dil Modelleri (LLM) formül türetirken sıklıkla birim hatası yapar, payda sıfır koşullarını atlar ve kayan nokta yuvarlama hatalarını güvenlik katsayılarına sızdırır. Citadel-Math, yapay zekâ ajanlarına olasılıksal tahmin yerine mikrosaniye hızında deterministik ispat ve simülasyon araçları sunar.
Related MCP server: SciMath MCP
Core Architecture / Temel Mimari
.
├── AGENTS.md # 7 Constitutional Invariants (Boyutsal Mutlaklık, Termodinamik & SSOT kuralları)
├── kmath.py # Zero-tolerance Engineering Audit Cockpit (10 Python + Rust CLI)
├── kmath_mcp.py # 15-Tool Model Context Protocol (MCP) Server for LLM Agents
├── icat_motoru.py # Symbolic Physics Synthesis & CLI Runner
├── mcp_config.example.json # Portable MCP client configuration example
├── citadel_math_core/ # Pure-Rust (#![forbid(unsafe_code)]) Engine & Native Binary
│ └── src/
│ ├── proof_kernel.rs # Z[x] & MultiPolyZ (grevlex) algebraic equivalence + GuardedPoly domain guards
│ ├── interval.rs # IEEE 1788-2015 outward-rounded Interval64 + Dual64 automatic differentiation
│ ├── dimensions.rs # Z^7 SI Dimensional Shield & ScaledUnit converter
│ ├── buckingham.rs # Exact rational/integer Z^7 nullspace Buckingham-Pi discovery
│ ├── pareto.rs # Exact Skyline & NSGA-II multi-objective Pareto optimizer
│ ├── graph.rs # SSOT canonical hypergraph (214 laws, 544 inverse laws, 18 physical regimes)
│ ├── simulator.rs # RK4 & adaptive Dormand-Prince RK4(5) trajectory integrator + USSA-1976 atmosphere
│ ├── astrodynamics.rs # WGS84 J2 orbital precession & universal-variable Lambert solver
│ ├── materials.rs # 30 aerospace/UHTC/TPS materials, NASA SP-8007 buckling & PICA-X ablation
│ ├── cad.rs # 2D parametric CAD, Steiner/moment of inertia, Euler buckling & R12 DXF/SVG
│ ├── designer.rs # Closed-loop inverse vehicle design engine
│ ├── codegen.rs # Verified zero-panic Result<f64, &'static str> Rust function generator
│ └── physical_bounds.rs # Thermodynamics 1st/2nd law (Carnot), v < c causality & momentum pruning
├── engine/ # Python symbolic AST, SymPy parity, harvester, RK4 & knowledge graph modules
├── database/
│ ├── canonical_laws.json # 214 verified physics/system equations across 18 regimes
│ ├── ONTOLOGY.json # 353 unique SI symbol-dimension definitions (SSOT)
│ └── materials.json # 30 certified structural & thermal protection materials
└── data/
└── nist_constants.json # Official NIST CODATA 2022 fundamental constantsQuick Start / Hızlı Kurulum
1. Build the Pure-Rust Core / Rust Çekirdeğini Derleyin
cargo build --release --manifest-path citadel_math_core/Cargo.toml2. Install Python Dependencies / Python Bağımlılıklarını Yükleyin
pip install -r requirements.txt3. Verify All 26 Audit Gates / Tüm Denetim Kapılarını Doğrulayın
python kmath.py auditAnd run the standalone native Rust audit (16 mathematical & physical gates, ~14 ms):
./citadel_math_core/target/release/citadel_math_core audit4. Connect as an MCP Server / MCP Sunucusu Olarak Bağlayın
Copy mcp_config.example.json into your MCP client configuration (updating the path to kmath_mcp.py if needed):
{
"mcpServers": {
"kmath": {
"command": "python",
"args": ["./kmath_mcp.py"],
"env": {
"OPENBLAS_NUM_THREADS": "1",
"PYTHONUNBUFFERED": "1"
}
}
}
}15 Deterministic MCP Tools (kmath_mcp.py)
Tool | Function |
| Runs the Python (10-gate) & Rust (16-gate) constitutional integrity audits. |
| Verifies $\mathbb{Z}^7$ SI dimensional homogeneity ( |
| Proves polynomial/rational algebraic equivalence ( |
| Evaluates expressions using IEEE 1788-2015 outward-rounded |
| Fetches certified NIST CODATA 2022 fundamental constants and exact SI definitions. |
| Queries and ranks 30 structural, cryogenic, UHTC, and ablative TPS materials. |
| Checks cylindrical shell Von Mises stress, NASA SP-8007 buckling, and aerothermal TPS survival. |
| Runs 4th-order Runge-Kutta (RK4) trajectory integration with USSA-1976 7-layer atmosphere. |
| Symbolically solves canonical equations with automated SymPy/AST validation. |
| Synthesizes new valid formulas across the canonical AND-OR hypergraph with regime pruning. |
| Runs closed-loop parametric sweeps returning verified Pareto-optimal aerospace designs. |
| Prunes violations of 1st/2nd Thermodynamics Laws (Carnot), $v < c$, and momentum conservation. |
| Validates variable compatibility across 18 physical validity regimes ( |
| Computes exact integer $\mathbb{Z}^7$ nullspace dimensionless $\Pi$-groups. |
| Computes exact Pareto Skyline ( |
CLI Usage / Komut Satırı Kullanımı
python kmath.py audit # Run 10-gate Python + SSOT engineering audit
python kmath.py rust audit # Run 16-gate pure-Rust proof & simulation audit
python kmath.py simulate compare # Compare Chemical vs. Beamed Laser vs. Kinetic launch trajectories
python kmath.py materials # Rank certified aerospace/TPS materials by breaking length & strength
python kmath.py stress # Check cylindrical shell stress & heat flux limits
python kmath.py stats # Show ontology, canonical law, and staging harvest metricsVerification Summary / Doğrulama Özeti
Python Audit (
python kmath.py audit):10/10 PASS(214canonical laws,353ontology symbols,18physical regimes,30materials).Rust Audit (
citadel_math_core audit):16/16 PASS(#![forbid(unsafe_code)],214SSOT AST laws +544inverse laws, IEEE 1788-2015 outward-rounded intervals, Buckingham-$\Pi$, NSGA-II Skyline, 2D CAD R12 DXF/SVG).
License / Lisans
Citadel-Math Source-Available License (Read & Run Permitted — All Modification & Derivative Rights Reserved).
İnceleme, derleme ve olduğu gibi çalıştırma serbesttir; kaynak kodunu değiştirme, türev eser üretme ve değiştirilmiş sürüm dağıtma haklarının tamamı saklıdır (Tüm Değiştirme Hakları Saklıdır). — see LICENSE for details.
Copyright © 2026 Mekserina Karaosmanoğlu. All Modification Rights Reserved.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
AI-callable calculators and engineering models with real formulas. No hallucinated math.
Exact fraction math for AI agents. No floating-point drift. CODATA 2022 constants and units.
Exact arithmetic, algebra, calculus, physics, chemistry and finance with a checkable formula.
Deterministic reasoning stack for AI agents: simulate, decide & compute, plus cross-domain tools.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceVerified unit conversion and dimensional analysis for AI agents. 190+ units, 31 domain formulas (clinical, physics, aerospace, SRE), physical constants with uncertainty propagation. Refuses invalid conversions structurally: the tool that won't convert mg to mL and knows the difference between torque and energy.AGPL 3.0
- AlicenseAqualityCmaintenanceEnables reliable engineering and scientific computation through tools for exact arithmetic, unit-aware formulas, calculus, linear algebra, statistics, uncertainty propagation, and physical constants, all executed safely in reproducible subprocesses.8MIT
- AlicenseNot gradedqualityDmaintenanceProvides deterministic tools for symbolic math, equation solving, relation verification, reasoning structure audits, and validated CAD primitives, returning evidence artifacts for every result.MIT
- AlicenseNot gradedqualityBmaintenanceProvides exact, deterministic tools for math, dates, units, validation, and more to AI agents, returning precise answers with explicit assumptions and warnings instead of model guesses.MIT