Exevalator v2.4 Released — MCP Support Added, Now Usable as an AI Calculation Tool

We've released Exevalator (an open-source expression-evaluation library) v2.4.0!

We just shipped a major update to v2.3 the other day, which added Python support:

Building on that Python port, v2.4 adds support for the MCP protocol, enabling Exevalator to be used as a calculation tool for AI.

Below, we'll cover the details and show practical examples.

- Table of Contents -

What Is Exevalator?

In its original role, Exevalator is a library you embed in your program to evaluate the value of expressions provided as strings. For example:

(1 + 2) * 3
sqrt( sin(1.2) / (cos(3.4) + 1) )

When expressions like these are supplied dynamically at runtime (e.g., via user input), handling them correctly can be trickier than it looks.

Exevalator provides this capability as a library across multiple programming languages so you can integrate it easily. It currently supports seven languages: Java, Rust, C++, C#, VB.NET, TypeScript, and Python, with more to come.

And in this release, beyond language bindings, we've added support for MCP, a protocol for connecting AI to external tools and data.

What Is MCP (Model Context Protocol)?

MCP is a relatively new protocol, so many readers may not have run into it yet.

First, a quick refresher: what's a protocol?

What a Protocol Is

A protocol is, roughly speaking, an agreed — upon framework for interaction — the rules and assumptions that let systems communicate and control one another.

Whenever two systems need to exchange information or issue commands, a few things have to be true:

The collection of such agreements is the protocol. Systems interoperate — communicate, coordinate, and recover — by following it.

Classic examples include TCP (a transport protocol between sender and receiver on the web) and HTTP (an application protocol layered on top of TCP).

Right now, your PC or smartphone is receiving this page from RINEARN's web server according to those rules.

Thanks to shared protocols, your device can talk to web servers worldwide and render sites consistently.

MCP: A Protocol for AI Systems to Interact with External Tools and Information

Here's the key point.

AI has advanced rapidly in recent years, and AI systems are now beginning to use tools on their own and carry out tasks autonomously — the rise of so-called AI agents.

In such setups, an AI-agent system interacts with tools for AI (and other information providers):

That interaction needs to be reliable and efficient for AI. A shared protocol makes this far easier.

One strong candidate is MCP (Model Context Protocol), proposed in 2024 by the AI company Anthropic. It's a very fresh protocol, but momentum is building.

There are other approaches (e.g., OpenAI's function calling), but as of November 2025, MCP appears to have a strong head start. Many AI systems are adding MCP support — or announcing plans to — so it may well become a de facto standard, though that's not guaranteed.

With MCP Support, Exevalator Can Now Serve as a Calculation Tool for AI

Exevalator Now Supports MCP

After a bit of background, here's the point: starting with this release, Exevalator supports control via MCP.

As in the earlier diagram, this makes it possible to use Exevalator as a calculation tool for AI:

When Is This Useful?

You might ask:

These days, can't an AI just write a Python script and compute things?

That's true — if you're willing to let the AI execute arbitrary scripts, you don't need Exevalator at all.

So when does Exevalator help? Precisely when you do not want to grant an AI permission to run arbitrary code.

There are plenty of cases where unrestricted execution is undesirable or outright impossible. For example:

Yet in those same situations, you might still want to allow:

"Just evaluate expressions and remember values (read/write variables)."

That's where Exevalator shines.

Because of its design, Exevalator lets you compute safely:

So even if someone tries to read secrets or damage the system, it simply can't be done through Exevalator.

Notes and Limitations

Please keep the following in mind:

Consequently, you cannot create values/instances of other types and pass them as arguments to specific functions. Exevalator is for numerical computation.

Let's Try It!

To wrap up, let's actually connect Exevalator to an AI agent and try it out.

Sample Environment and How to Install/Connect Exevalator

The examples below were run in the following environment:

*: You'll need a paid API plan with OpenAI, but GPT-5 nano is quite inexpensive (about $0.05 per million input tokens and $0.4 per million output tokens).
It's great for "just verify my MCP wiring works" scenarios. Performance is modest, so for heavier tasks you may want a smarter (and costlier) model.

For installation and MCP connection in the setup above, please see the official README.

Try a Computation with Math Functions

First, let's have the agent evaluate an expression that uses some math functions:

The result matches the theoretical value.

Note that the MCP edition of Exevalator comes in two variants:

Here we're using the latter.

In either case, you can edit the source to add more functions, and of course you can implement your own custom functions.

Try a Small Procedural Computation with Variables

Next, let's declare/read/write variables and perform a small, stepwise calculation:

As shown, you can store values for later use.

Note: With the GPT-5 nano model, we often observed minor issues: the final answer was correct, but the intermediate steps were a bit confused, or it sometimes skipped assigning results to variables. For tasks at this level, GPT-5 mini or higher seems more suitable. In our tests, mini executed the steps reliably without "skipping."

As an aside, trying this felt like "natural-language programming" in spirit. It might be fun to build an educational language/runtime that leans in this direction — just a thought!

-

That's a wrap for this release. Personally, this update was exciting to build — the sci-fi future keeps getting closer!

We plan to expand language support further; tentatively, Go is on the radar for the next major update (v2.5), though this is not final yet.

We'll keep posting Exevalator updates here. Stay tuned!

We'd also like to acknowledge the book that kicked off our MCP journey; it's a highly practical resource:

If you already write command-line tools or libraries in Python, a bit of hands-on practice may be all it takes to promote your tool into an AI-ready tool. It'll be exciting to see more tools and libraries become AI-enabled — let's ride the AI-era wave together!