File tree Expand file tree Collapse file tree 3 files changed +320
-87
lines changed Expand file tree Collapse file tree 3 files changed +320
-87
lines changed Original file line number Diff line number Diff line change 11# MCP Calculator Server
22
3- A Model Context Protocol (MCP) server that provides calculator functionality.
3+ A Model Context Protocol (MCP) server that provides calculator functionality with robust mathematical operations .
44
55## Features
66
77### Tools
8- - ** calculate** : Mathematical operations with proper operator precedence
8+ - ** calculate** : Mathematical operations with proper operator precedence, parentheses support, and scientific notation
99- ** random_number** : Generate random numbers within specified ranges
1010
1111### Resources
@@ -26,10 +26,18 @@ A Model Context Protocol (MCP) server that provides calculator functionality.
2626
2727## Usage
2828
29- ``` sh
29+ ``` bash
30+ # Install
3031go install github.com/yinebebt/mcp-calculator-server@latest
3132
32- TRANSPORT=stdio ./mcp-calculator-server
33+ # Run with stdio
34+ TRANSPORT=stdio mcp-calculator-server
35+
36+ # Run with HTTP
37+ mcp-calculator-server
38+
39+ # Test
40+ go test
3341```
3442
3543### MCP Client Configuration
@@ -42,4 +50,11 @@ For testing with MCP Client:
4250 "TRANSPORT" : " stdio"
4351 }
4452}
45- ```
53+ ```
54+
55+ ## Mathematical Features
56+
57+ - ** Operator precedence** : ` 2+3*4 = 14 `
58+ - ** Parentheses** : ` (2+3)*4 = 20 `
59+ - ** Scientific notation** : ` 1e2 = 100 `
60+ - ** Error detection** : Division by zero, invalid syntax, unmatched parentheses
You can’t perform that action at this time.
0 commit comments