Chapter 2 Exercises

These hands-on exercises will solidify your understanding of MCP server development with the PMCP SDK.

Exercises

  1. Your First MCP Server ⭐ Beginner (20 min)

    • Create an MCP server with a simple "greet" tool
    • Learn the builder pattern and typed inputs
  2. The Calculator Tool ⭐ Beginner (25 min)

    • Build a calculator with multiple operations
    • Implement proper error handling for edge cases
  3. Code Review Challenge ⭐ Beginner (20 min)

    • Review code for bugs, security issues, and anti-patterns
    • Practice systematic code review techniques

Next Steps

After completing these exercises, continue to: