BaşlayınÜcretsiz Başlayın

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).

Bu egzersiz

Introduction to Model Context Protocol (MCP)

kursunun bir parçasıdır
Kursu Görüntüle

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Create an MCP server instance
mcp = ____("____")
Kodu Düzenle ve Çalıştır