brainycalc
v1.0.11
Published
Accurate MCP Math Server :The trusted computational backend for AI agents
Maintainers
Readme
brainycalc
The trusted computational backend for AI agents.
BrainyCalc is a Model Context Protocol (MCP) math server that gives LLMs and AI agents accurate, independently verified, and reproducible mathematical results — with full auditability.
Instead of letting an LLM estimate mathematical or scientific answers, the AI sends computations to BrainyCalc, which handles the heavy lifting with precision and verification.
| Metric | Value | |---|---| | Reproducibility | 100% — same input, same output | | Error bound | ±10⁻¹⁵ per computation | | Verification | 6-step check on every result | | Audit trail | Full cryptographic proof |
Quick Start
Add the following to your MCP configuration file:
{
"mcpServers": {
"brainycalc": {
"command": "npx",
"args": ["-y", "brainycalc"]
}
}
}Available Tools
BrainyCalc exposes 100+ tools across four categories.
Mathematics (math_*)
| Tool | Description |
|---|---|
| math_evaluate | Safely evaluate an arithmetic expression string |
| math_percentage | Percentage of, percentage change, percentage difference |
| math_statistics | Mean, median, mode, std dev, variance for a dataset |
| math_quadratic | Solve ax² + bx + c = 0 (real and complex roots) |
| math_gcd_lcm | Greatest Common Divisor and Least Common Multiple |
| math_prime_factors | Prime factorization and primality check |
| math_power_root | Powers and nth roots |
| math_permutations_combinations | Factorial, nPr (permutations), nCr (combinations) |
| math_simplify_fraction | Reduce fraction to lowest terms, convert to mixed number |
| math_geometry | Area, perimeter, volume for circle, rectangle, triangle, sphere, cylinder |
| math_trigonometry | sin, cos, tan, asin, acos, atan (degrees or radians) |
| math_logarithm | Logarithm with any base |
Unit Conversion (convert_*)
80+ converters spanning every major physical quantity:
- Everyday: length, mass, volume, temperature, speed, area, time
- Electrical: voltage, current, resistance, capacitance, inductance, charge, conductance, resistivity, field strength
- Mechanics: force, pressure, energy, power, torque, acceleration, momentum, density, flow rate
- Thermodynamics: heat flux, thermal conductivity, specific heat capacity, thermal expansion
- Optics & Radiation: illumination, luminance, luminous intensity, wavelength ↔ frequency, radiation dose, radiation exposure
- Data: storage (bits to petabytes), transfer rates, image resolution
- Chemistry: molar/solution concentration, viscosity (dynamic & kinematic)
- Engineering: angular velocity, angular acceleration, moment of inertia, surface tension
- Specialist: typography (pt/px/em), number base (binary, hex, octal), SI prefix scaling
Fitness & Health (fitness_*)
| Tool | Description |
|---|---|
| fitness_bmi | Body Mass Index with WHO category |
| fitness_bmr | Basal Metabolic Rate (Mifflin-St Jeor or Harris-Benedict) |
| fitness_tdee | Total Daily Energy Expenditure from BMR + activity level |
| fitness_body_fat | US Navy body fat percentage formula |
| fitness_ideal_weight | Ideal body weight (multiple formulas) |
| fitness_macros | Macronutrient targets from calorie goal |
| fitness_target_heart_rate | Target heart rate zones by age and intensity |
| fitness_water_intake | Daily water intake recommendation |
Date & Time (datetime_* / calc_*)
| Tool | Description |
|---|---|
| datetime_difference / calc_date_diff | Days, hours, minutes between two dates |
| datetime_add_subtract / calc_time_add | Add or subtract time from a date |
| datetime_calculate_age / calc_age | Precise age from date of birth |
| datetime_day_of_week / calc_day_of_week | Day name for any date |
| datetime_work_days | Working days between two dates |
| datetime_unix_timestamp | Convert between ISO dates and Unix timestamps |
| calc_hours_between | Hours and minutes between two times |
| calc_time_duration | Duration formatting |
| calc_world_time / calc_local_time | Time zone conversions |
| calc_day_counter | Count days to/from a target date |
| calc_due_date | Estimated due date calculator |
| calc_pregnancy | Pregnancy week and trimester from LMP |
| calc_ovulation | Ovulation and fertility window |
| calc_period | Menstrual cycle tracking |
Why BrainyCalc?
LLMs are powerful reasoners but unreliable calculators. Floating-point arithmetic, unit conversion chains, and multi-step statistical computations are common sources of silent errors in AI-generated answers. BrainyCalc offloads these to a deterministic engine that:
- Never estimates — uses reliable numerical or symbolic methods
- Verifies independently — a second pass catches instabilities before results reach your agent
- Is fully reproducible — same input always produces same output; non-determinism is eliminated
- Reports confidence — every result includes a confidence score and error bound
- Records provenance — engine version, method, and parameters are captured with each result
- Maintains an audit trail — fingerprinted results can be inspected or reproduced at any time
This makes BrainyCalc suitable for use cases where accuracy is non-negotiable: healthcare calculations, financial modelling, engineering, scientific research, legal and compliance workflows.
Integration
BrainyCalc speaks standard MCP over JSON-RPC stdio, so it works with any MCP-compatible platform:
- Claude Desktop (Anthropic)
- LangChain agents
- Custom SDK implementations
- Self-hosted or cluster deployments (locally runnable for lower latency)
Tool schemas are automatically exposed via the MCP tools/list endpoint — no manual wiring required.
Requirements
- Node.js ≥ 18
- npm ≥ 7
License
MIT
Links
- Homepage: brainycalc.com
- How it works: brainycalc.com/#how-it-works
- Use cases: brainycalc.com/#usecases
