30% OFF - Use code HANDSON30 for 30% off any course or Dometrain Pro! Browse courses →
  • Courses
  • Learning Paths
  • Blogs
  • Authors
  • Leaderboard
  • Dometrain Pro
  • Shopping Basket

    Your basket is empty

  • Business Portal
  • Getting Started: Model Context Protocol (MCP)

    Learn the fundamentals of MCP, the open standard for connecting AI assistants to external tools, data sources, and APIs.

    About This Course

    Most developers are still glueing AI applications together with brittle prompt engineering and fragile workarounds. This course teaches you how to move beyond that by designing and shipping production-ready AI applications using the Model Context Protocol (MCP) in C#. You'll build both an MCP Server and an MCP Client from scratch, connect them over StreamableHTTP, and integrate them into a working AI agent powered by OpenAI. Along the way, you'll tackle real-world concerns like authentication with Microsoft Entra ID, secure tool design, trust boundaries, resource exposure, orchestration, and deployment to Azure. By the end, you won't just understand the MCP spec. You'll know how to use it to build secure, maintainable, distributed AI systems that are ready for production.

    Course Curriculum

    6h 11m 9 sections
    Welcome
    02:07 Free preview
    What will you learn in this course?
    02:21 Free preview
    Who is the course for and prerequisites
    01:54 Free preview
    The Problem With Prompt-Centric Systems
    06:31
    MCP in Distributed AI Systems
    04:51
    What Is An MCP Server
    04:55
    Local vs Remote MCP Servers
    09:04
    What MCP Doesn’t Solve
    04:30
    MCP Primitives (Tools, Prompts, Resources)
    03:19
    Hosts, Clients and Servers
    05:01
    The Request & Response Flow
    05:37
    MCP Lifecycle
    04:19
    The StreamableHTTP Transport
    04:45
    MCP Helper Libraries for .NET
    02:04
    Functional Testing in MCP Inspector
    05:32
    C# MCP Server with stdio
    09:48
    C# MCP Server with Streamable HTTP
    09:08
    Adding Database MCP Tools
    23:33
    Tools vs Skills in Modern Agents
    06:25
    What an MCP Client Is Responsible For
    02:21
    When to Build Your Own Client vs Reuse One
    02:41
    Agent Design with Microsoft Agent Framework
    08:03
    Creating a Basic Chat Agent in .NET
    32:11
    Connecting Your MCP Server
    29:23
    Context vs State vs Memory
    08:37
    Why Security Is Harder with MCP
    07:46
    Defining Trust Boundaries in MCP Systems
    07:50
    Adding Entra ID to the MCP Server
    17:05
    Creating Tokens & Testing Authentication
    08:45
    Read vs Write Tools
    06:58
    Setting Up Entra ID For OBO Flow
    09:21
    Adding Authentication To The MCP Client
    26:38
    Making Model Friendly Tools
    05:14
    Schema Design That Models Handle Well
    06:06
    Naming, Discoverability & Documentation
    09:38
    Adding some more tools into the server
    12:57
    What MCP Resources Are For
    02:24
    Choosing Resources vs Tools
    04:56
    Dynamic and Computed Resources
    02:47
    Adding MCP Resources into the server
    14:05
    From Local Tool to Production Service
    01:40
    Deployment Models for MCP Servers
    05:44
    Deploying To Azure With Docker
    13:58
    Distribution Channels for MCP Servers
    07:25

    Meet Your Instructor

    James Charlesworth

    James Charlesworth

    James is a Director of Engineering, O'Reilly author, speaker, and YouTuber with 20 years of experience in the tech industry. He has worked across startups and publicly listed tech companies, helping to build and scale software products. James focuses on teaching product skills to engineers, building high-performing product engineering teams, and defining the "Product Engineer" career path. He shares practical advice on software engineering, product development, and career growth through his Train to Code YouTube channel.

    View all courses by James Charlesworth

    What's New

    Getting Started: Model Context Protocol (MCP)
    course

    Getting Started: Model Context Protocol (MCP)

    Learn how to get started with the Model Context Protocol (MCP) and integrate it into your applications.

    Learn more about Getting Started: Model Context Protocol (MCP)
    Hands-On: Learn TypeScript
    course

    Hands-On: Learn TypeScript

    Learn TypeScript through hands-on coding exercises. Practice what you learn with interactive challenges designed for every level.

    Learn more about Hands-On: Learn TypeScript
    Hands-On: Learn JavaScript
    course

    Hands-On: Learn JavaScript

    Learn JavaScript through hands-on coding exercises. Practice what you learn with interactive challenges designed for every level.

    Learn more about Hands-On: Learn JavaScript
    Hands-On: Data Structures & Algorithms in C#
    course

    Hands-On: Data Structures & Algorithms in C#

    Master data structures and algorithms through hands-on coding exercises in C#. Free to enroll for 7 days!

    Learn more about Hands-On: Data Structures & Algorithms in C#
    Blogsmith.ai
    feature

    Blogsmith.ai

    Turn your videos into blogs and newsletters with AI. Check out our new product at blogsmith.ai.

    Learn more about Blogsmith.ai
    Leaderboard
    feature

    Leaderboard

    See how you stack up against other learners. Track your progress, climb the ranks, and compete with the Dometrain community.

    Learn more about Leaderboard
    Hands-On: Learn PostgreSQL
    course

    Hands-On: Learn PostgreSQL

    Learn PostgreSQL through hands-on coding exercises. Practice what you learn with interactive challenges designed for every level.

    Learn more about Hands-On: Learn PostgreSQL
    Free Hands-On: C# for Beginners
    course

    Free Hands-On: C# for Beginners

    Learn C# through hands-on coding exercises. Practice what you learn with interactive challenges designed for everyone, from beginners to experts.

    Learn more about Free Hands-On: C# for Beginners
    Getting Started: AI for .NET Developers
    course

    Getting Started: AI for .NET Developers

    Get started with integrating AI into your .NET applications effectively using the latest LLM best practices.

    Learn more about Getting Started: AI for .NET Developers
    Getting Started: Building .NET Applications on AWS
    course

    Getting Started: Building .NET Applications on AWS

    Learn how to build and deploy .NET applications on AWS using CDK, Lambda, DynamoDB, S3, and more.

    Learn more about Getting Started: Building .NET Applications on AWS
    What's new in C# 14
    blog

    What's new in C# 14

    This guide covers every new C# 14 feature, explains its benefits, and provides practical code examples to help you navigate how you can use them.

    Learn more about What's new in C# 14
    Let's Build It: AI Chatbot with RAG in .NET Using Your Data
    course

    Let's Build It: AI Chatbot with RAG in .NET Using Your Data

    Build a Retrieval-Augmented Generation (RAG) chatbot that can answer questions using your data.

    Learn more about Let's Build It: AI Chatbot with RAG in .NET Using Your Data
    From Zero to Hero: SignalR in .NET
    course

    From Zero to Hero: SignalR in .NET

    Enable enterprise-grade real-time communication for your web apps with SignalR.

    Learn more about From Zero to Hero: SignalR in .NET
    Deep Dive: Solution Architecture
    course

    Deep Dive: Solution Architecture

    Master solution architecture and turn business needs into scalable, maintainable systems.

    Learn more about Deep Dive: Solution Architecture
    Migrating: ASP.NET Web APIs to ASP.NET Core
    course

    Migrating: ASP.NET Web APIs to ASP.NET Core

    A step-by-step process to migrate ASP.NET Web APIs from .NET Framework to ASP.NET Core.

    Learn more about Migrating: ASP.NET Web APIs to ASP.NET Core
    Getting Started: Caching in .NET
    course

    Getting Started: Caching in .NET

    Let's make the hardest thing in programming easy for .NET software engineers.

    Learn more about Getting Started: Caching in .NET
    From Zero to Hero: Testing with xUnit in C#
    course

    From Zero to Hero: Testing with xUnit in C#

    Learn how to test any codebase in .NET with the latest version of xUnit, the industry-standard testing library.

    Learn more about From Zero to Hero: Testing with xUnit in C#
    Create a ChatGPT Console AI Chatbot in C#
    blog

    Create a ChatGPT Console AI Chatbot in C#

    This walkthrough is your hands-on entry point to create a basic C# console application that talks to ChatGPT using the OpenAI API.

    Learn more about Create a ChatGPT Console AI Chatbot in C#