MCP Add Server

Integrations

  • Implements a Model Context Protocol server using Node.js runtime, enabling deployment as a Node.js application.

  • Supports distribution and installation through the npm package registry, allowing users to easily install and run the server using npm commands.

MCP Add Server

A minimal Model Context Protocol (MCP) server that provides a simple add(a, b) tool. This project serves as a basic example of an MCP server implementation.

Features

  • Implements a Model Context Protocol compliant server.
  • Provides a single tool: add(a, b) which returns the sum of two numbers.

Prerequisites

  • Node.js (version 18.x.x or higher recommended)
  • npm (comes with Node.js)

Installation

  1. Clone the repository:
    git clone <你的仓库URL> # 当你推送到 GitHub 后,替换这里的 URL cd mcp-add-server
  2. Install dependencies:
    npm install

Usage

There are several ways to run the mcp-add-server:

1. Using npx (Recommended for most users):

If you have Node.js and npm installed, you can run the server directly without cloning or installing globally:

npx mcp-add-server

This command will download the latest version of mcp-add-server (if not already cached) and execute it.

2. Running from a cloned repository:

After cloning the repository and installing dependencies (see Installation):

npm start

This uses the start script defined in package.json.

3. Global installation (for frequent use or development):

You can install the package globally:

npm install -g . # From the cloned repository directory # or once published to npm: # npm install -g mcp-add-server

Then you can run it from any directory:

mcp-add-server

4. Local linking for development: In the project's root directory, run npm link. This will make the mcp-add-server command available globally, pointing to your local project files.

# In project directory npm link # Then, in any directory: mcp-add-server

Once the server is running (regardless of the method used), it will be available to MCP clients.

Example Tool Call (Conceptual)

An MCP client could call the add tool like this (specifics depend on the client implementation):

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

The server would respond with:

{ "result": 8 }

Running Tests

(When tests are added, describe how to run them here)

npm test

(Currently, npm test will output "Error: no test specified". Update the test script in package.json when tests are added.)

Project Structure

mcp-add-server/ ├── .git/ # Git directory ├── .gitignore # Specifies intentionally untracked files that Git should ignore ├── .cursor/ # Cursor specific files (if any) ├── node_modules/ # Project dependencies ├── src/ # Source code │ └── server.js # Main server logic ├── bin.js # Executable for the server ├── LICENSE # Project license ├── package-lock.json # Records exact versions of dependencies ├── package.json # Project metadata and dependencies └── README.md # This file

Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue.

License

This project is licensed under the MIT License.

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Tools

A minimal Model Context Protocol server that provides a simple add(a, b) tool for computing the sum of two numbers.

  1. Features
    1. Prerequisites
      1. Installation
        1. Usage
          1. Example Tool Call (Conceptual)
        2. Running Tests
          1. Project Structure
            1. Contributing
              1. License

                Related MCP Servers

                • 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
                  F
                  license
                  A
                  quality
                  A simple server that provides basic arithmetic operations (addition, subtraction, multiplication, division) as tools that can be called by Large Language Models through the Model Context Protocol.
                  Last updated -
                  4
                  JavaScript
                • 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
                • -
                  security
                  -
                  license
                  -
                  quality
                  A simple implementation of a Model Context Protocol server that demonstrates core functionality including mathematical tools (add, subtract) and personalized greeting resources.
                  Last updated -
                  3
                  Python
                  GPL 3.0

                View all related MCP servers

                ID: i1ca4pr3ca