Knowledge BaseAdvanced

Securing AI Agents and MCP

In about sixteen hours you learn what changes when a language model stops answering and starts acting. You run TripDesk, a small practice agent with its own MCP servers, watch it leak a made-up canary, then add the controls one by one: authorization, narrow tools, approval gates, a sandbox, pins, logs, and a red-team suite. Everything stays defensive.

Recommended first: AI and LLM Security Fundamentals, plus Linux Fundamentals and Web Application Security.

CHF 35

Lesson 01 is free to try. Create an account to save your progress and to get the full course.

  • Certificate with a checkable ID
  • Lesson 01 is free to try
A hexagonal hub drawn in thin glowing lines stands for the agent, with a small loop arrow circling inside it for the agent loop. Four spokes run from the hub to four small rounded tool tiles: a document with a folded corner for files, a cloud for weather, a calendar page with a cross mark for bookings, and an envelope for messages. The spoke to the cloud is dotted and carries a small bright violet dot halfway, a poisoned tool definition traveling to the hub. A shield with a green check mark stands in front of the hub's lower right edge. A faint dotted rectangle around the hub and tiles marks the sandbox boundary, and three short stacked lines with a dot at the end of each sit top left as a log.
-lessons
-modules with badges
-reading and labs
-hands-on labs
1final exam + certificate

How it works

Every lesson ends with a short checkpoint quiz. Pass it (4 of 5) and the next lesson unlocks. Finish every lesson of a module to earn its badge. Pick a pace and the timeline below gives each lesson a due date, so you always know whether you are on track.

Your pace

Your plan

What you need

One computer with Python, the free TripDesk lab kit, and a notebook. Every lab runs on your own machine against your own practice agent, never against an agent, assistant, or MCP server you do not own.

A computer with Python

Python 3.10 or newer on Linux, macOS, or Windows with WSL (the labs were tested on Linux with Python 3.10.12 and 3.12.15), a terminal, a text editor, and jq for the log lessons (sudo apt install -y jq). Docker for lessons 18, 20, and 24 (optional in lesson 8), and Node.js or Docker for the MCP Inspector in lesson 8.

The TripDesk lab kit

Download tripdesk-lab.zip (39 entries, SHA-256 a17568a0abeab8fa782d4a489e543d53eef27e79a40c21959851e1dcd2468802). Lesson 4 checks the hash, unpacks it to ~/agentlab/, and installs the official Python SDK with pip install "mcp[cli]==2.3.0". Every lab runs with the repeatable mock model (MOCK=1), so no account, API key, or GPU is needed. Optional: Ollama with qwen2.5:0.5b from AI and LLM Security Fundamentals, to compare a real small model with the mock.

An agent security log

A notebook, on paper or in a file. From lesson 1 on it is your agent security log: tools, threats, test results, policies, and pins collect there and come together in the capstone's go or no-go decision.

Modules and badges

6 modules. Each badge lights up when you pass every lesson in its module, and every badge you earn is printed on your certificate.

The journey

Modules in order. Green is done, blue is where you are, amber is behind your plan, gray is still locked.

Glossary

- terms used in this course. In the lessons, underlined words show their definition when you tap or focus them.