Chapter 2 Exercises
These hands-on exercises will solidify your understanding of MCP server development with the PMCP SDK.
Exercises
-
Your First MCP Server ⭐ Beginner (20 min)
- Create an MCP server with a simple "greet" tool
- Learn the builder pattern and typed inputs
-
The Calculator Tool ⭐ Beginner (25 min)
- Build a calculator with multiple operations
- Implement proper error handling for edge cases
-
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:
- Testing with MCP Inspector - Debug and test your servers
- Database MCP Servers - Connect to real data sources