Skip to content

timothywarner-org/context-engineering

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Context Engineering with MCP: From Prompts to Persistent AI Memory

Context Engineering with MCP Course Cover

Welcome to the training hub for mastering Context Engineering with Model Context Protocol (MCP). Whether you're building AI applications or deepening your understanding of persistent AI memory, this guide provides everything you need to implement production-ready context systems.

πŸ“‹ Looking for the course plan? View the Context Engineering Course Plan!

Build Status

Last updated: October 30, 2025


πŸ“¬ Contact Information


First-Party Reference Docs

πŸ“† Course Plan Overview

This hands-on course is structured into 4 segments, each approximately 50 minutes:

  1. Understanding Context - Why Your AI Has Amnesia (50 min)

    • Token budgets, context windows, and tokenization fundamentals
    • Live demo: ChatGPT vs Claude with MCP
    • Hands-on with Claude Desktop and VS Code GitHub Copilot
    • Configure your first MCP server for persistent context
  2. Building Local MCP Servers - Your First Context System (50 min)

    • Build production-ready MCP servers with TypeScript/Python SDK
    • Implement tools, resources, and prompts for AI discovery
    • Test with MCP Inspector browser tool
    • Create GitHub repository integration for long-term memory
  3. Azure Deployment - From Local to Cloud-Scale Memory (50 min)

    • Deploy MCP servers to Azure App Service
    • Configure authentication, secrets, and Key Vault integration
    • Implement persistent storage with Azure Cosmos DB
    • Monitor with Application Insights and logging
  4. Advanced Patterns - Multi-Agent Memory Architectures (50 min)

    • Design episodic, semantic, and working memory systems
    • Implement vector search with Azure AI Search
    • Build multi-agent orchestration across ChatGPT, Claude, and Copilot
    • Production considerations: security, scale, and cost optimization

πŸ’‘ See the full detailed course plan for complete information!


🎯 Course Overview

Level: Intermediate Duration: 4 hours (4 Γ— 50-minute segments) Format: Hands-on live training

What You'll Build

You mastered promptingβ€”now stop your AI from forgetting everything. This hands-on course teaches you Context Engineering using MCPβ€”the production-ready protocol adopted by Microsoft and Anthropic. You'll build persistent AI memory using MCP servers, Azure AI Service, GitHub, and VS Code, eliminating tedious context resets forever.

By the end of this course, you will have:

  • βœ… Built a working MCP server that gives AI access to your GitHub repositories
  • βœ… Deployed production MCP infrastructure to Azure with authentication and monitoring
  • βœ… Implemented multi-agent memory systems that persist across sessions
  • βœ… Configured Claude Desktop, VS Code Copilot, and ChatGPT with persistent context

Leave with working code, templates, and the exact memory patterns the leading companies use today.

Audience Profile

As a context engineer, you implement, manage, and optimize AI memory systems that enable agents to maintain state across sessions. You build MCP servers that expose tools, resources, and persistent context to AI platforms including Claude, ChatGPT, and GitHub Copilot.

This course is for you if you

  • Use ChatGPT Plus/Team, Claude Pro, or GitHub Copilot in your daily work
  • Need AI tools that retain context reliably across sessions and workflows
  • Want practical, Azure-integrated solutions for context persistence
  • Seek to master MCP early to lead adoption in your enterprise
  • Are tired of copy-pasting the same context into every conversation

Required experience

  • Active experience with at least one AI assistant (ChatGPT, Claude, or Copilot)
  • Comfortable with GitHub repos, commits, and basic Git workflows
  • Basic understanding of Azure services or willingness to create free account
  • Programming experience in JavaScript/TypeScript or Python
  • Command-line basics: can run npm/pip commands and navigate directories

πŸš€ The Good Stuff: Must-Have MCP Resources

Essential links for mastering Model Context Protocol:


πŸ“š MCP Learning Paths

Structured resources to master all course skills:

Official Documentation

AI Platform Integration


πŸ›‘οΈ Context Engineering Best Practices

Expert guidance for implementing robust AI memory systems:

Memory Architecture Patterns

Azure Integration

Context Optimization


πŸ”§ Your Toolkit

Essential tools to follow along and practice efficiently:

Required Setup

GitHub Account

  • Ability to create repositories
  • Generate personal access tokens
  • Fork and clone repositories

AI Platform Access

Development Environment

VS Code Extensions

MCP Development Tools

# Install MCP Inspector globally
npm install -g @modelcontextprotocol/inspector

# Install TypeScript SDK
npm install @modelcontextprotocol/sdk

