MCP · Lesson 116 of 120
Cheat Sheet: Clients
The essentials.
And here's the client side, on one page. Everything a host needs to use any server.

- One page
- Client essentials
- Any server
Client cheat sheet
Connect with client, using a server object, standard IO parameters, or a URL. List and call tools. Read resources, and get prompts. Check is error on results. And pass callbacks for elicitation and progress.
| Task | Code |
|---|---|
| Connect | async with Client(server or url) as c |
| Tools | c.list_tools(), c.call_tool(name, args) |
| Resources | c.read_resource(uri) |
| Prompts | c.get_prompt(name, args) |
| Errors | result.is_error |
| Callbacks | elicitation_callback, progress_callback |
Client habits
Use one client per server. Give the model only the tools it needs. Pass tool errors back to the model. And always let the user approve risky actions.
| key | value |
|---|---|
| Servers | one client each |
| Tools | only what's needed |
| Errors | back to the model |
| Risky actions | user approves |
Summary
Connect, list, call, read, and check is error. Next, common mistakes.
Key takeaways- Client(...)
- call_tool
- is_error
Next up: Common Mistakes — and fixes