Concatenating Calculator MCP Server
by yash312312
README.md
๏ปฟ# ๐ข 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)](https://modelcontextprotocol.io/) 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"
```
---
## โจ 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
- [Node.js](https://nodejs.org/) v18+ (or your relevant runtime)
- An MCP-compatible client, such as [Claude for Desktop](https://claude.ai/download)
### Installation
1. **Clone the repository:**
```bash
git clone https://github.com/yash312312/custom-mcp-server.git
```
2. **Install dependencies:**
```bash
npm install
```
3. **Build the project:**
```bash
npm run build
```
---
## ๐ง Configuration
To connect this server to **Claude for Desktop**, add the following to your `claude_desktop_config.json`:
```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:
```bash
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](https://github.com/yash312312/custom-mcp-server/issues) or submit a pull request.
---
## ๐ License
This project is licensed under the [MIT License](LICENSE).
---
## ๐ Acknowledgements
Built using the [Model Context Protocol SDK](https://github.com/modelcontextprotocol/typescript-sdk) by Anthropic.
This server cannot be deployed
Maintenance
ActivityInactive
ResponsivenessNo issues