This open-source curriculum introduces the fundamentals of the Model Context Protocol (MCP) through real-world, cross-language examples in .NET (C#), Java, TypeScript, JavaScript, Rust, and Python. It's designed for developers and focuses on practical techniques for building modular, scalable, and secure AI workflows, from your first request-based server to discovery, authorization, testing, deployment, routing, and scaling.
- Explain MCP hosts, clients, servers, and their capabilities.
- Explain how MCP's stateless, request-based model works: there's no session to set up, servers describe themselves with
server/discover, and each request carries its own metadata. - Build and test an MCP server and connect a client.
- Apply security practices to MCP applications.
- Use MCP in practical projects and explore advanced patterns.
You'll need basic programming knowledge, Git, Visual Studio Code, and Node.js 26.14.0 LTS, which includes npm.
-
Clone the repository and open it in VS Code:
git clone https://github.com/microsoft/mcp-for-beginners.git cd mcp-for-beginners code .
To download without translations, use the sparse-checkout instructions in Multi-language support.
-
Install and build the TypeScript first-server sample:
cd 03-GettingStarted/01-first-server/solution/typescript npm ci npm run build -
Run
npm run inspectoras described in the sample. Select the modern protocol, connect, and invokeaddwith1and2; the result should be3. The Inspector guide explains the tool.If the Inspector package isn't available from your registry, follow the source-build instructions, then run this command from the sample directory, replacing
<inspector-cli-path>with the built CLI path:node "<inspector-cli-path>" node build/index.js stdio --method tools/call --tool-name add --tool-arg a=1 b=2 --protocol-era modern -
Continue with the first-server lesson and the learning journey. To use another language, choose a calculator sample, such as the Python calculator.
This curriculum targets MCP specification 2026-07-28. MCP uses date-based protocol versions; see specification versioning and What's changed in MCP for details.
Version 2026-07-28 removes the initialize handshake and the Mcp-Session-Id protocol session. You don't open a session before calling a tool: each request includes the protocol version and client capabilities, and a client can call server/discover first to learn what a server supports. Applications can still keep their own state; MCP just doesn't require the protocol to carry it. Lessons that deliberately keep older behavior label it as legacy.
As of December 4, 2026, the lessons and first-party samples in modules 00-12 target MCP 2026-07-28. External servers, hosts, and providers that lessons mention might support other revisions.
- Automated checks: The Sample validation workflow (definition) passed all 37 jobs on
mainat commit063e064, including Rust, Java, JavaScript and TypeScript, .NET, and Python. Some jobs are shared test suites that cover several samples. - What the checks don't prove: They run offline builds and tests. They don't run every code snippet in the lessons, and they don't exercise live model or cloud providers, sign-in flows, or graphical tools. Check each lesson's prerequisites for steps that need your own accounts or resources.
- Details and history: The changelog lists curriculum changes by date. The remediation report records verification scope and remaining gaps, and the audit report is the historical December 2 baseline.
- Translations: Only the English files are updated by hand. Translated copies are generated and might lag behind recent English changes.
Follow these stages in order, or use the curriculum table to choose a topic.
- Understand: Start with introduction and core concepts.
- Build: Create a first server, client, and LLM client. Then explore VS Code, stdio, Streamable HTTP, and the Inspector. Optionally, try the Foundry Toolkit and other MCP hosts.
- Secure: Study security, simple auth, OAuth, and Microsoft Entra ID.
- Apply: Explore testing, deployment, practical implementation, best practices, and case studies.
- Go further: Choose from the remaining advanced topics, community contributions, early adoption lessons, workshop, database labs, and tooling. Optionally, explore advanced server usage, MRTR elicitation, and MCP Apps.
Times are approximate planning estimates, not measured durations, and exclude setup, downloads, and cloud provisioning. Indexes are for navigation, not extra timed lessons. Beginner assumes no MCP experience; intermediate assumes you can build a local tool; advanced assumes you can secure and test one. Each linked lesson provides its own prerequisites.
| Module | Topic | Description | Link | Level | Estimated time |
|---|---|---|---|---|---|
| 00 | Introduction to MCP | Overview of the Model Context Protocol and its significance in AI pipelines | Read more | Beginner | 20–40 min |
| 0.1 | MCP glossary | Plain-language definitions of hosts, clients, servers, discovery, authorization, and other core terms | Glossary | Beginner | Reference |
| 01 | Core Concepts Explained | In-depth exploration of core MCP concepts | Read more | Beginner | 20–40 min |
| 1.1 | What's Changed in MCP (2026-07-28) | Stateless protocol, Extensions framework, and feature deprecations in the current specification | Guide | Beginner | 20–40 min |
| 02 | Security in MCP | Security threats and best practices; enterprise checklists are optional | Read more | Beginner | 20–40 min |
| 2.1 | CIMD and DCR Authorization | Compare preferred CIMD registration with deprecated DCR fallback using a protected MCP server | Sample | Advanced | 60–120 min |
| 03 | Getting Started with MCP | Environment setup, basic servers/clients, integration | Read more | Beginner | Navigation |
| 3.1 | First Server | Create your first MCP server | Guide | Beginner | 45–90 min |
| 3.2 | First Client | Develop a basic MCP client | Guide | Beginner | 45–90 min |
| 3.3 | Client with LLM | Integrate large language models | Guide | Beginner | 45–90 min |
| 3.4 | VS Code Integration | Consume MCP servers in VS Code | Guide | Beginner | 45–90 min |
| 3.5 | stdio Server | Create servers using stdio transport | Guide | Beginner | 45–90 min |
| 3.6 | HTTP Streaming | Implement HTTP streaming in MCP | Guide | Beginner | 45–90 min |
| 3.7 | Microsoft Foundry Toolkit | Use Microsoft Foundry Toolkit with MCP | Guide | Beginner | 45–90 min |
| 3.8 | Testing | Test your MCP server implementation | Guide | Intermediate | 45–90 min |
| 3.9 | Deployment | Deploy MCP servers to production | Guide | Intermediate | 60–120 min |
| 3.10 | Advanced server usage | Use advanced servers for advanced feature usage and improved architecture | Guide | Advanced | 60–120 min |
| 3.11 | Simple auth | A chapter showing you auth from the beginning and RBAC | Guide | Intermediate | 60–120 min |
| 3.12 | MCP Hosts | Configure Claude Desktop, Cursor, Cline, and other MCP hosts | Guide | Beginner | 45–90 min |
| 3.13 | MCP Inspector | Debug and test MCP servers with the Inspector tool | Guide | Beginner | 30–45 min |
| 3.14 | Ask a user or a model (moved) | Kept for old bookmarks: ask a user in 3.18, ask a model in 5.6 or 3.3 | Where to go now | Reference | 5 min |
| 3.15 | MCP Apps | Build MCP Apps | Guide | Advanced | 60–120 min |
| 3.16 | What is Foundry Toolbox? | Optional – cloud required. List the tools in a Microsoft Foundry toolbox with MCP Inspector and Python; needs Azure (paid resources) | Guide | Intermediate | 30–45 min |
| 3.17 | Stateless requests and explicit handles | Discovery, metadata, caller-bound baskets, and two replicas behind round-robin routing; Python, TypeScript, C#, plus Java and Rust ports of the core exchange | Guide | Intermediate | 45–60 min |
| 3.18 | Multi-round-trip user input | Elicitation, explicit consent, protected continuation state, and safe retries; URL mode asks in the browser without exposing credentials; Python, TypeScript, C#, plus a Java URL-mode parity client | Guide | Intermediate | 45–60 min |
| 3.19 | Subscriptions and change events | Listen for changes, acknowledge, filter, re-listen after a dropped stream, and dedupe retries with an operation key; Python | Guide | Intermediate | 30–45 min |
| 3.20 | Migrate a November peer | Probe old and new peers, fall back only when allowed and never on an authorization error, and prove which revision ran with a wire trace; Python lab with migration cards for Python, TypeScript, C#, Java, and Rust | Guide | Advanced | 60–75 min |
| 04 | Practical Implementation | SDKs, debugging, testing, reusable prompt templates | Read more | Intermediate | 60–120 min |
| 4.1 | Pagination | Handle large result sets with cursor-based pagination | Guide | Intermediate | 45–90 min |
| 4.2 | Caching | Cache a catalog without sharing a tenant's data: ttlMs, cacheScope, private caches per authorization context, and invalidation on change |
Guide | Intermediate | 30–45 min |
| 05 | Advanced Topics in MCP | Multi-modal AI, scaling, enterprise use | Read more | Advanced | Navigation |
| 5.1 | Azure Integration | MCP Integration with Azure | Guide | Advanced | 60–120 min |
| 5.2 | Multi-modality | Working with multiple modalities | Guide | Advanced | 60–120 min |
| 5.3 | OAuth2 Demo | Implement OAuth2 authentication | Guide | Intermediate | 60–120 min |
| 5.4 | Explicit context | Use arguments, resource URIs, and server-minted handles; legacy Roots are deprecated in MCP 2026-07-28 |
Guide | Advanced | 60–120 min |
| 5.5 | Routing | MCP routing strategies | Guide | Advanced | 60–120 min |
| 5.6 | Call a model directly | Generate with a model provider directly, with cost limits and separate consent; legacy Sampling is deprecated in MCP 2026-07-28 |
Guide | Advanced | 60–120 min |
| 5.7 | Scaling | Scale MCP implementations | Guide | Advanced | 60–120 min |
| 5.8 | Security | Advanced security considerations | Guide | Advanced | 60–120 min |
| 5.9 | Web Search | Implement web search capabilities | Guide | Advanced | 60–120 min |
| 5.10 | Realtime Streaming | Build realtime streaming functionality | Guide | Advanced | 60–120 min |
| 5.11 | Realtime Search | Implement realtime search | Guide | Advanced | 60–120 min |
| 5.12 | Entra ID Auth | Authentication with Microsoft Entra ID | Guide | Intermediate | 60–120 min |
| 5.13 | Foundry Integration | Integrate with Microsoft Foundry | Guide | Advanced | 60–120 min |
| 5.14 | Context Engineering | Techniques for effective context engineering | Guide | Advanced | 60–120 min |
| 5.15 | MCP Custom Transport | Custom Transport implementations | Guide | Advanced | 60–120 min |
| 5.16 | Protocol Features | Progress notifications, cancellation, resource templates | Guide | Advanced | 60–120 min |
| 5.17 | Adversarial Multi-Agent Reasoning | Two agents argue opposite sides using shared MCP tools, evaluated by a judge agent | Guide | Advanced | 60–120 min |
| 5.18 | Hosted Agent with Foundry Toolbox | Optional – cloud required. Python or .NET hosted agent that uses a Foundry toolbox, with a caller-side approval check, version pinning and tool search; needs Azure (paid resources) | Guide | Advanced | 60–90 min |
| 5.19 | Beta extensions | Elective. Compare Skills, Server Cards and Events by lifecycle stage; run a local poll-mode Events fixture | Guide | Advanced | 45–60 min |
| 5.20 | Tasks extension | Return a task, not a promise: opt in, poll, supply input, cancel, and resume after a restart (Beta extension); Python, C# | Guide | Advanced | 60–75 min |
| 5.21 | Gateway policy | Authorize the request a gateway actually forwards: check routing and Mcp-Param-* headers against the body, authorize from the token, step up scopes, propagate W3C trace context, and retry lost writes safely; Python, TypeScript; optional APIM policy |
Guide | Advanced | 75–90 min |
| 5.22 | Enterprise auth (elective) | Who issued this token, and for whom? Compare user delegation, client credentials (M2M) and the Enterprise-Managed Authorization ID-JAG exchange by issuer and audience, with local issuers only; Python, TypeScript | Guide | Advanced | 60–90 min |
| 06 | Community Contributions | How to contribute to the MCP ecosystem | Guide | Intermediate | 20–40 min |
| 6.1 | Discover is not the same as trust | Validate a registry listing, pin tool definitions, and keep discovery separate from permission | Guide | Intermediate | 45–60 min |
| 07 | Insights from Early Adoption | Real-world implementation stories | Guide | Intermediate | 20–40 min |
| 7.1 | Microsoft MCP servers | Explore Microsoft MCP server examples | Guide | Intermediate | 20–40 min |
| 08 | Best Practices for MCP | Performance, fault-tolerance, resilience | Guide | Intermediate | 20–40 min |
| 8.1 | Reliability sidecars | Explore reliability patterns | Guide | Intermediate | 60–120 min |
| 8.2 | Tool design | Design tools a model can choose and a client can trust: structured results, schema limits, pinned definitions | Guide | Intermediate | 60–90 min |
| 09 | MCP Case Studies | Practical implementation examples | Guide | Intermediate | 20–40 min |
| 9.1 | Documentation MCP case study | Explore a documentation server scenario | Guide | Intermediate | 45–90 min |
| 10 | Hands-on Workshop | Building an MCP Server with Microsoft Foundry Toolkit | Workshop | Intermediate | Navigation |
| 10.1 | Models and agents | Explore models and agents | Lab 1 | Intermediate | 45–90 min |
| 10.2 | Browser agent | Connect a browser agent | Lab 2 | Intermediate | 45–90 min |
| 10.3 | Weather server | Build a weather server | Lab 3 | Intermediate | 45–90 min |
| 10.4 | Development workflow | Automate a Git and editor workflow | Lab 4 | Intermediate | 45–90 min |
| 11 | MCP Server Database Integration | Comprehensive 13-lab hands-on learning path for PostgreSQL integration | Labs | Advanced | Navigation |
| 11.1 | Introduction | Overview of MCP with database integration and retail analytics use case | Lab 00 | Advanced | 45–90 min each |
| 11.2 | Core Architecture | Understanding MCP server architecture, database layers, and security patterns | Lab 01 | Advanced | 45–90 min each |
| 11.3 | Security & Multi-Tenancy | Row Level Security, authentication, and multi-tenant data access | Lab 02 | Advanced | 45–90 min each |
| 11.4 | Environment Setup | Setting up development environment, Docker, Azure resources | Lab 03 | Advanced | 45–90 min each |
| 11.5 | Database Design | PostgreSQL setup, retail schema design, and sample data | Lab 04 | Advanced | 45–90 min each |
| 11.6 | MCP Server Implementation | Building a server with database integration | Lab 05 | Advanced | 45–90 min each |
| 11.7 | Tool Development | Creating database query tools and schema introspection | Lab 06 | Advanced | 45–90 min each |
| 11.8 | Semantic Search | Implementing vector embeddings with Azure OpenAI and pgvector | Lab 07 | Advanced | 45–90 min each |
| 11.9 | Testing & Debugging | Testing strategies, debugging tools, and validation approaches | Lab 08 | Advanced | 45–90 min each |
| 11.10 | VS Code Integration | Configuring VS Code MCP integration and AI Chat usage | Lab 09 | Advanced | 45–90 min each |
| 11.11 | Deployment Strategies | Docker deployment, Azure Container Apps, and scaling considerations | Lab 10 | Advanced | 45–90 min each |
| 11.11a | Two real replicas | Elective. Run the same call on two replica processes with a shared store, recycle one, retry safely, and correlate traces; optional budget-capped Azure template | Guide | Advanced | 45–60 min |
| 11.12 | Monitoring | Application Insights, logging, performance monitoring | Lab 11 | Advanced | 45–90 min each |
| 11.13 | Best Practices | Performance optimization, security hardening, and production tips | Lab 12 | Advanced | 45–90 min each |
| 12 | Tooling | Connect MCP servers to host applications | Guide | Intermediate | 20–40 min |
| 12.1 | Copilot app | Use MCP servers in the Copilot app | Guide | Intermediate | 45–90 min |
Choose a calculator sample to start, then explore the practical implementations.
| Language | Description | Link |
|---|---|---|
| C# | MCP Server Example | View Code |
| Java | MCP Calculator | View Code |
| JavaScript | MCP Demo | View Code |
| Python | MCP Server | View Code |
| TypeScript | MCP Example | View Code |
| Rust | MCP Example | View Code |
| Language | Description | Link |
|---|---|---|
| C# | Advanced Sample | View Code |
| Java with Spring | Container App Example | View Code |
| JavaScript | Advanced Sample | View Code |
| Python | Complex Implementation | View Code |
| TypeScript | Container Sample | View Code |
MCP is a protocol: a shared set of rules for exchanging information. An MCP host is an application that manages interactions with a model and creates an MCP client for each MCP server it connects to. Each client communicates with exactly one server. Servers expose capabilities such as tools, resources, and prompts. The model itself isn't the MCP client.
- Use the study guide for a visual map and suggested learning paths, the glossary for unfamiliar terms, and the changelog for curriculum updates.
- Join the Microsoft Foundry Discord to discuss MCP, or visit the Microsoft Foundry Developer Forum for product feedback and errors.
- Explore the MCP documentation and MCP community.
Translations maintained with Co-op Translator
Arabic | Bengali | Bulgarian | Burmese (Myanmar) | Chinese (Simplified) | Chinese (Traditional, Hong Kong) | Chinese (Traditional, Macau) | Chinese (Traditional, Taiwan) | Croatian | Czech | Danish | Dutch | Estonian | Finnish | French | German | Greek | Hebrew | Hindi | Hungarian | Indonesian | Italian | Japanese | Kannada | Khmer | Korean | Lithuanian | Malay | Malayalam | Marathi | Nepali | Nigerian Pidgin | Norwegian | Persian (Farsi) | Polish | Portuguese (Brazil) | Portuguese (Portugal) | Punjabi (Gurmukhi) | Romanian | Russian | Serbian (Cyrillic) | Slovak | Slovenian | Spanish | Swahili | Swedish | Tagalog (Filipino) | Tamil | Telugu | Thai | Turkish | Ukrainian | Urdu | Vietnamese
Prefer to Clone Locally?
This repository includes 50+ language translations which significantly increases the download size. To clone without translations, use sparse checkout:
Bash / macOS / Linux:
git clone --filter=blob:none --sparse https://github.com/microsoft/mcp-for-beginners.git cd mcp-for-beginners git sparse-checkout set --no-cone '/*' '!translations' '!translated_images'CMD (Windows):
git clone --filter=blob:none --sparse https://github.com/microsoft/mcp-for-beginners.git cd mcp-for-beginners git sparse-checkout set --no-cone "/*" "!translations" "!translated_images"This gives you everything you need to complete the course with a much faster download.
This curriculum grows stronger with contributions from learners like you! Whether you're fixing a typo, suggesting a clearer explanation, or adding a new example, your contributions help other beginners succeed.
Thanks to Microsoft Valued Professional Shivam Goyal for contributing code samples.
The contribution process is designed to be welcoming and supportive. Most contributions require a Contributor License Agreement (CLA), but the automated tools will guide you through the process smoothly.
This entire curriculum is available under the MIT LICENSE, meaning you can use, modify, and share it freely. This supports our mission of making MCP knowledge accessible to developers everywhere.
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
Ready to start your MCP journey? Begin with Module 00 - Introduction to MCP and take your first steps into the world of Model Context Protocol development!
Our team produces other courses! Check out:
