logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

mcp-arithmetic-adder-utility

A Model Context Protocol compliant utility designed to perform scalar addition, returning the sum of two provided numerical inputs. It serves as a canonical reference implementation for MCP server configuration.

Author

mcp-arithmetic-adder-utility logo

zhangzhefang-github

MIT License

Quick Info

GitHub GitHub Stars 0
NPM Weekly Downloads 0
Tools 1
Last Updated 2026-02-19

Tags

mcpapisrequestsmcp addmcp serverexample mcp

Protocol-Aligned Addition Service

This repository details a lean Model Context Protocol (MCP) service exposing a singular function: add(a, b), which computes and returns the aggregate value of two supplied numeric operands. It functions as a foundational blueprint for developing compliant MCP service endpoints.

Addition Service MCP Endpoint

NPM Package Version

Core Capabilities

  • Adheres strictly to the Model Context Protocol specification for server operation.
  • Exposes one primary primitive: add(a, b) yielding the arithmetic total.
  • Packaged via npm for straightforward integration into application stacks.

Operational Demonstration (Visual Reference)

The diagram below illustrates the registration of mcp-arithmetic-adder-utility on the mcp.so registry and a successful invocation by an MCP-aware conversational agent (e.g., Cherry Studio) utilizing the add capability to finalize a summation task:

  • Left Panel: Metadata and initialization parameters for mcp-arithmetic-adder-utility as seen on mcp.so.
  • Right Panel: An MCP client environment (like Cherry Studio) interpreting user intent for addition, dispatching a call to the @zhefang/mcp-add-server tool, and subsequently receiving and displaying the correct computed outcome.

This sequence clearly depicts the interoperability enabled by the Model Context Protocol between disparate server and client entities.

System Requirements

  • Node.js environment (version 18.x.x or newer is suggested)
  • npm utility (bundled with Node.js)

Deployment Instructions

Execute the service using npx:

bash npx @zhefang/mcp-add-server

Global Installation

For persistent, system-wide availability:

bash npm install -g @zhefang/mcp-add-server

Then launch via: bash mcp-add-server

Source Code Configuration

  1. Retrieve the source code repository: bash git clone https://github.com/zhangzhefang-github/mcp-add-server.git cd mcp-add-server

  2. Acquire necessary dependencies: bash npm install

  3. Start the local instance: bash npm start

Execution Methods

To initiate the mcp-arithmetic-adder-utility service, employ one of the following protocols:

1. Via npx (Preferred for transient use):

bash npx @zhefang/mcp-add-server

This fetches and runs the current release.

2. System-wide deployment (For repeated invocation):

bash npm install -g @zhefang/mcp-add-server mcp-add-server

3. Running from a local clone:

After setup and dependency resolution:

bash npm start

4. Local symbolic linking for development: From the project root directory: bash npm link mcp-add-server

Once the daemon is active, it exposes itself to MCP consumers primarily through the standard input/output (stdio) communication channel.

Client Interaction Blueprint

The src/client.js module provides an illustrative example of establishing a connection to the running service:

javascript import { Client } from "@modelcontextprotocol/sdk/client/index.js"; import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";

const transport = new StdioClientTransport({ command: "npx", args: ["@zhefang/mcp-add-server"] });

// Establish connection and invoke the addition primitive await client.connect(transport); const result = await client.callTool({ name: "add", arguments: { a: 10, b: 5 } }); console.log("Computation Result:", result);

Tool Invocation Payload (JSON Format)

{ "tool_name": "add", "arguments": { "a": 5, "b": 3 } }

The service response structure will be:

{ "content": [ { "type": "text", "text": "The sum is: 8" } ] }

Validation Procedures

(Placeholder for test execution instructions) bash npm test

(Note: The current configuration in package.json for the 'test' script results in an 'Error: no test specified'. This should be updated upon implementation of unit/integration tests.)

Directory Layout

mcp-add-server/ ├── .git/ # Version control metadata ├── .gitignore # Files excluded from source control tracking ├── .cursor/ # Editor-specific configuration (if present) ├── node_modules/ # Third-party package dependencies ├── src/ # Primary source code directory │ └── server.js # Core logic for the MCP service handler ├── bin.js # Script responsible for service execution startup ├── LICENSE # Licensing declaration file ├── package-lock.json # Deterministic dependency version manifest ├── package.json # Project configuration and dependency manifest └── README.md # This explanatory document

Collaboration Guidelines

Contributions are highly encouraged. Kindly submit feature requests or bug reports via issues or propose changes via pull requests.

Licensing Details

This software is distributed under the terms of the MIT License.

See Also

`