Back to Challenges

Calculator Tool

Build ServerBeginner

Build a calculator MCP server with basic math operations.

What You'll Learn
  • • Working with numeric parameters using Zod schemas
  • • Returning error states with isError: true
  • • Creating multiple related tools in one server
Calculator MCP Server
Calculator Server

Basic math operations

Loading...
🌟 Bonus Challenge

Extend the calculator with these additional tools:

  • power - Calculate a^b
  • sqrt - Square root
  • modulo - Remainder after division