Skip to main content

Math AI Agent

python poetry FastAPI FastMCP OpenAI GitHub Microsoft AI license

A prompt chat webapp that drives an LLM call inside an agentic loop using the calculator_mcp MCP server for arithmetic operations. The key constraint is that the LLM is given explicit system instructions to use calculator_mcp for any arithmetic operations.


Features

  • FastAPI web UI — simple form-based interface for submitting prompts
  • MCP client — connects to a remote calculator MCP server with optional OAuth authentication
  • Configurable — MCP server URL, OAuth settings, LLM endpoint and model, and logging are all driven by config.yaml
  • Plain-text answers — the model is instructed to reply without LaTeX or Markdown, since the web UI renders answers in a plain <textarea>

Unsupported Features

  • Server-sent events (SSE) are not supported for either LLM or MCP communication.
  • Streaming communication channels, such as Streamable HTTP, are not supported. In other words, both the LLM model and the MCP server are expected to generate the entire output before sending it.
  • Stateful Responses API communication may not be supported, depending on the LLM model selected in the configuration.
  • Input types such as images and videos are not supported. Only text input is supported.
  • Tools available to the LLM are limited to calculator_mcp. Other tool types, such as built-in tools (for example, web search and file search) and function calls, are not supported.

Bear in mind that support for the features listed above also depends on the capabilities of the selected LLM model. For example, the default configured model, NVIDIA Nemotron 3 Super, does not support storing conversation history and supports only text input.

AI Disclaimer

This project includes code and documentation created with the assistance of AI tools. For details on usage, limits, and review practices, please see the AI Disclaimer.

Prerequisites

  • Python 3.14+
  • pip

Installation

  1. Install using pip
pip install math-ai-agent
  1. Confirm the installed version matches the latest GitHub release at math-ai-agent/releases
math-ai-agent --version
pip show math-ai-agent

Uninstall

pip uninstall math-ai-agent
pip cache purge

Configuration

Settings are read from the packaged src/math_ai_agent/config.yaml.

calculator-mcp Running Locally

  • Launch calculator-mcp locally following the instructions at calculator-mcp

calculator-mcp Running Remotely

Note: This requires OAuth authentication using a GitHub account. Currently, only the project author is authorized.

Usage

  1. Simply run
math-ai-agent
  1. Health check
curl -v http://localhost:9090/health
# Expect: OK
  1. To stop, go to the running terminal and press Ctrl+C. If Ctrl+C does not work you can try the following:
PID="$(pgrep -f math-ai-agent)"
kill -15 "${PID}"

Open Source Project Information

This project is open source and publicly hosted on GitHub at rubensgomes-org. It is published under an OSI-approved open-source license.

License

The project is licensed under the MIT License.


Author: Rubens Gomes

Metadata

Release files for math-ai-agent 0.0.55

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for math-ai-agent 0.0.55
File Size Uploaded Provenance Actions
math_ai_agent-0.0.55.tar.gz 25.8 kB Without provenance Details for math_ai_agent-0.0.55.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for math-ai-agent 0.0.55
File Interpreter ABI Platform Actions
math_ai_agent-0.0.55-py3-none-any.whl Python 3 none any Details for math_ai_agent-0.0.55-py3-none-any.whl

Total release size: 56.2 kB

Release files / math_ai_agent-0.0.55.tar.gz

Download URL math_ai_agent-0.0.55.tar.gz
Size 25.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e46e55e3ccd4ca441b9da86fd3f6df19da7a9e6735d07ff63c805f00e0d066a1
BLAKE2b-256 checksum
How to use checksums
d5b4204ae6d13bf078a2dc542098aea82cc5d64700a771d6464aed76dea6db04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.3 CPython/3.14.8 Linux/7.0.0-1017-azure

Release files / math_ai_agent-0.0.55-py3-none-any.whl

Download URL math_ai_agent-0.0.55-py3-none-any.whl
Size 30.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
294d4739f94b2ffea0f392382f9bfb0aaac5b3d186cd0bc4676808f59982833f
BLAKE2b-256 checksum
How to use checksums
9cc69526e88344efbae4adefd2acce4a1362ac2c9e1f5eb74d67bc92f66d8f15
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.3 CPython/3.14.8 Linux/7.0.0-1017-azure

Security for math-ai-agent 0.0.55

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.55 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page