# codecalc

Local calculator and execution engine giving AI agents access to 31 programming languages, symbolic math, and SMT logic verification without cloud calls.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 5
- Author: The-40-Thieves
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/The-40-Thieves/codecalc
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/mcp/codecalc

## What it does

codecalc gives coding agents a local environment to verify assertions directly. It exposes 51 tools designed for exact rational arithmetic, formal SMT checks with Z3, algorithmic complexity estimation, and script execution across 31 runtime environments. It runs locally without telemetry or API keys.

The server features dedicated equivalence verifiers. Calls like `verify_translation` and `verify_optimization` check whether rewritten logic matches original behavior across languages or refactors. Execution relies on an `rlimit` sandbox by default, with opt-in isolation through gVisor containers on Linux or AppContainer on Windows.

Its threat model targets a single developer on a local stdio connection; it will not fit multi-tenant infrastructure.

## Requirements
- Needs: Python and uv (commands run via uvx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add codecalc -- uvx codecalc
```
uvx runs the command named after the package; if the README names another one, use uvx --from codecalc <command>

### Codex

**Platform CLI**
```bash
codex mcp add codecalc -- uvx codecalc
```
uvx runs the command named after the package; if the README names another one, use uvx --from codecalc <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "codecalc": {
            "command": "uvx",
            "args": [
                "codecalc"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from codecalc <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "codecalc": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "codecalc"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from codecalc <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add codecalc uvx codecalc
```
uvx runs the command named after the package; if the README names another one, use uvx --from codecalc <command>

## When to use it
- verify that refactored code preserves identical behavior
- solve formal logic propositions with the Z3 SMT solver
- measure runtime algorithmic complexity without guessing Big-O notation
- execute untrusted scripts locally in an isolated sandbox

## Example prompts
- Check if my optimized Rust implementation behaves identically to the Python prototype
- Solve this set of logic constraints using the `z3_check` tool
- Calculate the exact symbolic derivative for this mathematical equation

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 392262
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33989
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81163
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119231
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47577
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43902

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
