MCP Add Server
This server provides a single tool for performing addition via the Model Context Protocol (MCP).
Basic arithmetic: The
addtool takes two required number arguments (aandb) and returns their sum.MCP compliance: Works seamlessly with MCP-compatible clients and platforms like chatbots (e.g., Cherry Studio).
Input validation: Ensures both inputs are numbers and doesn't accept additional properties.
Simple API: Uses a straightforward JSON schema, making integration easy.
Flexible deployment: Can be run locally, globally, or via
npx.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Add Serveradd 15 and 27"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.Available on npm for easy installation and use.
Related MCP server: Basic Math MCP Server
实际运行效果 (Showcase)
下图展示了 mcp-add-server 在 mcp.so 服务发现平台上的配置信息,以及一个兼容 MCP 的聊天机器人 (例如 Cherry Studio) 成功调用本服务器的 add 工具来执行加法运算的场景:

左侧:
mcp-add-server在mcp.so上的信息,展示了其概述和启动配置。右侧: 一个 MCP 客户端 (例如 Cherry Studio 这样的聊天机器人) 接收到用户关于加法的请求后,调用了
@zhefang/mcp-add-server提供的add工具,并正确返回了计算结果。
这清晰地演示了遵循 Model Context Protocol 的服务器和客户端之间如何无缝集成和协作。
Prerequisites
Node.js (version 18.x.x or higher recommended)
npm (comes with Node.js)
Installation
Quick Start (Recommended)
The easiest way to use this MCP server is with npx:
npx @zhefang/mcp-add-serverGlobal Installation
For frequent use, install globally:
npm install -g @zhefang/mcp-add-serverThen run:
mcp-add-serverDevelopment Setup
Clone the repository:
git clone https://github.com/zhangzhefang-github/mcp-add-server.git cd mcp-add-serverInstall dependencies:
npm installRun locally:
npm start
Usage
There are several ways to run the mcp-add-server:
1. Using npx (Recommended for most users):
npx @zhefang/mcp-add-serverThis command will download the latest version of @zhefang/mcp-add-server and execute it.
2. Global installation (for frequent use):
npm install -g @zhefang/mcp-add-server
mcp-add-server3. Running from a cloned repository:
After cloning the repository and installing dependencies:
npm start4. Local linking for development: In the project's root directory:
npm link
mcp-add-serverOnce the server is running, it will be available to MCP clients via stdio transport.
Client Example
The src/client.js file demonstrates how to connect to the server:
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"]
});
// Connect and use the add tool
await client.connect(transport);
const result = await client.callTool({
name: "add",
arguments: { a: 10, b: 5 }
});
console.log("计算结果:", result);Example Tool Call (JSON)
{
"tool_name": "add",
"arguments": {
"a": 5,
"b": 3
}
}The server responds with:
{
"content": [
{
"type": "text",
"text": "结果是: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 fileContributing
Contributions are welcome! Please feel free to submit a pull request or open an issue.
License
This project is licensed under the MIT License.
Available Tools
1 tooladdD
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | 第一个加数 | |
| b | Yes | 第二个加数 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
With only one tool, there is no possibility of confusion or overlap with other tools. The single tool 'add' stands alone without any ambiguity in purpose.
A single tool inherently has perfect naming consistency, as there are no other tools to compare it against. The name 'add' is straightforward and follows a simple verb pattern.
A single tool is generally too few for most server purposes, as it limits functionality and scope. Without a description, it's unclear if this minimal set is justified, but typically one tool feels thin and incomplete.
With only one tool and no description, it is impossible to assess coverage of any domain. The surface is severely incomplete, lacking any context or additional operations that might be expected for a coherent toolset.
Maintenance
Related MCP Connectors
A Model Context Protocol server for Wix AI tools
MCP server for progressive tool usage at any scale (see https://klavis.ai)
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceA minimal example server implementing the Model Context Protocol, providing addition and multiplication tools for learning and experimentation with MCP clients.1
- FlicenseBqualityDmaintenanceA simple server that provides basic mathematical operations (sum and subtraction) through the Model Context Protocol.21
- AlicenseNot gradedqualityDmaintenanceA minimal, production-ready MCP server with a simple addition calculator tool that demonstrates integration with the Model Context Protocol.151MIT
- FlicenseBqualityNot gradedmaintenanceA minimal Model Context Protocol server that provides a simple tool for adding two integers. It serves as a demonstration of the official Python MCP SDK and is designed for local execution via stdio.1
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/zhangzhefang-github/mcp-add-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server