Agentโ™ฅ๏ธŽAge
Catalog

Calculator

Official

by slettmayer ยท Python

Exact arithmetic: one calculator tool over an AST allowlist, with integers exact at any size.

io.github.slettmayer/calc-mcp-server (MCP Server)

This MCP server provides exact arithmetic via a single calculator tool that operates on an Abstract Syntax Tree (AST). It uses an allowlist for AST nodes, ensuring only permitted structures are processed. Integer arithmetic is exact at any size, rather than relying on fixed-width numeric types.

๐Ÿ› ๏ธ Key Features

  • One calculator tool
  • AST-based evaluation
  • AST allowlist enforcement
  • Exact integer arithmetic for any size

๐Ÿš€ Use Cases

  • Performing exact calculations on integers beyond standard integer limits
  • Evaluating arithmetic expressions safely by restricting AST shapes

โšก Developer Benefits

  • Deterministic, exact results for integer math
  • Reduced risk from unexpected expression structures via AST allowlisting

โš ๏ธ Limitations

  • Limited to a single calculator tool
  • Only expressions representable within the AST allowlist are supported
Calculator - agentage MCP Catalog