MCP.so
登录

MCP Calculator

@akhidasTech

基本信息

分类

其他

传输方式

stdio

作者

akhidasTech

关于 MCP Calculator

A Go implementation of MCP server with calculator and greeting functionality

MCP Calculator 配置

暂无标准配置

该服务器的 README 中没有可解析的 MCP 配置块,请前往代码仓库查看安装说明。

代码仓库

MCP Calculator 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is MCP Calculator?

MCP Calculator is a Go implementation of a Model Context Protocol (MCP) server that provides calculator (addition) and greeting functionality. It follows the official MCP specification and uses JSON‑RPC 2.0 for communication.

How to use MCP Calculator?

Clone the repository, run go mod download, then start the server with go run main.go (listens on port 8080). Send JSON‑RPC 2.0 requests via HTTP POST to http://localhost:8080 using tools like add (params a, b) or greeting (params name).

Key features of MCP Calculator

  • Full JSON‑RPC 2.0 implementation
  • MCP protocol support with capability negotiation
  • Tool registration and execution (add, greeting)
  • Resource handling according to MCP spec
  • Standard error handling with proper error codes
  • Security guidelines: user consent, data privacy, tool safety

Use cases of MCP Calculator

  • Perform basic arithmetic (addition) via an MCP‑compliant server
  • Generate personalized greetings through a resource endpoint
  • Test or prototype MCP protocol interactions in Go
  • Demonstrate JSON‑RPC 2.0 tool and resource patterns

常见问题

1

What runtime does MCP Calculator require?

Go 1.21 or higher.

2

How do I install and start the server?

Clone the repository, run `go mod download`, then execute `go run main.go`. The server starts on port 8080.

3

What tools are available?

Two tools: `add` (takes parameters `a` and `b`, returns their sum) and `greeting` (takes parameter `name`, returns a greeting).

4

How are requests and responses formatted?

All communication uses JSON‑RPC 2.0. Requests include `jsonrpc`, `id`, `method`, and `params`. Responses contain `jsonrpc`, `id`, and `result` (or `error` with code, message, and optional data).

5

What security measures are implemented?

The server follows MCP security guidelines: tools require explicit invocation, no data is shared without requests, tool execution is controlled and validated, and proper error reporting is used.

评论

其他 分类下的更多 MCP 服务器