1. 学习
  2. /
  3. 课程
  4. /
  5. Introduction to Model Context Protocol (MCP)

Connected

练习

Listing Resources from the Client

Your server has been written to the file currency_server.py, and is now ready to connect to! To start with, create a client that can list the resources available on this server.

说明

100 XP
  • Inside the server session context, retrieve the available resources.
  • Loop through response.resources and print each resource's URI, name, and description using their attributes.