# mathguard MCP server

> Verifies mathematical claims, derivations, and calculus solutions from language models using symbolic computation and unit analysis.

- Repository: https://github.com/C0MaE/mathguard
- Page: https://hostedmcp.org/servers/c0mae/mathguard
- Transport: stdio
- Stars: 1
- License: MIT
- Latest version: 0.4.0

## Install

### Claude Code

```sh
claude mcp add mathguard -- uvx mathguard
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "mathguard": {
      "command": "uvx",
      "args": [
        "mathguard"
      ]
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "mathguard": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "mathguard"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"mathguard","type":"stdio","command":"uvx","args":["mathguard"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "mathguard": {
      "command": "uvx",
      "args": [
        "mathguard"
      ]
    }
  }
}
```

### Codex

```sh
codex mcp add mathguard -- uvx mathguard
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.mathguard]
command = "uvx"
args = ["mathguard"]
```

### Gemini CLI

```sh
gemini mcp add -s user mathguard uvx -- mathguard
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "mathguard": {
      "command": "uvx",
      "args": [
        "mathguard"
      ]
    }
  }
}
```

## FAQ

### How does it handle worked solutions in Markdown or LaTeX?

It can parse complete worked solutions to find the specific step where a calculation or derivation goes wrong.

### Can it grade model answers against a reference?

Yes, it can grade answers by comparing formulas symbolically and numbers with unit conversion and rounding.
