Cal Server logo

Cal Server

by pwh-pwh

Cal Server is a simple math expression calculation service built on the FastMCP framework, using the Bun runtime environment. It leverages the expr-eval library to parse and calculate user-inputted math expressions via stdio.

View on GitHub

Last updated: N/A

What is Cal Server?

Cal Server is a lightweight and efficient calculation tool that supports basic mathematical operations and built-in constants. It is built using the FastMCP framework and utilizes the Bun runtime environment.

How to use Cal Server?

  1. Install Bun. 2. Clone the repository and install dependencies using bun install. 3. Start the service using bun run index.ts. 4. Input a mathematical expression via stdio, such as 2 + 3 * PI. The service will output the calculated result.

Key features of Cal Server

  • Expression calculation

  • Built-in constants (E, PI, true, false)

  • Uses FastMCP framework

  • Uses expr-eval library for parsing

  • Parameter validation with zod

Use cases of Cal Server

  • Calculating mathematical expressions

  • Integrating a simple calculator into other applications

  • Performing quick calculations from the command line

  • Evaluating expressions with built-in constants

FAQ from Cal Server

What is Cal Server?

Cal Server is a simple math expression calculation service.

What dependencies are required?

fastmcp, expr-eval, and zod are required.

What constants are supported?

E, PI, true, and false are supported.

How do I install Cal Server?

You can install it via Smithery or manually by cloning the repository and running bun install.

How do I start the server?

Run bun run index.ts.