Skip to main content

Free course

Model Context Protocol: Advanced Topics

Intermediate3 hr

Go beyond MCP basics with sampling, notifications, roots, and the STDIO and StreamableHTTP transports in Python.

Python3 hr10 videos32 Exercises2,000 XP1,070Statement of accomplishment

Create Your Free Account

Continue with Google
or
By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.

Loved by learners at thousands of companies

Training a Team?

Try for Business

Course Description

You've built an MCP server that exposes a few tools - now it's time to make it behave like the ones running in production. Advanced MCP is where servers delegate work to clients, report on what they're doing, respect filesystem boundaries, and talk to clients across very different transports.

Master Core MCP Features

Start with sampling, which lets a server hand a prompt back to the client's language model instead of holding its own API key. Then stream log and progress notifications so learners watching a 30-second tool call can see it working, and use roots to define exactly which files and folders a server is allowed to touch - a boundary the SDK leaves you to enforce yourself.

Understand How Clients and Servers Talk

Go to the wire level and see what actually crosses the connection. You'll hand-write JSON-RPC requests and notifications, tell the two apart by their id field, and follow the initialization handshake message by message.

Compare the STDIO and StreamableHTTP Transports

Learn why a STDIO server only works on one machine, how the StreamableHTTP transport uses a long-lived Server-Sent Events stream to push messages back to the client, and what the stateless_http and json_response flags trade away. By the end, you'll know which transport fits a local tool versus a remote, load-balanced deployment - and why.

Feels like what you want to learn?

Start Course for Free

What you'll learn

  • Determine how to use sampling so an MCP server can delegate language-model calls to the connected client instead of holding its own API key.
  • Differentiate log notifications from progress notifications, and recognize when a long-running tool should send each.
  • Identify how roots define the filesystem boundaries a server may access, and why the server must enforce them itself.
  • Differentiate MCP requests from one-way notifications by their JSON-RPC structure, and order the messages of the initialization handshake.
  • Assess when to use the STDIO versus the StreamableHTTP transport, and evaluate how the stateless_http and json_response flags affect server-to-client features.

Prerequisites

Curriculum

Course outline

1

Core MCP features

Discover the advanced features that separate a toy MCP server from a production one. You'll use sampling to borrow the client's language model, stream log and progress notifications from a slow tool so users see it working, and enforce roots so a server only ever touches the files it was granted.
Start Chapter

Model Context Protocol: Advanced Topics

Course
Complete

Earn Statement of Accomplishment

Enroll Now

Grow your data skills with DataCamp for Mobile

Make progress on the go with our mobile courses and daily 5-minute coding challenges.