Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AIFire in da houseCheck it out free

calculator-mcp

MCP.Pizza Chef: wrtnlabs

Calculator MCP is a lightweight Model Context Protocol server that provides basic calculator functionality to LLMs. It enables language models to perform arithmetic calculations and interact with a calculator interface programmatically. Primarily designed as a test and toy project, it facilitates integration testing and simple computational tasks within MCP-enabled environments.

Use This MCP server To

Run arithmetic calculations via LLM commands Test MCP integration with calculator functionality Enable LLMs to perform basic math operations Use as a toy project for MCP server development Validate MCP server-client communication with calculator tasks

README

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

calculator-mcp FAQ

How do I install the calculator MCP server?
You can install it using npx with the command 'npx -y @wrtnlabs/calculator-mcp@latest' or add it via VS Code CLI.
What kind of calculations can the calculator MCP server perform?
It supports basic arithmetic operations such as addition, subtraction, multiplication, and division.
Is the calculator MCP server suitable for production use?
It is primarily designed as a test and toy project, so it may not be optimized for production environments.
Can this MCP server be used with different LLM providers?
Yes, it is provider-agnostic and can work with models like OpenAI, Claude, and Gemini.
How do I configure the calculator MCP server in my MCP setup?
You configure it by specifying the command 'npx' with arguments to install '@wrtnlabs/calculator-mcp@latest' in your MCP server configuration.
Does the calculator MCP server support complex mathematical functions?
No, it currently supports only basic calculator features for simple arithmetic.
Can I extend the calculator MCP server for more advanced calculations?
Yes, since it is open source, you can modify and extend its capabilities as needed.