mcp_in_golang

vaibhavnayak30/mcp_in_golang

3.1

If you are the rightful owner of mcp_in_golang and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

The Math MCP Server is a standalone server implemented in Go, designed to provide basic mathematical operations through the Model Context Protocol (MCP).

Tools
5
Resources
0
Prompts
0

Math MCP Server

A standalone Model Context Protocol (MCP) server implemented in Go that provides basic mathematical operations.

Features

  • 🔌 MCP Protocol Support: Implements the Model Context Protocol for seamless integration with MCP clients.

  • 🌐 Dual Endpoints: Supports both HTTP JSON-RPC and Server-Sent Events (SSE).

  • ➕➖✖️➗ Mathematical Operations: Provides 5 basic math operations as tools.

  • 🚀 REST API: Additional HTTP endpoints for health checks and configuration.

  • 📚 Swagger Documentation: Auto-generated API documentation.

Available Tools

ToolDescriptionParameters
addAdd two numbers togethera (float64), b (float64)
subtractSubtract second number from first numbera (float64), b (float64)
multiplyMultiply two numbers togethera (float64), b (float64)
divideDivide first number by second numbera (float64), b (float64)
powerCalculate base raised to the power of exponentbase (float64), exponent (float64)

Installation

Prerequisites

  • Go 1.24 or later

Build from Source

  1. Clone the repository:
    git clone [https://github.com/vaibhavnayak30/mcp_in_golang.git](https://github.com/vaibhavnayak30/mcp_in_golang.git)
    
  2. Navigate to the project directory:
    cd math-mcp
    
  3. Build the project:
    make build
    

Run the Server

To run the server, use the make run command or execute the binary directly:

# Using make
make run

# Or directly
./bin/math-mcp