Free Python for AI course
Learn Python from your first line of code to your first call to a language model, with nothing to install.
Build a Model Context Protocol client and server, then verify the integration with a compatible host.
MCP exposes descriptions and schemas for capabilities through a common protocol. A host and server still need to validate arguments, enforce authorization, and obtain confirmation for consequential writes.
A fresh client discovers the campaign tools, resource, and prompt.
A report read uses caller scope. A note asks the host for explicit confirmation.
An accepted authorized note appears once. A denied note leaves no new state.
A fresh client discovers the campaign tools, resource, and prompt.
A report read uses caller scope. A note asks the host for explicit confirmation.
An accepted authorized note appears once. A denied note leaves no new state.
Given A fresh client discovers the campaign tools, resource, and prompt. and An accepted authorized note appears once. A denied note leaves no new state., write down the missing step that connects them.
A report read uses caller scope. A note asks the host for explicit confirmation.
Now take A report read uses caller scope. A note asks the host for explicit confirmation. and the result above. Write an input and an implementation that could produce this trace.
A fresh client discovers the campaign tools, resource, and prompt.. Check that your implementation produces the result shown above.
A reviewer can read reports and the write tool is listed. What should happen when they request a review note?
The server should deny the write before asking for confirmation. Discovering that a capability exists gives the reviewer no additional permissions.
The client finds read_report and add_review_note.
The client reads report R with a user who can review only R.
The model asks to add a review note to report S.
Which check matters even after the human taps Confirm? Name the state observation you would capture.
The server still checks authorization for report S. Compare S’s note list before and after the denied call and retain the decision trace independently of the model response.
Discovery tells the host what the server offers. Caller permissions determine which effects may happen. Confirmation records an explicit choice on one consequential action.
Use the starter client on local stdio and Streamable HTTP. Compare a successful report read, an authorized note without confirmation, and a confirmed note with the right role.
Record request IDs, identity source, policy decisions, and the count of stored notes. A denied or unconfirmed write leaves the count unchanged. A replay of the confirmed operation adds no duplicate.
Turn off the campaign API while leaving MCP connected. Capture the precise failure the client observes and a clean recovery trace after the API returns.
Pass an initialize request with a JSON-RPC ID to a toy version negotiation. Preserve the ID, then let the client decide whether it supports the server's chosen version.
Run the starter, predict the changed result, and then edit and run it again.
Set the client's only supported version to academy-v1. Predict whether it now continues and whether the response ID changes.
client_version = "academy-v0" request = {"jsonrpc": "2.0", "id": 9, "method": "initialize", "params": {"protocolVersion": client_version}} response = {"id": request["id"], "result": {"protocolVersion": "academy-v1"}} chosen = response["result"]["protocolVersion"] state = "continue on" if chosen == client_version else "stopped at" print(f"ID {response['id']} | {state} {chosen}")
Starter output
ID 9 | stopped at academy-v1
Changed output
ID 9 | continue on academy-v1
A well-formed response with the matching ID still cannot make an unsupported protocol version usable. End the handshake in the unsupported case.
Take the changed output into the next lesson and explain which part of the handoff the next lesson needs.
Begin with Model Context Protocol. Each lesson offers these practice modes and a saved handoff.
Connect an MCP server to the campaign API and exercise its report tool using a fresh client.
Use the campaign service starter from Software Lab. Follow each stage, collect the evidence, then move to the independent brief.
MCP clients, servers, tools, resources, prompts, transports, authorization, and testing.
One is free with no account, and a free account opens the rest.
Some lessons here build on earlier ones in the academy. The placement test can mark off what you already know, and you can open any of them first:
New to Python? Start with the free Python for AI course.
Finish every lesson and get staff approval on “Connect a scoped support integration” in My projects to earn the course certificate. The course ends with its own checkpoint, 12 questions the academy's server draws and marks itself. Pass it to verify the certificate and count lessons you skipped in the placement test.
Yes. There's nothing to pay, here or anywhere in the academy. A free account saves your progress and issues your certificate.
The lessons run in your browser. The downloadable service project uses a local Python environment.
About 11.5 hours in all, at your own pace. Your progress stays where you left it.
You completed the course and passed a staff-reviewed independent project, “Connect a scoped support integration”. See My projects for the brief, evidence requirements, and submission.
Or take the whole course: 575 lessons, from your first line of Python to production AI.
Learn Python from your first line of code to your first call to a language model, with nothing to install.
Learn to write prompts that work reliably, then test them like an engineer: clear instructions, examples, structured output, chains, evals and defenses against prompt injection.
Build retrieval-augmented generation step by step: embeddings, chunking, vector search, grounded answers with sources, and the measurements that tell you whether it works.
Learn how to build AI agents by building one: tools, the agent loop, MCP, permissions, context management and evals, ending with a coding agent that stops when its tests pass.
Go from counting letter pairs to a small GPT you train yourself: tokenizers, attention, transformer blocks and the GPT architecture, written line by line.
Go from your first line of code to working as a Python developer: projects, testing, data, databases, web apps and APIs, all in your browser.
Follow one prompt, "The cat sat", through a language model with every number shown: tokens to IDs, embeddings and positional waves, the attention matrix, the feed-forward layer, and the probability over the next word.
Confident wrong answers, miscounted letters, copying from the prompt, temperature, long prompts that dilute, and a model that never says "I don't know": each behavior reproduced on a tiny GPT with every number printed by code, then the mechanism behind it and the Phase 1 technique it justifies.
Read a model's weights, change them by hand and judge an edit someone else made: deltas, merging, low-rank edits, directions and fact edits on a tiny GPT in your browser. Then replay recorded sessions of an LLM reading, fixing and writing weights, check the published edit of a real open model, and ship a model of your own with its patch, verdict and card. Every number is printed by the lesson's own code, and the method's limits are taught with it.
Take a model from a notebook to a system that stays right: track and reproduce every run, search settings honestly, version data and models, promote through gates, keep training and serving in step, choose batch or online, catch drift, and retrain through a pipeline. Every number is measured by the lesson's own code.
Learn the math behind AI from arithmetic up: numbers, algebra, vectors and matrices, calculus, probability and statistics, each shown as numbers moving and checked in Python, ending with a network you build and train from the formulas.
Learn to make any letter of any formula the subject: layers undone in reverse order, fractions, a letter that appears twice, powers, roots, quadratics, logs, inequalities, trigonometry, vectors, matrices, calculus, probability, statistics and the formulas inside AI models, each checked in Python.
Design, test, deploy, and operate an HTTP API that another engineer can use.
Build a bounded run loop, test it with scripted model responses, and recover interrupted work from an event log.
Never trained an AI? Teach a small one to write, right in your browser. It takes about 20 seconds and needs no account. Teach it to write
A free account saves your progress across devices and issues your certificate when you finish.