SciMath MCP

SciMath MCP

Enables 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.

Category
Visit Server

README

SciMath MCP

CI Python 3.12+ MCP License: MIT

SciMath is a local, read-only Model Context Protocol server for reliable engineering and scientific computation. It moves arithmetic and mathematical manipulation out of an LLM's reasoning and into established numerical, symbolic, unit, and uncertainty libraries.

It is designed specifically for tool-calling agents—including smaller quantized local models—so the model chooses and explains a calculation while mature libraries execute it reproducibly.

What it provides

  • Exact and arbitrary-precision arithmetic with SymPy.
  • Unit-aware formulas and dimensional validation with Pint.
  • Equations, calculus, and exact linear algebra.
  • Descriptive statistics, regression, confidence intervals, and Welch t-tests.
  • First-order propagation of independent measurement uncertainties.
  • Physical constants from SciPy's bundled CODATA table.
  • Structured MCP output containing exact values, approximations, normalized inputs, metadata, and warnings.

Every expression is parsed by an AST allowlist. Python eval, attribute access, imports, comprehensions, indexing, assignment, and arbitrary function calls are not available. Each calculation runs in a disposable subprocess with input, result-size, complexity, and time limits.

Tools

Tool Purpose
calculate Arithmetic, scientific functions, high precision, and unit-aware formulas
convert_units Compatible unit conversion and dimensional validation
solve Real or complex algebraic equations and systems
calculus Derivatives, integrals, limits, and series
linear_algebra Exact matrix operations plus condition-number warnings
statistics Summaries, correlation, regression, intervals, and Welch t-tests
propagate_uncertainty Measurement uncertainty with optional units
physical_constant CODATA constant lookup with uncertainty and unit conversion

Run locally

Prerequisites: Python 3.12 or newer and uv.

uv sync --all-groups
PYTHONPATH=src uv run python -m scimath_mcp

Install a stable executable:

uv tool install --force /absolute/path/to/scimath-mcp

Then register the same stdio executable in each client:

codex mcp add scimath -- "$HOME/.local/bin/scimath-mcp"
claude mcp add --scope user scimath -- "$HOME/.local/bin/scimath-mcp"
opencode mcp add scimath -- "$HOME/.local/bin/scimath-mcp"

Verify with codex mcp get scimath, claude mcp get scimath, and opencode mcp list. The executable requires no network access. After changing the source, rerun the uv tool install command to refresh the installed wheel.

See Client setup for complete JSON/TOML examples and troubleshooting.

Expression syntax

Use explicit multiplication (2*x). Both ** and ^ mean exponentiation. Common functions include sqrt, cbrt, exp, ln, log, log10, sin, cos, tan, inverse and hyperbolic trigonometry, factorial, gamma, erf, floor, ceil, min, and max. Constants include pi, tau, e, phi, and complex I in unitless calculations.

Put dimensionful values in the variables object:

{
  "expression": "M*c/I",
  "variables": {
    "M": "12.4 kN*m",
    "c": "75 mm",
    "I": "8.7e-6 m^4"
  },
  "output_unit": "MPa"
}

Reliability boundary

SciMath makes the execution of a supplied formula reproducible. It cannot prove that an LLM selected the correct physical model, sign convention, branch, domain, units, or statistical assumptions. Consumers should show normalized inputs and warnings for consequential work.

Documentation

  • Client setup — Codex CLI, Claude Code, and OpenCode.
  • Tool reference — inputs, operations, limits, and examples.
  • Architecture — trust boundaries and request lifecycle.
  • Design notes — reviewed community projects and design decisions.
  • Security — threat model, reporting, and numerical safety.
  • Contributing — development workflow and release checks.

Tests

uv run pytest
uv run ruff check .
uv build --clear

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured