Mirage Academy · Course · Advanced · MCP

MCP course: build tools and integrations for AI agents

Aimed at engineers and technical product people working on AI features. You build an MCP server step by step, connect an agent to it and make it safe with scopes, least privilege and tests. The capstone is a business capability server with a connected agent.

Open the courseSee what you build

The course

Expose useful business capabilities to an AI agent, safely

Watch the short intro, then see what the first six chapters teach.

Still from the intro video for the course MCP: Building Tools and Integrations for AI Agents
Intro video, 1 min 12 s. Transcript below.
Read the transcript

You want an AI agent to do real work in your business, but every custom integration is fragile and hard to secure. This course shows you how to expose those capabilities through MCP, safely. Start with the shape of MCP. The host runs the agent. Its client speaks to your server over stdio or streamable HTTP. The server exposes tools, resources and prompts, and returns results the agent can use. Then you make it safe. A vague tool gets a clear name and schema. Broad access becomes least privilege. Untrusted text is treated as possible injection. And every change is tested and versioned. The course ends with a capstone: a business capability server with a connected agent. You build it chapter by chapter, from transports to testing. If that is the agent you need, enroll and start with chapter one.

Open the course: MCP: Building Tools and Integrations for AI Agents

What you learn

  1. 01

    What MCP is: hosts, clients, servers and the messages between them

    Starts with: Why MCP Exists and the Three Roles

  2. 02

    Tools: names, schemas and results an agent can use

    Starts with: Names and descriptions

  3. 03

    Resources and prompts

    Starts with: Resources and URIs

  4. 04

    Transports: stdio and streamable HTTP

    Starts with: stdio framing

  5. 05

    Building a server step by step

    Starts with: The skeleton

  6. 06

    Building a client and connecting an agent

    Starts with: The host loop

The course intro video with a play button, and under it six tiles, one per outcome of the course. Each tile shows the first lesson of its chapter.

What you build

The capstone server has four layers, from the transport inward

Seen from the outside in, the server you build in the capstone has these layers. Each one is taught in its own chapter.

  1. Transport

    Chapter 4

    stdio or streamable HTTP carries the messages between client and server.

  2. Authorization

    Chapter 7

    Tokens and scopes decide what a caller may do.

  3. Tool surface

    Chapter 2 and 3

    Tools, resources and prompts with names, schemas and results an agent can use.

  4. Business capability

    Chapter 10

    The function of your business that the agent needs. The capstone builds one.

Four concentric rings, outermost first: transport, authorization, the tool surface and the business capability in the middle. Beside them the same four layers as a list with their chapters.

Model Context Protocol explained: one tool call, step by step →

Tools

Chapter 2 covers five parts of a tool

A tool is what an agent calls. The five lessons of the chapter are the five rows below.

Field · Example valueIllustration written for this page

  1. name, descriptionget_invoice, Fetch one invoice by number

    Names and descriptions

    Row 1: name, description.

  2. inputSchemainvoiceId: string (required)

    Input schemas

    Row 2: inputSchema.

  3. resulttext, structured or linked content

    Results: text, structured, linked

    Row 3: result.

  4. isErrora flag in the result

    Two kinds of error

    Row 4: isError.

  5. annotationsreadOnlyHint: true

    Annotations, handles, safety

    Row 5: annotations.

A tool definition as five rows. Each row shows a field of the tool, an example value and the lesson of chapter 2 that teaches it.

Transports

Two transports carry the messages

Chapter 4 teaches stdio and streamable HTTP, and how to choose between them.

stdio

The host starts your server as its own process, and the two exchange messages over standard input and output.

Streamable HTTP

Your server runs at an address, and clients send their messages to it over HTTP.

Two drawings. In the first a host and a server process sit inside one machine, joined by a pipe. In the second a client reaches a server across a network at an address.
  • The chapter also covers stdio framing and lifecycle, headers and validation.

Authorization and security

A token's scopes decide which tools an agent can call

Chapters 7 and 8 cover authorization, scopes and least privilege. This example shows the rule on a small invoice server. Pick a task and switch the scopes.

Example: an invoice server with four tools

Illustration written for this page
Task the agent is asked to do
Scopes on the token

Tools of the server

  • get_invoiceReadsinvoices:readNeeded by the taskCallable
  • list_customersReadscustomers:readRefused
  • send_reminderWritesinvoices:writeRefused
  • issue_refundWritespayments:writeRefused

