Skip to main content
Glama
MCP Calculator Server

MCP Calculator Server

๐Ÿงฎ MCP Calculator Server


๐ŸŒŸ Project Overview

This project demonstrates how to build a simple Model Context Protocol (MCP) server using Python.

The MCP server exposes calculator operations as tools that can be called by an MCP-compatible client such as Cursor.

Instead of manually writing Python code for every calculation, Cursor can understand the user's request and call the appropriate MCP tool.

๐Ÿ”ฅ Available Calculator Tools

๐Ÿ”ง Tool

๐Ÿ“ Description

๐Ÿ’ก Example

โž• add

Adds two numbers

add(10, 20) โ†’ 30

โž– subtract

Subtracts two numbers

subtract(20, 10) โ†’ 10

โœ–๏ธ multiply

Multiplies two numbers

multiply(10, 5) โ†’ 50

โž— divide

Divides two numbers

divide(100, 4) โ†’ 25

๐Ÿ”ข power

Calculates power

power(2, 10) โ†’ 1024


๐Ÿ—๏ธ Architecture

                  ๐Ÿ‘ค USER
                    โ”‚
                    โ”‚
                    โ–ผ
             ๐Ÿค– CURSOR AGENT
                    โ”‚
                    โ”‚ MCP Protocol
                    โ–ผ
             ๐Ÿ”Œ MCP CLIENT
                    โ”‚
                    โ”‚ stdio
                    โ–ผ
        ๐Ÿงฎ CALCULATOR MCP SERVER
                    โ”‚
       โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
       โ”‚            โ”‚            โ”‚
       โ–ผ            โ–ผ            โ–ผ
     โž• add      โž– subtract   โœ–๏ธ multiply
       โ”‚            โ”‚            โ”‚
       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                    โ”‚
              โ”Œโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”
              โ–ผ           โ–ผ
          โž— divide    ๐Ÿ”ข power

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelogโ€ฆ

    Related MCP Connectors

    Related MCP Servers

    • -
      license
      Not graded
      quality
      Not graded
      maintenance
      A calculator server that exposes mathematical functions as tools (add, subtract, multiply, divide, square, power, square root), enabling language models to perform calculations through Model Context Protocol (MCP).
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      Provides basic calculator operations (add, subtract, multiply, divide) as MCP tools for use with Claude Desktop and other MCP clients.
      -
    • F
      license
      A
      quality
      D
      maintenance
      Provides basic arithmetic operations (add, subtract, multiply, divide) through MCP, enabling AI clients to perform calculations via natural language.
      4
      -
    • F
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to perform arithmetic operations such as addition, subtraction, multiplication, and division through standardized MCP tools.
      1
      -