From the course: Claude with Amazon Bedrock by Anthropic
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Accessing resources
From the course: Claude with Amazon Bedrock by Anthropic
Accessing resources
We have defined two separate resources inside of our MCP server. So now our client needs the ability to request these resources. To do so, we're going to add in a single function inside of our MCP client. And remember, this MCP client is going to have some functionality that we're putting together that is going to be used by the rest of our application. And I've already put together that code already. So somewhere else inside this project, something is going to try to make use of this function that we're about to add into the MCP client. To get started I'm going to open up the MCP client file again. I'm going to scroll down and find read resource right here. So our goal inside here is to read a particular resource by making a request off to our MCP server and then parse the contents that come back depending upon its MIME type and then just return whatever data we get. So you'll notice that a argument to it is the URI. This is going to be the URI of the resource that we want to fetch…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
(Locked)
Introducing MCP4m 40s
-
(Locked)
MCP clients4m 56s
-
(Locked)
Project setup3m 24s
-
(Locked)
Defining tools with MCP7m 3s
-
(Locked)
The MCP Inspector3m 52s
-
(Locked)
Implementing a client8m 56s
-
(Locked)
Defining resources9m 45s
-
(Locked)
Accessing resources4m 38s
-
(Locked)
Defining prompts7m 45s
-
(Locked)
Prompts in the client3m 1s
-
(Locked)
MCP review4m 12s
-
(Locked)
-
-