Skip to main content
Glama

Calculator MCP

by wrtnlabs

Calculate MCP

A Model Context Protocol (MCP) server that provides browser automation capabilities using basic calculator feature. This server enables LLMs to interact with calculator. (I actually made it for a test program)

Use Cases

  • The test code for to connect MCP feature.
  • The toy projects

Example config

{ "mcpServers": { "calculate": { "command": "npx", "args": [ "-y", "@wrtnlabs/calculator-mcp@latest" ] } } }
Installation in VS Code

Alternatively, you can install the Playwright MCP server using the VS Code CLI:

# For VS Code code --add-mcp '{"name":"calculator","command":"npx","args":["-y", "@wrtnlabs/calculator-mcp@latest"]}'
# For VS Code Insiders code-insiders --add-mcp '{"name":"calculator","command":"npx","args":["-y", "@wrtnlabs/calculator-mcp@latest"]}'

After installation, the Calculator MCP server will be available for use with your GitHub Copilot agent in VS Code.

CLI Options

The Calculator MCP server supports the following command-line options:

  • --port <port>: Port to listen on for SSE transport

Running headed browser on Linux w/o DISPLAY

When running headed browser on system w/o display or from worker processes of the IDEs, run the MCP server from environment with the DISPLAY and pass the --port flag to enable SSE transport.

npx @wrtnlabs/calculator-mcp@latest --port 8931

And then in MCP client config, set the url to the SSE endpoint:

{ "mcpServers": { "calculator": { "url": "http://localhost:8931/sse" } } }

Programmatic usage with custom transports

import { createServer } from "@wrtnlabs/calculator-mcp"; // ... other import statement const client = new Client({ name: "test client", version: "0.1.0", }); const server = createServer({ name: "calculator", version: "1.0.0" }); const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair(); await Promise.all([ client.connect(clientTransport), server.connect(serverTransport), ]);

Tools

  • add
  • sub
  • mul
  • div
  • mod
  • sqrt
Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

A Model Context Protocol server that provides basic calculator functionality for LLMs, enabling them to perform mathematical operations like addition, subtraction, multiplication, division, modulo, and square root.

  1. Use Cases
    1. Example config
      1. Installation in VS Code
    2. CLI Options
      1. Running headed browser on Linux w/o DISPLAY
        1. Programmatic usage with custom transports
          1. Tools

            Related MCP Servers

            • A
              security
              A
              license
              A
              quality
              A Model Context Protocol server that provides basic mathematical and statistical functions to LLMs, enabling them to perform accurate numerical calculations through a simple API.
              Last updated -
              13
              16
              TypeScript
              MIT License
            • A
              security
              F
              license
              A
              quality
              A server that provides tools for performing basic arithmetic operations (addition, subtraction, multiplication, division) via the Model Context Protocol.
              Last updated -
              4
              JavaScript
              • Apple
            • A
              security
              A
              license
              A
              quality
              A Model Context Protocol server that enables LLMs to perform precise numerical calculations by evaluating mathematical expressions.
              Last updated -
              1
              98
              Python
              MIT License
              • Linux
              • Apple
            • A
              security
              F
              license
              A
              quality
              A simple Model Context Protocol server that provides basic arithmetic operations (addition, subtraction, multiplication, division) as tools that can be called by Large Language Models.
              Last updated -
              4
              JavaScript

            View all related MCP servers

            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/wrtnlabs/calculator-mcp'

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