mcpcalculator
1
MCP Calculator is a Go-based implementation of an MCP server with functionalities for calculator and greeting operations, following the official MCP specification. It supports JSON-RPC 2.0, server capability negotiation, and standard error handling, ensuring a secure and reliable server environment.
MCP Calculator
A Go implementation of a Model Context Protocol (MCP) server with calculator and greeting functionality. This implementation follows the official MCP specification.
Features
- Full JSON-RPC 2.0 implementation
- MCP protocol support
- Tool registration and execution
- Resource handling
- Server capability negotiation
- Error handling according to spec
Requirements
- Go 1.21 or higher
Installation
- Clone the repository
- Fetch the dependencies
Usage
Starting the Server
Start the server on port 8080.
Protocol Implementation
- JSON-RPC 2.0 communication
- Server capabilities advertised during initialization
- Implements tool registration and execution
Security
- User consent required for tools and resources
- No data sharing without explicit requests
- Controlled and validated tool execution.