I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

mcpcalculator
A Go implementation of MCP server with calculator and greeting functionality
1
Github Watches
1
Github Forks
1
Github Stars
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
Project Structure
mcpcalculator/
├── mcp/
│ └── protocol/
│ ├── types.go # Protocol types and structures
│ ├── server.go # MCP server implementation
│ └── client.go # MCP client implementation
├── main.go # Example usage
├── go.mod # Go module file
└── README.md # Documentation
Requirements
- Go 1.21 or higher
Installation
git clone https://github.com/akhidasTech/mcpcalculator.git
cd mcpcalculator
go mod download
Usage
Starting the Server
go run main.go
The server will start on port 8080.
Making Requests
Tools and resources follow the JSON-RPC 2.0 specification:
Add Tool
curl -X POST http://localhost:8080 \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "add",
"params": {"a": 5, "b": 3}
}'
Greeting Resource
curl -X POST http://localhost:8080 \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "greeting",
"params": {"name": "John"}
}'
Response Format
All responses follow the JSON-RPC 2.0 format:
{
"jsonrpc": "2.0",
"id": 1,
"result": <result_value>
}
Or for errors:
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": <error_code>,
"message": "error message",
"data": <additional_data>
}
}
Protocol Implementation
This implementation follows the Model Context Protocol specification:
- JSON-RPC 2.0: All communication uses the JSON-RPC 2.0 protocol
- Capabilities: Server advertises its capabilities during initialization
- Tools: Implements the tool registration and execution protocol
- Resources: Implements the resource access protocol
- Error Handling: Uses standard error codes and formats
Security
This implementation follows MCP security guidelines:
- User Consent: Tools and resources require explicit invocation
- Data Privacy: No data is shared without explicit requests
- Tool Safety: Tool execution is controlled and validated
- Error Handling: Proper error reporting and handling
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
相关推荐
I find academic articles and books for research and literature reviews.
Evaluator for marketplace product descriptions, checks for relevancy and keyword stuffing.
Confidential guide on numerology and astrology, based of GG33 Public information
Emulating Dr. Jordan B. Peterson's style in providing life advice and insights.
Your go-to expert in the Rust ecosystem, specializing in precise code interpretation, up-to-date crate version checking, and in-depth source code analysis. I offer accurate, context-aware insights for all your Rust programming questions.
Advanced software engineer GPT that excels through nailing the basics.
Converts Figma frames into front-end code for various mobile frameworks.
Discover the most comprehensive and up-to-date collection of MCP servers in the market. This repository serves as a centralized hub, offering an extensive catalog of open-source and proprietary MCP servers, complete with features, documentation links, and contributors.
The all-in-one Desktop & Docker AI application with built-in RAG, AI agents, No-code agent builder, MCP compatibility, and more.
Micropython I2C-based manipulation of the MCP series GPIO expander, derived from Adafruit_MCP230xx
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
Mirror ofhttps://github.com/agentience/practices_mcp_server
🧑🚀 全世界最好的LLM资料总结(Agent框架、辅助编程、数据处理、模型训练、模型推理、o1 模型、MCP、小语言模型、视觉语言模型) | Summary of the world's best LLM resources.
Reviews

user_Ayaxq7Q1
As a devoted user of Alpaca MCP Server, I can confidently say it's an outstanding tool for managing multiple connections seamlessly. The intuitive interface and robust performance make it a top choice for anyone in need of reliable MCP server management. Highly recommend checking it out! You can learn more about it here: https://mcp.so/server/miguelyad26_alpaca-mcp-server/MCP-Mirror.