Labsco
apetta logo

Vibe Math MCP

β˜… 5

from apetta

A high-performance Model Context Protocol (MCP) server for math-ing whilst vibing with LLMs. Built with Polars, Pandas, NumPy, SciPy, and SymPy for optimal calculation speed and comprehensive mathematical capabilities from basic arithmetic to advanced calculus and linear algebra.

πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedFreeQuick setup

Vibe Math MCP

Smithery

A high-performance Model Context Protocol (MCP) server for math-ing whilst vibing with LLMs. Built with Polars, Pandas, NumPy, SciPy, and SymPy for optimal calculation speed and comprehensive mathematical capabilities from basic arithmetic to advanced calculus and linear algebra.

Features

21 Mathematical Tools across 6 domains + batch orchestration:

  • Basic Calculations (4 tools): Expression evaluation, percentages, rounding, unit conversion
  • Array Operations (4 tools): Element-wise operations, statistics, aggregations, transformations
  • Statistics (3 tools): Descriptive statistics, pivot tables, correlations
  • Financial Mathematics (3 tools): Time value of money, compound interest, perpetuity
  • Linear Algebra (3 tools): Matrix operations, system solving, decompositions
  • Calculus (3 tools): Derivatives, integrals, limits & series
  • Batch Execution (1 tool): Multi-tool orchestration for complex workflows

Output Control

All tools automatically support output control for maximum flexibility and token efficiency. The LLM can specify the desired verbosity.

Control response verbosity using the output_mode parameter (available on every tool):

ModeDescriptionToken SavingsUse Case
fullComplete response with all metadata (default)0% (baseline)Debugging, full context needed
compactRemove null fields, minimize whitespace~20-30%Moderate reduction, preserve structure
minimalPrimary value(s) only, strip metadata~60-70%Fast extraction, minimal context
valueNormalized {value: X} structure~70-80%Consistent chaining, maximum simplicity
finalFor sequential chains, return only terminal result~95%Simple calculations, predictable extraction

Batch Execution

For multi-step workflows, batch_execute chains multiple calculations in a single requestβ€”achieving 90-95% token reduction. Reference prior outputs using $operation_id.result syntax, and the engine automatically handles dependency resolution and parallel execution for speed.

Perfect for: Bond pricing, financial models, statistical pipelines, complex transformations

Complete Tool Reference

Note: All tool parameters include detailed descriptions with concrete examples directly in the MCP interface. Each parameter shows expected format, use cases, and sample values to make usage obvious without referring to external documentation.

Basic Calculations

ToolDescription
calculateEvaluate mathematical expressions with variable substitution
percentagePercentage calculations (of, increase, decrease, change)
roundAdvanced rounding (round, floor, ceil, trunc)
convert_unitsUnit conversions (degrees οΏ½ radians)

Array Operations

ToolDescription
array_operationsElement-wise operations (add, subtract, multiply, divide, power)
array_statisticsStatistical measures (mean, median, std, min, max, sum)
array_aggregateAggregations (sumproduct, weighted average, dot product)
array_transformTransformations (normalise, standardise, scale, log)

Statistics

ToolDescription
statisticsComprehensive analysis (describe, quartiles, outliers)
pivot_tableCreate pivot tables with aggregation
correlationCorrelation matrices (Pearson, Spearman)

Financial Mathematics

ToolDescription
financial_calcsTime value of money (PV, FV, PMT, IRR, NPV)
compound_interestCompound interest with various frequencies

Linear Algebra

ToolDescription
matrix_operationsMatrix operations (multiply, inverse, transpose, determinant, trace)
solve_linear_systemSolve Ax = b systems
matrix_decompositionDecompositions (eigen, SVD, QR, Cholesky, LU)

Calculus

ToolDescription
derivativeSymbolic and numerical differentiation
integralSymbolic and numerical integration
limits_seriesLimits and series expansions


## Development

### Running Tests

```bash
# Install dependencies
uv sync

# Run all tests
uv run poe test

Local Development Modes

STDIO Mode (default - for Claude Desktop, IDEs):

uv run vibe-math-mcp

HTTP Mode (for container testing):

uv run python -m vibe_math_mcp.http_server

Support

For issues and questions, please open an issue on GitHub.