
This course contains the use of artificial intelligence.
AI assistants like Claude become far more useful when they can reach your own code and data. The Model Context Protocol (MCP) is the open standard that makes this possible: you write a small server, and any MCP host can discover what it offers and use it. In this course you build those servers yourself, in Python, one step at a time.
You start with the big picture: how a host, a client, and a server fit together, and the three kinds of capability a server can offer. Tools are actions, like converting a value or looking something up. Resources are readable data at an address. Prompts are reusable message templates a person can pick. Then you set up Python 3.11 and the official MCP package on your Mac, and build and call your first server.
From there, the coding lessons type and run real code on screen, so you see the server code and the client output side by side. You shape tool schemas with type hints, defaults, and descriptions, return structured results, publish fixed and templated resources, and render prompts with arguments. You write async handlers, read a resource from inside a tool, return clear errors, and check your server's behavior with assertions through a client.
The later sections show how servers connect to the outside world: the stdio and Streamable HTTP transports, the connection handshake, and registering your server in Claude Code and a desktop host. The final section is about trust: treating content as untrusted, giving tools only the access they need, validating input, allowlisting names, and keeping results small.