Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Build AI Agents and MCP Servers: Beginner to Expert
New

Build AI Agents and MCP Servers: Beginner to Expert

Learn AI models, agents, MCP and A2A in depth, and build a real AI incident-response team, step by step
Created byAnil Kumar
Last updated 11/2026
English

What you'll learn

  • Explain how AI models work: tokens, temperature, context windows, attention, embeddings and tool calling, with real runs
  • Build your own MCP server with tools, resources and prompts, test it with the MCP Inspector, and use it from a ready-made client
  • Build an AI agent in Python line by line: the agent loop, safe tool calls, a live log and memory within a token budget
  • Run remote MCP servers with FastAPI, with progress, notifications, sampling, elicitation, paging, a gateway and tests
  • Build a multi-agent team: specialists with their own MCP tools, a coordinator, hand-off contracts and second opinions
  • Connect agents across services with A2A, and lock your MCP server with OAuth-style tokens and scopes
  • Understand agent memory and RAG over MCP, tracing, evaluation with replays and gates, and security against prompt injection

Course content

11 sections • 54 lectures • 7h 46m total length
  • From Chatbots to AI Teams8:55
  • Five Words People Mix Up6:11
  • The Project and the Shop Lab5:44
  • Windows: Install WSL2 and Ubuntu5:39
  • Python, Node, Git, VS Code and Just Enough Vim7:42
  • Docker: Your First Container6:13
  • Get the Course Code and Connect a Model8:40

Requirements

  • Basic Python: functions, classes, running scripts, installing packages.
  • Basic terminal use: moving between folders and running commands.
  • A computer with Linux, or Windows 10/11 with WSL2 and Ubuntu
  • An OpenAI API key with a small amount of credit, or a free local model (qwen2.5:7b) through Ollama

Description

This course contains the use of artificial intelligence

Most agent tutorials stop at a chatbot that calls one tool. Real teams need more: agents that reach their systems through a standard, plan their work, work together, talk to agents run by other teams, and never change anything without the right permission.

In this course you build exactly that, from an empty folder: an AI incident-response team for Pinecrest Shop, an invented online store whose payments release has just broken checkout. Every idea you learn is added to that same project, in small pieces, and you watch it work on a real outage.

MCP is the spine of the course. You start with how AI models really work (tokens, temperature, context windows, embeddings, tool calling), then write your first agent line by line. Then you build your own MCP server from zero: tools, resources, prompts, the Inspector, a ready-made MCP client, and action tools with guardrails. You take it remote with FastAPI and add progress, notifications, sampling, elicitation, paging, a gateway and tests.

Then you build the team. A planning agent with task graphs, a budget, replanning and a critic. Specialist agents, each with only its own MCP tools, a coordinator, a shared notebook and hand-off contracts. Second opinions, and a person as the tie-breaker. Agents as separate services that find each other with A2A agent cards, send tasks, stream progress and survive a dropped connection. A trust gate that catches an agent that lies. And a lock on your MCP server: a token for every agent, and scopes so each one may do only its own job.

Finally, the ideas every production team needs. How agents remember past incidents with Postgres, pgvector and RAG over MCP. How to trace every step and debug a bad decision. How to evaluate a team with replays, scores and gates. And how to keep agents and MCP servers secure against poisoned tools and prompt injection.

Everything is real. Real models (gpt-4o-mini, and qwen2.5:7b running free on your own machine with Ollama), real MCP servers and clients, real runs. When a model gets something wrong, we keep it and learn from it. The code of every lecture is in its own folder, so you can join at any point. Every package and tool we install is open source.

How it is taught. Face to face and step by step: every new word is explained, every code file is opened and read line by line, and every command is explained part by part before it runs.

What you need. Basic Python and a terminal. Section 1 sets up Linux, or Windows with WSL, plus Python, Node, Git, Docker and a model, step by step.

By the end, you will be able to build AI agents and your own MCP servers, run a team of agents across services, and decide who may do what, with real code you can keep growing.


What you'll learn

Eight objectives for the "What you'll learn" box; each is under Udemy's 160-character limit.

  1. Explain how AI models work: tokens, temperature, context windows, attention, embeddings and tool calling, with real runs

  2. Build an AI agent in Python line by line: the agent loop, safe tool calls, a live log and memory within a token budget

  3. Build your own MCP server with tools, resources and prompts, test it with the MCP Inspector, and use it from a ready-made client

  4. Run remote MCP servers with FastAPI, with progress, notifications, sampling, elicitation, paging, a gateway and tests

  5. Build planning agents with goals, task graphs, a budget, replanning and a critic that checks the answer

  6. Build a multi-agent team: specialists with their own MCP tools, a coordinator, hand-off contracts and second opinions

  7. Connect agents across services with A2A, and lock your MCP server with OAuth-style tokens and scopes

  8. Understand agent memory and RAG over MCP, tracing, evaluation with replays and gates, and security against prompt injection


Requirements and audience

Requirements

  • Basic Python: functions, classes, running scripts, installing packages.

  • Basic terminal use: moving between folders and running commands.

  • A computer with Linux, or Windows 10/11 with WSL2 and Ubuntu (set up step by step in Lecture 1.4); Python 3.10 or newer, Node 22, Git and Docker (Lectures 1.5 and 1.6).

  • An OpenAI API key with a small amount of credit, or a free local model (qwen2.5:7b) through Ollama.

  • No GPU, cloud account, or prior AI, agent or MCP experience needed.

Who this course is for

  • Python developers who want to build AI agents that work beyond a demo.

  • Developers who want to build their own MCP servers and clients, not only use other people's.

  • Engineering students who want to learn real AI use cases by reading and running real code.

  • Working professionals moving from chatbots to agents, teams of agents and agents that talk across services.

  • Platform, SRE and DevOps engineers curious how an AI team could investigate and fix an outage safely.


Who this course is for:

  • Python developers who want to build AI agents that work beyond a demo.
  • Developers who want to build their own MCP servers and clients, not only use other people's.
  • Engineering students who want to learn real AI use cases by reading and running real code.
  • An OpenAI API key with a small amount of credit, or a free local model (qwen2.5:7b) through Ollama (Lecture 1.7).
  • Working professionals moving from chatbots to agents, teams of agents and agents that talk across services
  • Platform, SRE and DevOps engineers curious how an AI team could investigate and fix an outage safely.