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.

Implementing a client

Implementing a client

Now that our server is in a good place we're going to shift gears a little bit and start working on our MCP client. The client can be found inside the MCP client.py file inside the root project directory. Now before we do anything inside this file I just want to give you a very quick reminder here. Remember what I told you about earlier. Usually in a typical project we are either making use of a client or we are implementing a server. It's just in this one particular project that we are working on that we are doing both. Again just so you can see both sides of the puzzle. Now the MCP client itself inside of this file is consisting of a single class. You'll notice there's a lot of code inside of here and it doesn't look quite as pretty as some of the code we just wrote out inside of the server. So let me tell you exactly what's going on inside this file and exactly why it is so large. Okay so inside this file we are making the MCP client class. This class is going to wrap up something…

Contents