3Build the client

Prompts in the client

2 min read384 words

Time: 15–20 minutes

In this exercise you will finish the MCP client by implementing list_prompts and get_prompt, then test the full prompt workflow end to end using the /format command.

Step 1Implement list_prompts()

Add a list_prompts method to your MCP client class in mcp_client.py. It should call self.session().list_prompts() and return the prompts attribute from the result.

1 / 4

You've built a complete MCP client that supports tools, resources, and prompts — the full set of MCP primitives.