Skip to main content
Glama
Yash-synergy

basic-mcp-calculator-server

by Yash-synergy

Basic MCP Calculator Server

A simple Model Context Protocol (MCP) server that provides basic calculator functionality.

Features

  • Add: Add two numbers together

  • Subtract: Subtract second number from first number

  • Multiply: Multiply two numbers together

  • Divide: Divide first number by second number (with division by zero protection)

Related MCP server: my-mcp-server

Installation

  1. Install dependencies:

npm install
  1. Build the project:

npm run build

Usage

Running the Server

npm start

The server runs on stdio and communicates using the MCP protocol.

Available Tools

  • add(a, b) - Returns the sum of a and b

  • subtract(a, b) - Returns a minus b

  • multiply(a, b) - Returns the product of a and b

  • divide(a, b) - Returns a divided by b

Example MCP Configuration

Add this to your MCP client configuration:

{
  "mcpServers": {
    "calculator": {
      "command": "node",
      "args": ["path/to/basic-mcp-calculator-server/dist/index.js"]
    }
  }
}

Development

npm run dev

This will build and start the server in one command.

License

MIT

F
license - not found
-
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Yash-synergy/authentication_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server