Skip to main content
Glama
wrtnlabs

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

Available Tools

6 tools
addA

Add two numbers

ParametersJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

TDQS

A3.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. 'Add two numbers' accurately describes a pure, stateless, non-destructive operation. For such a simple arithmetic tool, this is sufficient transparency, though it could explicitly state that it has no side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence that conveys the essential action without any unnecessary words. It is highly concise and structured effectively.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's extreme simplicity (add two numbers), the description is largely complete. It could mention the return value (the sum), but that is easily inferred. The lack of output schema does not significantly degrade completeness here.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% – the description does not explain the two parameters 'a' and 'b' or their roles beyond what the schema already provides. With no additional meaning added, this dimension is severely lacking.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Add two numbers', specifying the verb 'add' and the resource 'two numbers'. This distinguishes it from sibling tools like sub, mul, div, mod, and sqrt, which perform different operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. For example, it does not explain when addition is preferred over subtraction or multiplication. The usage context is entirely implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

divC

Divide two numbers

ParametersJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

TDQS

C2.5/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are present, so the description carries the full burden of behavioral disclosure. It fails to specify how errors like division by zero are handled, or if integer vs. floating-point arithmetic is used.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very short, but this is appropriate for a simple tool. However, it lacks critical information that would earn its place, such as error handling or parameter order.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (2 parameters, no output schema, no annotations), the description is incomplete as it omits key behavioral details like division-by-zero behavior and return type.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has no descriptions for parameters (0% coverage), and the description adds no meaning beyond the schema, merely stating 'divide two numbers' without explaining the roles of 'a' and 'b'.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Divide two numbers' clearly specifies the verb (divide) and the resource (two numbers), and the tool name 'div' together with sibling names (add, mod, etc.) makes the distinction obvious.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives, such as when to prefer division over other arithmetic operations, or if there are prerequisites like avoiding division by zero.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

modC

Mod two numbers

ParametersJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

TDQS

C2.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It fails to disclose behavioral traits such as handling of zero divisor or return type.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Extremely concise (three words), but at the cost of necessary details. It is front-loaded but insufficiently informative.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is too sparse. It does not cover edge cases or result details, making it incomplete for safe invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%. The description 'Mod two numbers' does not clarify parameter order (a mod b vs b mod a), leading to potential confusion.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Mod two numbers' clearly indicates the modulus operation. It distinguishes from sibling tools like add, sub, mul, div, and sqrt. However, it lacks specificity on which number is the dividend and which is the divisor.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use mod versus alternatives like div or sqrt. The description does not differentiate usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

mulB

Multiply two numbers

ParametersJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

TDQS

B3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, and the description does not disclose behavioral traits such as return type, overflow handling, or behavior for non-integer inputs. For a computation tool, this is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence, front-loading the essential information without any extraneous words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity, the description is minimally adequate. However, with no output schema and no behavioral details, it leaves gaps about return value and edge cases, making it incomplete for a comprehensive understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description does not add any meaning beyond the schema. It fails to explain parameters 'a' and 'b' even minimally, so the description does not compensate for the lack of schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Multiply two numbers' clearly states the action (multiply) and the resource (two numbers), distinguishing it from sibling tools like add, div, mod, sqrt, sub.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool vs alternatives. It lacks explicit context or exclusions, leaving the agent to infer based solely on the tool name.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

sqrtC

Square root of a number

ParametersJSON Schema
NameRequiredDescriptionDefault
aYes

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description lacks behavioral details such as handling edge cases (negative numbers, zero, very large numbers) or return value format. With no annotations provided, the description carries the burden of disclosure but fails to mention critical behavior like potential NaN or error.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and front-loaded with the core purpose. It is a single short phrase without fluff. While efficient, it could include additional context without harming conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema and simple parameter, the description should at least mention the return type (number) or domain restrictions. It only states the operation, omitting important context about input constraints and output behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% description coverage, but the description implies the parameter is the number to take the square root of. However, it adds little beyond the schema's type and requiredness. For a single parameter, the baseline is 3 as it is minimally acceptable.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Square root of a number' clearly states the operation and the resource (a number). It distinguishes from siblings (add, div, etc.) as they are binary operations. However, it could explicitly mention the mathematical domain (non-negative numbers) for completeness.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No usage guidelines are provided. The description does not specify when to use this tool versus alternatives (e.g., for exponentiation or division) or mention any prerequisites (e.g., non-negative input).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

subC

Subtract two numbers

ParametersJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

TDQS

C2.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are present, so the description carries the full burden. It only states 'subtract', lacking details on safety, return type, error conditions, or side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very concise (one short sentence) and front-loaded. However, it could be slightly more descriptive without losing conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema or annotations, the description omits return behavior, edge cases, and error handling. It is insufficient for an agent to fully understand usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds no meaning beyond the input schema. With 0% schema coverage, it fails to clarify which parameter is subtracted from which, leaving ambiguity.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Subtract two numbers' clearly conveys the operation, but it does not specify the order of subtraction (which is the minuend and subtrahend). It distinguishes from sibling tools like add, mul, etc.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No usage guidelines are provided. The description does not mention when to use this tool, when not to, or any alternatives among siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

B3.3/5.0
Disambiguation5/5

Each tool has a clearly distinct mathematical operation with no overlap in purpose. The descriptions (e.g., 'Add two numbers', 'Divide two numbers') make it impossible to confuse one tool for another, as they target specific, well-defined arithmetic functions.

Naming Consistency5/5

All tool names follow a consistent, concise pattern using short, standard mathematical abbreviations (add, div, mod, mul, sqrt, sub). There are no deviations in style or convention, making the set highly predictable and readable.

Tool Count5/5

With 6 tools, this server is well-scoped for a basic calculator, covering essential arithmetic operations (addition, subtraction, multiplication, division, modulus, square root). Each tool earns its place without redundancy or bloat, fitting the domain perfectly.

Completeness4/5

The toolset covers core arithmetic operations comprehensively, but there are minor gaps for a full calculator experience, such as missing exponentiation, trigonometric functions, or memory operations. However, agents can perform most basic calculations without dead ends.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    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.
    13
    37
    174
    MIT
  • -
    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 mathematical operations (addition, subtraction, multiplication, division) through a Model Context Protocol server. Enables MCP-compatible clients like chatbots to perform calculations by sending structured math requests.

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

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