# mathjs [Health: Active]

**Category:** 🧮 Data Science Tools  
**Repository:** https://github.com/pipeworx-io/mcp-mathjs  
**GitHub Stars:** 0  
**npm Downloads (last month):** 438  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/mathjs

## Description
Math.js MCP — wraps the mathjs.org API (free, no auth)

## Tools
Capabilities this server exposes over MCP:

- **evaluate** — Evaluate mathematical expressions: arithmetic, algebra, trigonometry, statistics. Returns computed result. E.g., "2+2", "sin(pi/2)", "sqrt(16)", "mean([1,2,3])". Use when you need to calculate or simplify math.
- **convert_units** — Convert between units: length, weight, temperature, volume, time, etc. Returns converted value. E.g., "5 m to ft", "100 kg to lbs", "32 degF to degC". Use for unit conversions.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "mathjs": {
    "command": "npx",
    "args": ["-y","@pipeworx/mcp-mathjs"]
  }
}
```

## Documentation

## What the mathjs MCP server does

The mathjs MCP server gives an MCP client access to mathematical evaluation and unit conversion. It wraps the mathjs.org API and provides two pack-specific tools: `evaluate` and `convert_units`. No authentication is required for the documented gateway calls, and the package can also run locally without a Pipeworx account.

`evaluate` accepts a mathematical expression and returns the computed result. Supported examples include arithmetic such as `2+2`, trigonometric expressions such as `sin(pi/2)`, square roots such as `sqrt(16)`, and statistical functions such as `mean([1,2,3])`. The tool is intended for calculations and mathematical simplification.

`convert_units` converts values between units, including length, weight, temperature, volume, and time. Example inputs include `5 m to ft`, `100 kg to lbs`, and `32 degF to degC`.

## How it works

The mathjs MCP server supports two connection modes. A remote MCP endpoint is available at `https://gateway.pipeworx.io/mathjs/mcp`. Add that URL to an MCP client to access the pack through the Pipeworx gateway. The same gateway also provides a full endpoint at `https://gateway.pipeworx.io/mcp`.

The pack-specific gateway endpoint lists the two mathjs tools along with shared Pipeworx meta-tools. Those shared tools can route requests across the broader catalog, so the tool count shown by `tools/list` is higher than the two tools documented here. The connection's `initialize` response is the authoritative source for the tools available at a particular time.

For a local connection, run `@pipeworx/mcp-mathjs` with `npx`. This process communicates over standard input and output and responds to MCP `initialize`, `tools/list`, and `tools/call` requests. In this mode, only the mathjs pack tools are exposed; the shared gateway meta-tools are not included.

The tools can also be called over HTTP without using an MCP client. For example, a POST request to `/v1/tools/evaluate` can submit an expression in an `expression` JSON field. Tool details can be inspected through the gateway's HTTP endpoints.

## Setup and configuration

For a gateway connection, configure the MCP client with the remote URL:

```json
{
  "mcpServers": {
    "mathjs": {
      "url": "https://gateway.pipeworx.io/mathjs/mcp"
    }
  }
}
```

For local stdio mode, use:

```json
{
  "mcpServers": {
    "mathjs": {
      "command": "npx",
      "args": ["-y", "@pipeworx/mcp-mathjs"]
    }
  }
}
```

You can verify the local process directly with `npx -y @pipeworx/mcp-mathjs`. Choose the remote mode when gateway routing or HTTP access is useful; choose local mode when you want only the pack's tools and no gateway round trip.

## Tools and capabilities

The mathjs MCP server is a fit for agents that need to calculate values or translate measurements without implementing these operations in prompts or application code. Its documented capabilities are:

- Evaluate arithmetic, algebra, trigonometry, and statistics expressions.
- Return computed results from expressions such as `sqrt(16)` or `mean([1,2,3])`.
- Convert length, weight, temperature, volume, and time units.
- Access the tools through MCP, local stdio, or the documented HTTP interface.

## Limitations and notes

The standalone process does not provide Pipeworx's shared discovery, memory, or cross-catalog routing tools. The gateway endpoint adds those shared tools automatically, and there is currently no documented option to mount the pack endpoint without them. If the additional schemas increase context usage, the README recommends connecting to the full gateway once rather than several pack endpoints.

_Full upstream README: https://allmcps.com/mcp/mathjs/readme_