# Install Python SDK
pip install mcp-sdk

Azure PowerShell/CLI

# Install Azure CLI
# Windows: winget install Microsoft.AzureCLI
# Mac: brew install azure-cli

# Install Azure PowerShell module
Install-Module -Name Az -Scope CurrentUser -Repository PSGallery -Force

πŸ’» Hands-on Labs & Practice

Learn through hands-on experience:

Getting Started

Clone the repository and set up your environment:

git clone https://github.com/timothywarner-org/context-engineering.git
cd context-engineering
npm install

Lab Setup Guide

Detailed setup instructions are available in labs/LAB-SETUP.md

Practice Resources


πŸ“– Recommended Preparation

Before the Course

Essential Reading:

Recommended Videos:

  • How LLMs Understand & Generate Human Language by Kate Harwood (O'Reilly)
  • Introduction to Azure AI Services (Microsoft Learn)

Optional Books:

  • Quick Start Guide to Large Language Models by Sinan Ozdemir
  • AI for Everyone: A Beginner's Handbook for Artificial Intelligence by Pearson

Recommended Follow-up

Advanced Learning:

  • Generative AI Toolbox by Shaun Wassell (O'Reilly)
  • Securing Generative AI by Omar Santos (O'Reilly)
  • Building LLM Applications (O'Reilly, 2024)

Related Topics:

  • Vector databases and embeddings
  • Prompt engineering advanced techniques
  • Multi-agent orchestration patterns
  • Production AI system architecture

πŸ“… Detailed Schedule

Each segment is 50 minutes with 10-minute breaks between segments. Total duration: 4 hours.

Segment 1: Understanding Context - Why Your AI Has Amnesia (50 minutes)

Learning Objectives:

  • Understand token budgets and context windows in modern LLMs
  • Experience context loss firsthand in ChatGPT vs. context persistence in Claude
  • Learn how MCP solves the context problem architecturally
  • Use MCP in Claude Desktop and VS Code GitHub Copilot

Topics Covered:

  • The anatomy of context loss: tokens, windows, and limitations
  • Live demo: Watch ChatGPT forget, Claude remember - the MCP difference
  • Introduction to Model Context Protocol: architecture and capabilities
  • Hands-on: Configure Claude Desktop with your first MCP server
  • Using MCP with GitHub Copilot in VS Code

Exercise: Configure Claude Desktop to use the filesystem MCP server and maintain context across conversations (10 min)

Key Takeaways:

  • Context windows are measured in tokens (words β‰ˆ 1.3 tokens)
  • Copy-paste workflows don't scale for professional development
  • MCP provides tools, resources, prompts, and sampling capabilities
  • Claude Desktop has native MCP support today

Segment 2: Building Local MCP Servers - Your First Context System (50 minutes)

Learning Objectives:

  • Build a working MCP server using the official TypeScript SDK
  • Implement tools that AI can discover and invoke
  • Create resources for AI to access persistent data
  • Test your MCP server with MCP Inspector and Claude Desktop

Topics Covered:

  • MCP server architecture: tools, resources, prompts, and sampling
  • Setting up the TypeScript SDK project structure
  • Implementing your first tool: GitHub repository access
  • Creating resources: files, URLs, and dynamic content
  • Testing with MCP Inspector browser tool

Live Coding:

// Build an MCP server that gives Claude access to GitHub repos
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';

const server = new Server({
  name: 'github-context-server',
  version: '1.0.0'
}, {
  capabilities: {
    tools: {},
    resources: {}
  }
});

// Implement tools for repo access, file reading, commit history
server.setRequestHandler(ListToolsRequestSchema, async () => ({
  tools: [
    {
      name: 'read_repo_file',
      description: 'Read a file from a GitHub repository',
      inputSchema: {
        type: 'object',
        properties: {
          repo: { type: 'string' },
          path: { type: 'string' }
        }
      }
    }
  ]
}));

Exercise: Extend the GitHub MCP server to access your own repository and read specific files (10 min)

Key Takeaways:

  • MCP servers are simple Node.js/Python applications
  • The SDK handles protocol details; you focus on tool logic
  • Tools define schemas for AI to understand parameters
  • Local testing with Inspector ensures reliability

Segment 3: Azure Deployment - From Local to Cloud-Scale Memory (50 minutes)

Learning Objectives:

  • Deploy MCP servers to Azure App Service
  • Configure authentication and environment variables securely
  • Connect Claude Desktop to remote MCP servers
  • Implement persistent memory using Azure Storage

Topics Covered:

  • Azure deployment strategies for MCP servers
  • Environment configuration and secrets management
  • Authentication: API keys and Azure AD integration
  • Persistent storage: Azure Blob, Table Storage, Cosmos DB
  • Monitoring and logging with Application Insights

Live Deployment:

# Deploy MCP server to Azure App Service
az webapp up --name coretext-mcp --runtime "NODE:20-lts"

# Configure environment variables
az webapp config appsettings set --name coretext-mcp \
  --settings [email protected](...)

# Enable Application Insights
az monitor app-insights component create --app coretext-mcp

Architecture:

Claude Desktop β†’ HTTPS β†’ Azure App Service (MCP Server)
                              ↓
                        Azure Key Vault (secrets)
                              ↓
                        Azure Cosmos DB (memory store)
                              ↓
                        Application Insights (monitoring)

Exercise: Deploy your GitHub MCP server to Azure and connect Claude Desktop to the remote endpoint (10 min)

Key Takeaways:

  • Azure App Service provides easy MCP server hosting
  • Key Vault keeps secrets secure
  • Cosmos DB enables globally distributed memory
  • Application Insights provides production observability

Segment 4: Advanced Patterns - Multi-Agent Memory Architectures (50 minutes)

Learning Objectives:

  • Design memory architectures: episodic, semantic, and working memory
  • Implement vector-based semantic search with Azure AI Search
  • Orchestrate multiple AI agents sharing context through MCP
  • Build a production customer service bot with persistent memory

Topics Covered:

  • Memory architecture patterns in AI systems
  • Vector databases: embeddings and similarity search
  • Multi-agent orchestration: ChatGPT ↔ Claude via shared MCP context
  • Context compression and pruning strategies
  • Cost optimization and caching techniques

Live Build: Customer Service Bot

// Multi-agent memory system
class CustomerServiceMemory {
  episodic: ConversationHistory[];  // What happened
  semantic: VectorStore;             // What it means
  working: CurrentContext;           // Active task state

  async retrieveRelevantContext(query: string) {
    // 1. Semantic search for similar past conversations
    const similar = await this.semantic.search(query, k=5);

    // 2. Retrieve recent episodic memory
    const recent = this.episodic.slice(-10);

    // 3. Combine with working memory
    return this.compress({
      similar,
      recent,
      working: this.working
    });
  }
}

Architecture Patterns:

  1. Episodic Memory: Time-ordered conversation storage
  2. Semantic Memory: Vector embeddings for similarity retrieval
  3. Working Memory: Current task context (4K tokens)
  4. Long-term Memory: Compressed summaries in Azure Cosmos DB

Exercise: Design a memory architecture for your specific use case (e.g., code review bot, documentation assistant, data analyst) (10 min)

Production Considerations:

  • Security: Authentication, authorization, audit logging
  • Scale: Horizontal scaling, caching, rate limiting
  • Cost: Token budgets, pruning strategies, smart retrieval
  • Future: MCP on Windows, expanding platform support

Key Takeaways:

  • Memory architectures mirror human cognition patterns
  • Vector search enables semantic understanding at scale
  • Multi-agent systems require shared context coordination
  • Production MCP requires security, monitoring, and cost optimization

πŸŽ“ Related Learning & Certifications

Expand your AI and cloud engineering skills:

Microsoft AI & Azure Certifications

Industry Skills & Topics

  • Prompt Engineering: Advanced techniques for AI interaction
  • Vector Databases: Embeddings, similarity search, and retrieval
  • Multi-Agent Systems: Orchestration and communication patterns
  • LangChain & LlamaIndex: AI application frameworks
  • Production AI Systems: Monitoring, scaling, and reliability

πŸ’Έ Azure Resources & Cost Management

Free Azure Resources

Cost Optimization

Estimated Course Costs

Running labs with Azure free tier:

  • App Service (Free tier): $0
  • Cosmos DB (Free tier): $0
  • Azure AI Search (Free tier): $0
  • Key Vault: ~$0.03 per 10,000 operations
  • Application Insights (first 5GB): $0

Total estimated cost for course labs: < $5


πŸŽ₯ Tim's Helper Resources

YouTube Tutorials

Blog Posts


🌟 2025 Context Engineering Focus Areas

Emerging Patterns

Persistent AI Memory

  • Long-term conversation storage beyond session limits
  • Vector-based semantic retrieval across conversations
  • User preference learning and adaptation

Multi-Modal Context

  • Text, code, images, and structured data in unified context
  • Cross-modal retrieval and reasoning
  • Context compression for efficient token usage

Enterprise Integration

  • GitHub as organizational knowledge base
  • Database query tools for business intelligence
  • API integration for external systems
  • Security and compliance controls

Production Considerations

Security & Privacy

Scalability & Performance

  • Horizontal scaling with load balancers
  • Caching strategies for frequently accessed context
  • Rate limiting and quota management
  • Connection pooling and resource optimization

Observability & Monitoring

  • Application Insights integration
  • Custom metrics and dashboards
  • Alerting on errors and performance degradation
  • Distributed tracing across MCP components

πŸ“± Community & Support

Connect with context engineering practitioners:

MCP Community

AI Development Communities

Technical Blogs & Newsletters


πŸ“¦ Repository Contents

Course Materials

context-engineering/
β”œβ”€β”€ README.md                    # This file - course hub
β”œβ”€β”€ course-plan.md              # Detailed 4-segment plan
β”œβ”€β”€ GETTING-STARTED.md          # Navigation and setup guide
β”œβ”€β”€ CLAUDE.md                   # Claude Code AI instructions
β”‚
β”œβ”€β”€ images/
β”‚   └── cover.png               # Course cover image
β”‚
β”œβ”€β”€ labs/                       # Hands-on exercises
β”‚   β”œβ”€β”€ LAB-SETUP.md           # Lab environment setup
β”‚   β”œβ”€β”€ lab01-context/         # Segment 1 exercises
β”‚   β”œβ”€β”€ lab02-local/           # Segment 2 exercises
β”‚   β”œβ”€β”€ lab03-azure/           # Segment 3 exercises
β”‚   └── lab04-advanced/        # Segment 4 exercises
β”‚
β”œβ”€β”€ examples/                   # Working code samples
β”‚   β”œβ”€β”€ filesystem/            # File access MCP server
β”‚   β”œβ”€β”€ github/                # GitHub integration
β”‚   β”œβ”€β”€ database/              # SQL query tools
β”‚   └── memory/                # Memory persistence
β”‚
β”œβ”€β”€ deploy/                     # Azure deployment
β”‚   β”œβ”€β”€ bicep/                 # Infrastructure as Code
β”‚   β”‚   β”œβ”€β”€ main.bicep         # Main template
β”‚   β”‚   └── parameters.json    # Configuration
β”‚   └── scripts/               # Automation scripts
β”‚       β”œβ”€β”€ deploy.sh          # Bash deployment
β”‚       └── deploy.ps1         # PowerShell deployment
β”‚
└── docs/                       # Additional documentation
    β”œβ”€β”€ mcp-architecture.md    # Architecture deep dive
    β”œβ”€β”€ azure-setup.md         # Azure configuration
    β”œβ”€β”€ security.md            # Security best practices
    └── troubleshooting.md     # Common issues & fixes

πŸ‘¨β€πŸ« Your Instructor

Tim Warner

Microsoft MVP - Azure AI and Cloud/Datacenter Management (6+ years) Microsoft Certified Trainer (25+ years)

Tim Warner specializes in cloud computing, DevOps, and AI engineering with a focus on practical, production-ready solutions. His O'Reilly Live Training courses emphasize hands-on learning and real-world implementation patterns.

Expertise:

  • Azure AI Services and OpenAI integration
  • Cloud-native application architecture
  • DevOps automation and CI/CD
  • AI agent development and orchestration
  • Technical training and content creation

Connect with Tim:


πŸ“„ License & Usage

Β© 2025 Timothy Warner. Course materials provided for educational purposes.

Course Materials

This repository and its contents are available for:

  • βœ… Personal learning and education
  • βœ… Reference during and after the course
  • βœ… Modification for your own projects
  • βœ… Sharing with attribution

MCP Protocol

Model Context Protocol is an open standard:


🀝 Contributing

Found an issue or have a suggestion? Contributions are welcome!

How to Contribute

  1. Report Issues: Open an issue
  2. Suggest Improvements: Submit feature requests
  3. Fix Bugs: Create pull requests with fixes
  4. Share Examples: Add your MCP server implementations
  5. Improve Documentation: Help make instructions clearer

Contribution Guidelines

  • Follow existing code style and conventions
  • Test your changes thoroughly
  • Update documentation as needed
  • Include clear commit messages
  • Be respectful and constructive

πŸ“š Additional Resources

MCP Ecosystem

Context Engineering Research


This README is designed for maximum utility and easy navigation. If you have suggestions or corrections, feel free to reach out via the contact information above.

Ready to build persistent AI memory? Start with the Getting Started Guide or jump straight to Lab Setup!

Questions? See you in the course, or reach out via the community channels above.

About

Context Engineering with MCP

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors 2

  •  
  •