Skip to main content
Glama
wrtnlabs

Calculator MCP

by wrtnlabs

MCP berechnen

Ein Model Context Protocol (MCP)-Server, der Browser-Automatisierungsfunktionen mithilfe einer einfachen Taschenrechnerfunktion bereitstellt. Dieser Server ermöglicht LLMs die Interaktion mit dem Taschenrechner. (Ich habe ihn tatsächlich für ein Testprogramm erstellt.)

Anwendungsfälle

  • Der Testcode zum Verbinden der MCP-Funktion.

  • Die Spielzeugprojekte

Beispielkonfiguration

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

Installation in VS Code

Alternativ können Sie den Playwright MCP-Server mithilfe der VS Code CLI installieren:

# 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"]}'

Nach der Installation steht der Calculator MCP-Server zur Verwendung mit Ihrem GitHub Copilot-Agent in VS Code zur Verfügung.

CLI-Optionen

Der Calculator MCP-Server unterstützt die folgenden Befehlszeilenoptionen:

  • --port <port> : Port, auf dem auf SSE-Transport gewartet wird

Ausführen eines Headed-Browsers unter Linux ohne DISPLAY

Wenn Sie einen Headed Browser auf einem System ohne Anzeige oder aus Arbeitsprozessen der IDEs ausführen, führen Sie den MCP-Server aus der Umgebung mit DISPLAY aus und übergeben Sie das Flag --port um den SSE-Transport zu aktivieren.

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

Und dann legen Sie in der MCP-Clientkonfiguration die url zum SSE-Endpunkt fest:

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

Programmatische Nutzung mit benutzerdefinierten Transporten

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),
]);

Werkzeuge

  • hinzufügen

  • Unter

  • mul

  • div

  • Mod

  • Quadratwurzel

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.

Tool Schema Changelog

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

  1. 6 tool updatesv1.0.0
    • First observedadd
    • First observeddiv
    • First observedmod
    • First observedmul
    • First observedsqrt
    • First observedsub

TDQS

B3.3/5.0

Scored across 6 tools

Disambiguation5/5

Each tool performs a distinct mathematical operation with no overlap. An agent can easily choose the correct tool based on the operation name.

Naming Consistency5/5

All tool names follow a consistent lowercase, single-word operator pattern (add, sub, mul, div, mod, sqrt). The naming is uniform and predictable.

Tool Count5/5

Six tools cover the essential arithmetic operations for a calculator server without unnecessary bulk. The scope is tight and well-matched to the domain.

Completeness4/5

Core arithmetic operations are fully covered, including square root and modulo. A power/exponent operation could be a minor addition, but the current set handles typical calculator workflows without dead ends.

Maintenance

ActivityInactive
ResponsivenessNo issues

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
    20 npm
    186
    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.
    -