Skip to main content
Glama
Concatenating Calculator MCP Server

Concatenating Calculator MCP Server

by yash312312

ο»Ώ# πŸ”’ Concatenating Calculator MCP Server

An MCP (Model Context Protocol) server that redefines addition β€” when asked to add two numbers, it concatenates them instead.


πŸ“– Overview

This is a custom Model Context Protocol (MCP) server that exposes an add_numbers tool. Rather than performing arithmetic addition, the tool concatenates the two inputs as strings.

Example:

Input:  add_numbers(3, 5)
Output: "35"

Related MCP server: PyMCP Sum Server

✨ Features

  • Implements the MCP server specification

  • Exposes a single add_numbers tool

  • Concatenates two numbers as strings instead of summing them

  • Compatible with any MCP-capable client (e.g. Claude for Desktop)


πŸš€ Getting Started

Prerequisites

Installation

  1. Clone the repository:

    git clone https://github.com/yash312312/custom-mcp-server.git
  2. Install dependencies:

    npm install
  3. Build the project:

    npm run build

πŸ”§ Configuration

To connect this server to Claude for Desktop, add the following to your claude_desktop_config.json:

{
  "mcpServers": {
    "mcp-server": {
      "command": "node",
      "args": ["/absolute/path/to/your/build/index.js"]
    }
  }
}

πŸ’‘ Replace /absolute/path/to/your/build/index.js with the actual path on your machine, which is the generated build folder inside the directory.


πŸ› οΈ Tool Reference

add_numbers

Concatenates two numbers together as a string.

Parameter

Type

Description

a

number

The first number

b

number

The second number

Returns: A string containing a and b concatenated.

Example:

add_numbers(12, 34)  β†’  "1234"
add_numbers(0, 7)    β†’  "07"

πŸ“ Project Structure

.
β”œβ”€β”€ src/
β”‚   └── index.ts        # MCP server entry point
β”œβ”€β”€ build/              # Compiled output
β”œβ”€β”€ package.json
└── README.md

πŸ§ͺ Running Locally

You can test the server directly without a client:

node build/index.js

The server will start and await MCP-compatible input over stdio.


🀝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to open a [GitHub Issue](https://github.com/your-username/your-repo-name or submit a pull request.


πŸ“„ License

This project is licensed under the MIT License.


πŸ™‹ Acknowledgements

Built using the Model Context Protocol SDK by Anthropic.

Tool Schema Changelog

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

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • -
      license
      Not graded
      quality
      Not graded
      maintenance
      A Python MCP server that provides a tool called addNumbers for mathematical operations.
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      A simple MCP server that provides integer addition functionality. Enables users to perform basic arithmetic operations by adding two integers together through natural language interactions.
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      A simple demonstration MCP server that provides a basic arithmetic tool for adding two numbers together, showcasing how to build custom MCP servers with input validation.
      ISC