
mcp calculator go
一个基于 Go 实现的简单计算器,遵循 MCP 协议,支持基础运算。
Repository Info
About This Server
一个基于 Go 实现的简单计算器,遵循 MCP 协议,支持基础运算。
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
MCP Calculator Go
This is a simple calculator implemented in Go that conforms to the Model Context Protocol (MCP). It demonstrates how to build an MCP server using the mcp-go library.
Features
- Performs basic arithmetic operations: addition, subtraction, multiplication, and division.
- Uses
github.com/shopspring/decimalfor accurate decimal calculations. - Exposes a single
calculatetool withoperation,x, andyparameters. - Uses
go-enumto generate enums and related helper methods. - Provides a
Taskfilefor convenient build and dependency management.
Building and Running
First you need to install the dependencies described in the task file.
go install github.com/abice/go-enum@latest
go generate ./...
or simply
task deps
task enum
To build the executable, run:
go build -o mcp-calculator-go
or
task build
How to use
- build mcp binary
- configure
- VS Code and Client:
{
"mcpServers": {
"calculator-go": {
"command": "/path/to/mcp-calculator-go",
"args": [],
"disabled": false,
"autoApprove": []
}
}
}
- Zed
"context_servers": {
"calculator-go": {
"command": {
"path": "/path/to/mcp-calculator-go",
"args": [],
"env": {}
},
"settings": {}
}
}
Quick Start
Clone the repository
git clone https://github.com/omegaatt36/mcp-calculator-goInstall dependencies
cd mcp-calculator-go
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.