Sponsored by Deepsite.site

Vibe Math Mcp

Created By
apetta2 months ago
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.
Content

Vibe Math MCP

PyPI version Python Version License: MIT Smithery Test Coverage Tests

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

Installation

IDEs

Install in VS Code

Install MCP Server

Claude Desktop

Open Settings > Developer > Edit Config and add:

For published package:

{
  "mcpServers": {
    "Math": {
      "command": "uvx",
      "args": ["vibe-math-mcp"]
    }
  }
}

For local development:

{
  "mcpServers": {
    "Math": {
      "command": "uv",
      "args": [
        "--directory",
        "/absolute/path/to/vibe-math-mcp",
        "run",
        "vibe-math-mcp"
      ]
    }
  }
}

Claude Code

Quick setup (CLI):

Published package:

claude mcp add --transport stdio math -- uvx vibe-math-mcp

Local development:

claude mcp add --transport stdio math -- uvx --from /absolute/path/to/vibe-math-mcp vibe-math-mcp

Team setup (create mcp.json in project root for shared use with Claude Code and/or IDEs)

{
  "mcpServers": {
    "math": {
      "command": "uvx",
      "args": ["vibe-math-mcp"]
    }
  }
}

Verify: Run claude mcp list or use /mcp or view available servers in IDEs.

Try it

  • "Calculate 15% of 250" → uses percentage
  • "Find determinant of [[1,2],[3,4]]" → uses matrix_operations
  • "Integrate x^2 from 0 to 1" → uses integral
  • "If I invest $1000 at 5% annual interest compounded monthly for 10 years, what will be the future value?" → uses compound_interest
  • If I was paid the square root of $69m in 10 years, what's the present value at 7% discount rate? → uses batch_execute (calculate -> financial_calcs)

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

License

MIT License. See LICENSE file for details.

Contributing

Contributions welcome via PRs! Please ensure:

  1. Tests pass, and new ones are added if applicable
  2. Code is linted & formatted
  3. Type hints are included
  4. Clear, actionable error messages are provided

Support

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

Server Config

{
  "mcpServers": {
    "Math": {
      "command": "uvx",
      "args": [
        "vibe-math-mcp"
      ]
    }
  }
}
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Serper MCP ServerA Serper MCP Server
Tavily Mcp
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
DeepChatYour AI Partner on Desktop
CursorThe AI Code Editor
ChatWiseThe second fastest AI chatbot™
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Amap Maps高德地图官方 MCP Server
Playwright McpPlaywright MCP server
WindsurfThe new purpose-built IDE to harness magic