MCP-server-with-client-demo-for-calculator-with-SSE-

MCP-server-with-client-demo-for-calculator-with-SSE-

3.2

If you are the rightful owner of MCP-server-with-client-demo-for-calculator-with-SSE- and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcpreview.com.

A demonstration project showcasing a calculator service using the MCP (Model Control Protocol) framework.

The MCP Calculator Demo is a project that demonstrates the use of the Model Control Protocol (MCP) framework to create a calculator service. This project includes a server that provides basic arithmetic operations and a client that can evaluate both simple and complex mathematical expressions. The server is implemented using FastMCP and communicates with the client via Server-Sent Events (SSE). The client uses the Shunting-Yard algorithm to parse complex expressions and supports Reverse Polish Notation (RPN) evaluation. The project is designed to handle errors such as division by zero and invalid expressions, ensuring robust operation. It requires Python 3.7+ and several dependencies, which can be installed using pip.

Features

  • Basic arithmetic operations (addition, subtraction, multiplication, division)
  • Support for both simple operations and complex expressions
  • Error handling for division by zero
  • Server-Sent Events (SSE) communication between client and server
  • Support for parentheses and RPN evaluation in expressions

Tools

  1. Calculator_server.py

    MCP server, providing arithmetic operations

  2. client.py

    Client application, connect to server and process user input

  3. requirements.txt

    Project dependency

Related MCP Servers

View all mathgpt servers →