Skip to main content
Glama
zhangzhefang-github

MCP Add Server

MCP 添加服务器

一个极简的模型上下文协议 (MCP) 服务器,提供一个简单的add(a, b)工具。该项目是 MCP 服务器实现的一个基本示例。

特征

  • 实现符合模型上下文协议的服务器。

  • 提供一个工具: add(a, b) ,返回两个数字的和。

Related MCP server: Basic Math MCP Server

先决条件

  • Node.js(建议使用 18.xx 或更高版本)

  • npm(Node.js 附带)

安装

  1. 克隆存储库:

    git clone <你的仓库URL> # 当你推送到 GitHub 后,替换这里的 URL
    cd mcp-add-server
  2. 安装依赖项:

    npm install

用法

有几种方法可以运行mcp-add-server :

1.使用npx (推荐大多数用户使用):

如果您已经安装了 Node.js 和 npm,则可以直接运行服务器,而无需克隆或全局安装:

npx mcp-add-server

此命令将下载最新版本的mcp-add-server (如果尚未缓存)并执行它。

2. 从克隆的存储库运行:

克隆存储库并安装依赖项后(请参阅安装):

npm start

这使用package.json中定义的start脚本。

3.全局安装(适合频繁使用或者开发):

您可以全局安装该包:

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

然后您可以从任何目录运行它:

mcp-add-server

**4. 本地链接用于开发:**在项目根目录下,运行npm link 。这将使mcp-add-server命令全局可用,并指向本地项目文件。

# In project directory
npm link

# Then, in any directory:
mcp-add-server

一旦服务器运行(无论使用何种方法),它将可供 MCP 客户端使用。

示例工具调用(概念)

MCP 客户端可以像这样调用add工具(具体情况取决于客户端实现):

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

服务器将响应:

{
  "result": 8
}

运行测试

(添加测试时,请在此处描述如何运行它们)

npm test

(目前, npm test将输出“错误:未指定测试”。添加测试时,请更新package.json中的test脚本。)

项目结构

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

贡献

欢迎贡献代码!欢迎提交 Pull 请求或创建 issue。

执照

该项目已获得MIT 许可。

Available Tools

1 tool
addD
NameRequiredDescriptionDefault
aYes第一个加数
bYes第二个加数

TDQS

D1/5.0
Behavior1/5

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.

Conciseness1/5

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.

Completeness1/5

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.

Parameters1/5

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.

Purpose1/5

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.

Usage Guidelines1/5

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.

Tool Schema Changelog

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

  1. 1 tool update
    • First observedadd

TDQS

D1.7/5.0

Scored across 1 tool

Disambiguation5/5

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.

Naming Consistency5/5

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.

Tool Count2/5

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.

Completeness1/5

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

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    B
    quality
    D
    maintenance
    A simple server that provides basic mathematical operations (sum and subtraction) through the Model Context Protocol.
    2
    1
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    A minimal, production-ready MCP server with a simple addition calculator tool that demonstrates integration with the Model Context Protocol.
    6 npm
    1
    MIT
  • F
    license
    B
    quality
    Not graded
    maintenance
    A 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
    -