VerdictWorks with exactly the scopes the task needs.

The rule: a tool is callable only if the token carries its scope. A task works when every tool it calls is callable. Scopes the task does not use are extra, and removing them is least privilege.

Works with exactly the scopes the task needs.

  • Scopes and step-up

    A token carries scopes, and a task that needs more asks for more.

  • Least privilege

    Give a token only what the task needs.

  • Poisoned descriptions and results

    Treat text that comes from a tool as untrusted.

  • More attacks to know

    The security chapter also covers rug pulls, shadowing, confused deputy and SSRF.

A task, four scopes and four tools. A tool is callable only when its scope is switched on. The verdict says whether the task is blocked, works with extra scopes or works with exactly what it needs.

Testing and operating

Five lessons keep a server correct over time

Chapter 9 covers testing, versioning and operating MCP servers.

Example cases

A test sendsThe server gives
A valid call with every fieldA result the agent can use
A call with a required field missingA refusal with an error
A value at the edge of its rangeThe same answer every time
A tool whose schema changedA new version, announced to clients
  1. Contract tests

    Lesson 1 of chapter 9.

  2. Negative and boundary tests

    Lesson 2 of chapter 9.

  3. Versioning tool changes

    Lesson 3 of chapter 9.

  4. Eras and compatibility

    Lesson 4 of chapter 9.

  5. Operating

    Lesson 5 of chapter 9.

A table of four example test cases against a tool, each with what the server must give back, and the five lessons of chapter 9 beside it.

The path

Ten chapters in four phases, ending in a capstone

Five lessons per chapter. The first lesson of each chapter is printed under its name.

  1. 01Understand

    1. Chapter 1

      What MCP is

      Why MCP Exists and the Three Roles

    2. Chapter 2

      Tools

      Names and descriptions

    3. Chapter 3

      Resources and prompts

      Resources and URIs

  2. 02Build

    1. Chapter 4

      Transports

      stdio framing

    2. Chapter 5

      Building a server

      The skeleton

    3. Chapter 6

      Building a client

      The host loop

  3. 03Secure

    1. Chapter 7

      Authorization

      When it applies

    2. Chapter 8

      Security

      Poisoned descriptions and results

  4. 04Ship

    1. Chapter 9

      Testing and versioning

      Contract tests

    2. Capstone

      Capstone: a business capability server with a connected agent

      Specify, build, test, connect and trace, review and release.

Open the course: MCP: Building Tools and Integrations for AI Agents
Four columns: understand with chapters 1 to 3, build with chapters 4 to 6, secure with chapters 7 and 8, ship with chapters 9 and 10. The capstone closes the last column.

Sibling course: AI-assisted software development →

How you learn it

Lessons, coaching and a certificate in this course

Three things come with the course: lessons, an AI coach and a certificate.

  • Lessons

    Each lesson pairs a short visual explanation with questions, a task and a quiz.

  • AI coach

    The Academy's AI coach asks follow-up questions while you explain what you learned out loud. It is an AI.

  • Certificate

    This course comes with a certificate. The Academy says it is Mirage's own statement, not a state-recognized degree.

Three rows: a lesson with questions, a task and a quiz, the AI coach, and the certificate with a dotted seal.

Questions about building MCP servers

  • What is the MCP tools and integrations course?

    It is an Advanced course with ten chapters on building an MCP server that exposes business capabilities to an AI agent, safely. The last chapter is a capstone.

  • Who is the course for?

    Engineers and technical product people working on AI features. The course is listed at Advanced level.

  • What does the capstone server do?

    You build a business capability server with a connected agent. The five lessons are specify, build, test, connect and trace, and review and release.

  • How is this course different from your Model Context Protocol page?

    That page explains one tool call step by step and the limits the Academy sets for recorded MCP calls. This page describes the course: ten chapters on building servers and clients.

  • Which transports does the course cover?

    Two: stdio and streamable HTTP. Chapter 4 also covers stdio framing and lifecycle, headers and validation, and choosing a transport.

  • Does the course cover security?

    Yes. Chapter 7 covers authorization and permissions, and chapter 8 covers tool poisoning, injection and least privilege.

  • Which course should I take before or after this one?

    The AI-assisted software development course teaches how to work with coding agents. Its page is linked in the path section above.