MCP Server

by mikefey

MCP Server

A simple Model Context Protocol (MCP) server implementation that provides tool functionality through a standardized interface. This server currently implements a basic calculator tool that can add two numbers together.

Overview

This server uses the @modelcontextprotocol/sdk to create a standardized way of exposing tools to MCP clients. It runs over stdio transport, making it suitable for integration with various client applications.

Features

  • Implements MCP Server specification
  • Uses stdio transport for communication
  • Provides a calculate_sum tool that adds two numbers together

Available Tools

calculate_sum

A simple addition tool that takes two numbers and returns their sum.

Input Schema:

{ "type": "object", "properties": { "a": { "type": "number" }, "b": { "type": "number" } }, "required": ["a", "b"] }

Response: The tool will return the sum as a text response. For example, "8" for the above input.

Technical Details

  • Server Name: mcp-server
  • Version: 1.0.0
  • Transport: StdioServerTransport
  • SDK: @modelcontextprotocol/sdk

Getting Started

  1. Install dependencies:
npm|yarn|pnpm install @modelcontextprotocol/sdk
  1. Run the server:
  • Meant to be used with an MCP client, for example this one. Usage with that client would look like this:
npm|yarn|pnpm start <path_to_this_dir/build/index.js>

Error Handling

The server implements standard MCP error handling. If an unknown method is called, it will return a MethodNotFound error.

-
security - not tested
-
license - not tested
-
quality - not tested

A simple Model Context Protocol server that provides standardized tool functionality, currently implementing a basic calculator for adding two numbers together.

  1. Overview
    1. Features
      1. Available Tools
        1. calculate_sum
      2. Technical Details
        1. Getting Started
          1. Error Handling

            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
            • A
              security
              A
              license
              A
              quality
              A Model Context Protocol server that provides basic calculator functionality for LLMs, enabling them to perform mathematical operations like addition, subtraction, multiplication, division, modulo, and square root.
              Last updated -
              6
              180
              10
              TypeScript
              MIT License
              • Linux

            View all related MCP servers

            ID: jwebewi02s