Building a Currency Converter MCP Server
Time to begin building your first MCP server! Here, you'll define an MCP server called 'Currency Converter' that consists of a single tool called convert_currency() to convert monetary values between different currencies.
This tool should take amount, from_currency, and to_currency parameters, and return a string containing the amount converted into the desired currency, along with the exchange rate used.
For example, 100 EUR = 88.04 GBP (Rate: 0.8804).
Este ejercicio forma parte del curso
Introduction to Model Context Protocol (MCP)
Ejercicio interactivo práctico
Prueba este ejercicio y completa el código de muestra.
# Create an MCP server instance
mcp = ____("____")