Entz commited on
Commit
74be2dc
·
verified ·
1 Parent(s): d6c9677

Delete arithmetic_server.py

Browse files
Files changed (1) hide show
  1. arithmetic_server.py +0 -30
arithmetic_server.py DELETED
@@ -1,30 +0,0 @@
1
- from mcp.server.fastmcp import FastMCP
2
-
3
- # Creates a server named "Arithmetic"
4
- mcp = FastMCP("Arithmetic")
5
-
6
- @mcp.tool()
7
- def add(a: int, b: int) -> int:
8
- """Add two numbers"""
9
- return a + b
10
-
11
- @mcp.tool()
12
- def multiply(a: int, b: int) -> int:
13
- """Multiply two numbers"""
14
- return a * b
15
-
16
- @mcp.tool()
17
- def minus(a: int, b: int) -> int:
18
- """Subtract two numbers (a - b)"""
19
- return a - b
20
-
21
- @mcp.tool()
22
- def divide(a: int, b: int) -> float:
23
- """Divide two numbers (a / b). Returns a float. Raises ValueError on division by zero."""
24
- if b == 0:
25
- raise ValueError("Division by zero is not allowed.")
26
- return a / b
27
-
28
-
29
- if __name__ == "__main__":
30
- mcp.run(transport="stdio")