drio
Open app

MCP Calculator

Source

A Go implementation of MCP server with calculator and greeting functionality

Catalog onlyCatalog onlySTDIO

Overview

MCP Calculator is a Go implementation of a Model Context Protocol (MCP) server that provides calculator and greeting functionalities, adhering to the official MCP specification.

To use MCP Calculator, clone the repository, install the necessary Go modules, and run the server. You can then make requests to the server using JSON-RPC 2.0 format.

  • Full JSON-RPC 2.0 implementation - MCP protocol support - Tool registration and execution - Resource handling - Server capability negotiation - Error handling according to spec
  1. Performing arithmetic operations via JSON-RPC requests.
  2. Sending greeting messages through the server.
  3. Integrating with other applications that require a calculator service.

Add to your AI client

Use these steps to connect MCP Calculator in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.

Cursor

Add this to your .cursor/mcp.json file in your project root, then restart Cursor.

.cursor/mcp.json

{
  "mcpServers": {
    "mcpcalculator-akhidastech": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcpcalculator-akhidastech"
      ]
    }
  }
}

Claude Desktop

Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "mcpcalculator-akhidastech": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcpcalculator-akhidastech"
      ]
    }
  }
}

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

{
  "mcpServers": {
    "mcpcalculator-akhidastech": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcpcalculator-akhidastech"
      ]
    }
  }
}

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "mcpcalculator-akhidastech": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcpcalculator-akhidastech"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "mcpcalculator-akhidastech": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcpcalculator-akhidastech"
      ]
    }
  }
}

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "mcpcalculator-akhidastech": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcpcalculator-akhidastech"
      ]
    }
  }
}

FAQ

What programming language is MCP Calculator written in?

MCP Calculator is implemented in Go.

How do I start the server?

You can start the server by running `go run main.go` after setting up the project.

What is JSON-RPC 2.0?

JSON-RPC 2.0 is a remote procedure call (RPC) protocol encoded in JSON.