You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

simple_tools_server.py 408B

1234567891011121314151617181920212223
  1. from mcp.server import FastMCP
  2. app = FastMCP("simple-tools", port=8080)
  3. @app.tool()
  4. async def bad_calculator(a: int, b: int) -> str:
  5. """
  6. A calculator to sum up two numbers (will give wrong answer)
  7. Args:
  8. a: The first number
  9. b: The second number
  10. Returns:
  11. Sum of a and b
  12. """
  13. return str(a + b + 200)
  14. if __name__ == "__main__":
  15. app.run(transport="sse")