Codecalc logo

Codecalc

Run code in 31 languages, evaluate symbolic math, check logic, manage sessions, and measure complexity through MCP.

Install Codecalc

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "codecalc": {
      "command": "uvx",
      "args": [
        "codecalc"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Install not yet sandbox-tested— the server itself is confirmed live (we called its tools/list endpoint). The stdio install command is a separate, ongoing check.

Overview

codecalc MCP server gives AI agents local tools for executing code in 31 languages, evaluating symbolic mathematics, checking SMT logic, and analyzing complexity. It exposes both one-shot and streaming execution, persistent sessions with files and snapshots, background runs, package installation, unit conversion, matrix operations, and runtime inspection. Reach for codecalc when an agent needs locally measured results, reproducible execution, or structured evidence instead of guessed calculations. It is self-hosted and offline-oriented, with network access limited to tools and execution paths that explicitly need it.

Use cases

  • Run short programs in a selected language
  • Check symbolic formulas and SMT constraints
  • Trace branches and inspect execution state
  • Benchmark code at increasing input sizes
  • Preserve files and state across coding sessions

Key features

  • 31-language code execution
  • Stateful sessions with snapshots
  • Symbolic math and matrix operations
  • SMT logic and truth-table analysis
  • Streaming and background execution
  • Complexity analysis and benchmarking

Tools51

What Codecalc lets your agent do. Expand a tool for its parameters.

Verified live~16.3k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 1d ago

Recent health check succeeded.

8/8 checks healthy over the last 47d

What it can do

From the 51 tools this server returned when we ran it; 51 declare their own safety hints.

Runs commands · 10Can delete or modify data · 8Writes files · 1Handles credentials · 1Makes network requests · 14Read-only tools · 37
Network at startup2 connections
Files written at startup18

Observed 2026-10-24 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 6d ago via OSV.dev · codecalc (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars5Stargazers on the source repository.
Last commit1d agoMost recent push to the default branch.
Tools exposed51Callable tools this server registers over MCP.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How Codecalc works

What codecalc does

codecalc provides an MCP interface for code execution, calculation, logic checking, and runtime management. Its execution surface covers 31 languages and reports standard process results such as output, errors, exit status, duration, CPU time, memory use, and a verdict. Language discovery separates whether a command resolves on the host from codecalc's own reliability tier, so an installed runtime can still be classified as best-effort or unvalidated.

The calculation tools cover symbolic expressions, derivatives, integrals, series, matrices, unit conversions, Boolean truth tables, and SMT-LIB2 satisfiability checks. Separate analysis tools estimate Big-O structurally or benchmark code by running it at increasing integer input sizes. Other tools compare equivalent snippets across languages and inspect available runtime updates.

How it works

One-shot programs run through execute_code; execute_code_stream sends progress and partial output while a longer run proceeds. run_submit creates a background run that can be polled or cancelled, while session_start creates a persistent workspace. Python and Node sessions preserve interpreter state between calls; other languages receive a persistent directory. Files can be written, read, listed, deleted, and separated into artifacts created by executed code.

Session snapshots archive workspace files outside the workspace and can restore them into a new or replaced session. They do not preserve Python or Node variables. Session runs can execute a multi-file entry point and return small generated artifacts as additional content blocks.

Execution applies resource limits and returns disclosures when requested guarantees were not enforced. On supported Linux setups, the no-network restriction uses seccomp-bpf; other platforms may provide a best-effort restriction. Strict isolation is an opt-in boundary using gVisor and Docker on Linux or AppContainer on Windows.

Setup and configuration

The quickest installation path is uvx 'codecalc[full]'. The setup --write command detects supported MCP clients, merges a codecalc entry into the existing configuration, backs up the original file, and runs execution and expression canaries. Named clients include Claude Desktop, Claude Code, Cursor, VS Code, and Zed.

The base package supplies the MCP surface and sandbox executor. The full extra adds the symbolic-math and Z3 components. A source installation can use uv sync --all-extras or an editable package install, then build the Rust executor with Cargo. Without that build, codecalc uses its pure-Python fallback.

Tools and capabilities

  • Execute code synchronously, with streaming output or background submission.
  • Run stateful sessions with workspace files, artifacts, snapshots, and spill files for oversized output.
  • Install language packages through supported package managers after caller confirmation.
  • Evaluate symbolic math, matrices, units, Boolean expressions, and SMT-LIB2 constraints.
  • Trace Python execution, inspect branch reachability, estimate complexity, and benchmark growth.
  • Discover languages and execution providers, inspect runtime versions, and perform confirmed updates.

Limitations and notes

Package installation and runtime updates use network access; installation runs outside the sandbox and may execute package-manager hooks with the server user's filesystem access. Code execution can also use networking unless no_net is requested and enforced. Dependency installation has a separate time budget and can be refused by policy, while explicit output caps prevent oversized responses; session runs can spill fuller output into workspace files.

The local provider cannot stop a run after it starts, so background jobs should be bounded with their timeout. Trace results describe the traced program's behavior and are not an independent attestation. Branch reachability supports a restricted Python subset and refuses constructs outside that model. The threat model targets a single local operator rather than multi-tenant or network-exposed hosting.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Codecalc

codecalc is an MCP server that connects AI agents to local language runtimes, symbolic mathematics, and logic solvers. Its main tools execute code, manage persistent sessions, evaluate expressions, check SMT-LIB2 constraints, analyze complexity, benchmark programs, and convert units across a self-hosted MCP connection.

Install it with `uvx 'codecalc[full]'` or `pip install 'codecalc[full]'`. Run `uvx 'codecalc[full]' setup --write` to merge its configuration into a detected Claude Desktop, Claude Code, Cursor, VS Code, or Zed setup. Building from source also requires the Rust executor for the native backend.

Yes, codecalc supports Cursor configuration through its setup command. Use `uvx 'codecalc[full]' setup --client=cursor` when automatic detection is unavailable or ambiguous, or use `--write` to merge the generated server entry into the client configuration.

Call `session_start` to receive a session ID, then pass that ID to `execute_code` for repeated execution. Python and Node retain interpreter variables and imports between calls; other languages retain files in a workspace. Use `session_stop` to terminate the session and remove its workspace.

Yes, codecalc can install packages through `install_package` or execution dependencies, but installation requires caller confirmation and network access. Dependencies for supported execution paths are installed before the sandboxed program, while the standalone installer runs as a direct server subprocess and is not sandboxed.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewCodecalc AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/codecalc?style=directory)](https://allmcps.com/mcp/codecalc)
HTML Embed
<a href="https://allmcps.com/mcp/codecalc"><img src="https://allmcps.com/api/badge/codecalc?style=directory" alt="Codecalc on AllMCPs" /></a>