M
Movez @Movez_live • Follow

A Microsoft Senior AI developer just showed how they build AI agents with Claude at an Anthropic conference.

Here is the full breakdown -- Claude on Foundry, MCP server integration, and a live cupcake-ordering agent built in real time.

The part most devs skip: the .env endpoint must end with /anthropic -- not /v1/messages. Took 3 minutes on stage to debug.

Save this. The workshop link is at the bottom.

--> What got built: a working agent with custom persona, live inventory lookup, and order processing via MCP tools.

Watch on X
2:28 AM • May 21, 2026
48 Reply Copy link
Watch the full session on X
Summary

Marlene Mungami, a Senior Developer Advocate at Microsoft, led a live hands-on workshop at an Anthropic conference demonstrating how to build production-ready AI agents using Claude models deployed on Microsoft Foundry. Joined by colleagues Liam Hampton and Chris Noring, she walked a room of developers through the full process: accessing Claude Sonnet 4.6 in the Foundry playground, wiring the model into a local Python agent using Microsoft's agent framework, and connecting the agent to a live MCP server to give it real-time data access and a custom persona. The workshop used a cupcake shop scenario called Sparkles as a practical, low-stakes environment to demonstrate multi-step reasoning, tool use, and order processing capabilities. By the end, attendees had an agent capable of looking up inventory, registering new customers, processing cupcake orders, and presenting order-ready notifications -- all through a single URL-connected MCP server. The session positioned Microsoft Foundry as the bridge between Claude model quality and enterprise-scale deployment, with built-in security, observability, and compliance features that go beyond what a prototype-only environment can provide.

Key Points
Concepts and Ideas

This session introduced a layered set of ideas -- from industry-level shifts in how AI is used, to the specific architectural decisions that make agent systems work in production. The concepts below move from big-picture to hands-on.

From Single-Turn to Agentic AI
The industry has shifted from conversational AI (ask a question, get an answer) to agent systems that plan, reason, and take real-world actions over time. This requires handling multi-step reasoning across long contexts, not just responding to a single prompt. The practical implication is that model quality alone is no longer enough -- the surrounding system architecture matters just as much.
Microsoft Foundry as a Deployment Platform
Foundry is Microsoft's unified environment for moving AI from prototype to production. It bundles model access, agent hosting, connector integrations, evaluation tooling, and enterprise security into a single platform. The key distinction is that Foundry is not just a place to experiment -- it is the environment where you actually ship agents into enterprise systems.
Claude on Foundry -- What Changes
Running Claude through Foundry means you get the model's capabilities wrapped in Microsoft's infrastructure -- security, compliance, observability, and Defender/Purview/IntraID integrations. The tradeoff is that the connection requires specific configuration (the endpoint URI format) and uses Foundry's deployment abstraction rather than the Anthropic API directly. Sonnet 4.6 was the model of choice for this workshop.
MCP -- Model Context Protocol
MCP is an open standard developed to let AI agents talk to external systems. A single MCP server URL gives an agent access to tools (functions it can call), prompts (reusable instruction snippets), and resources (structured data over HTTP). The design goal is a clean, URL-based interface that any agent can plug into without custom API integration work for each service.
Context Engineering
When an agent connects to many tools through MCP, managing what information actually gets passed into the context window becomes important. Context engineering refers to deliberate decisions about what to include, exclude, compress, or retrieve at each reasoning step. The workshop touched on this as an open design challenge when working with large MCP surfaces.
System Prompts and Agent Persona
An agent's behavior is largely determined by its system prompt. In this workshop, the system prompt was not hardcoded -- it was pulled dynamically from the MCP server as a prompt resource. This approach means the persona, tone, and interaction flow can be updated server-side without touching the agent code, and the same technique can be used to distribute behavior changes across multiple deployed agent instances.
Microsoft Agent Framework
Microsoft's open-source agent framework (available in Python and TypeScript) handles the scaffolding of agent logic -- initializing the chat client, reading environment variables, defining agent names, and managing the conversation loop. It is designed to abstract away the boilerplate so developers can focus on what the agent does rather than how it runs. This framework was used as the foundation of the Sparkles cupcake agent.
Environment Variable Configuration
The connection between an agent and its deployed model depends on three environment variables: the endpoint URI, the API key, and the model deployment name. A critical detail demonstrated live is that the Foundry endpoint URI must end with /anthropic -- not the standard /v1/messages suffix. Getting this wrong silently breaks the agent, making it one of the most common setup errors for developers new to the Foundry environment.
Agent Tool Use
Tools in the agent context are callable functions the agent can invoke during a conversation -- looking up inventory, registering a customer, placing an order. In this workshop, all tools were provided through the MCP server. The agent decides when to call a tool based on the user's request, then incorporates the result into its response before continuing. This is the mechanism that lets an agent do things in the world, not just generate text.
Enterprise Readiness vs. Prototype
There is a meaningful gap between a working prototype and a deployable enterprise agent. Foundry's pitch is that it closes that gap by providing security, governance, monitoring, and compliance features without requiring developers to build them. This matters especially in environments like SAP integrations or ServiceNow workflows, where access control and audit trails are non-negotiable.
Live Workshop as Proof of Concept
The cupcake ordering scenario served a dual purpose: it was simple enough to build in 30 minutes and concrete enough to demonstrate every layer of the agent stack. Real physical cupcakes as the reward created a live stakes environment where the agent's correct functioning had an observable, real-world consequence. This is a strong pattern for technical teaching -- make the demo do something that actually matters in the room.
1,400+ Connectors and Real-World Action
Foundry's connector library means agents built on the platform can interact with major enterprise systems -- SAP, ServiceNow, and others -- out of the box. This is not just about data retrieval. Agents can take action: creating records, updating statuses, triggering workflows. The design vision is an agent layer that sits above your existing enterprise software stack and can operate within it.
Implementation Steps
Implementation steps are auto-generated from the transcript content and are provided for informational purposes only. They do not constitute professional advice of any kind. Always consult a qualified professional before acting on any information presented here.
1
Get Access to Microsoft Foundry
Navigate to Microsoft Foundry by searching "Microsoft Foundry" in Bing or going directly to the Foundry docs site. Sign up for an account -- free Azure credits are available for new users. Once inside, you will land on a project-based interface where you can access models, agent services, and connector tooling. The workshop materials from this session are available at aka.ms/claude-workshop (check the Foundry Learn resources for the current link).
2
Access Claude in the Foundry Playground
From the Foundry project screen, click "Start Building," then navigate to the Build toggle. Select "Models" from the sidebar. You will see Claude Sonnet 4.6 listed as an available deployment. Click on the model to open the playground environment, where you can test different system prompts and compare model behavior before writing any code. The playground is the fastest way to validate your system prompt logic before wiring it into an agent.
3
Grab Your Endpoint URI and API Key
In the Foundry model details panel, navigate to the Details tab. Copy the Target URI. Critical: before pasting it into your .env file, remove the /v1/messages suffix from the end. The URI must end with /anthropic -- anything beyond that will cause the agent to fail silently. Also copy your API key from the same panel. These two values, plus the model deployment name (claude-sonnet-4-6), are the three environment variables your agent needs.
4
Set Up Your Development Environment
Install the Microsoft agent framework SDK (available via pip for Python). Create a project folder and add a .env file with three variables: AZURE_AI_ENDPOINT (your trimmed URI), AZURE_AI_API_KEY, and MODEL_DEPLOYMENT_NAME set to claude-sonnet-4-6. Open VS Code (or your IDE of choice) in that folder. The framework will read these variables automatically when you initialize the chat client -- you do not need to hardcode credentials anywhere in your source files.
5
Build Your First Agent in Python
Create an agent.py file. Import the agent client from the Microsoft agent framework, initialize the client using your environment variables, and define your agent with a name and an initial system prompt. Start with a simple greeting test -- run the agent from your terminal and confirm it responds to "hello" before adding any tools or complexity. This gives you a clean baseline to build from and confirms your credentials and endpoint are wired correctly.
6
Connect an MCP Server for Tool Access
Find or build an MCP server that exposes the data or functions your agent needs. In your agent code, add the MCP server URL as a tool source -- the framework handles the connection and makes all exposed tools available to the agent automatically. Test by asking the agent a question that requires data from the server (in the workshop: "what flavors do you have today?"). If the agent does not know, check that you saved your file and restarted the agent after adding the MCP configuration.
7
Load Agent Persona from MCP Prompts
MCP servers can expose prompt resources -- reusable instruction snippets your agent can retrieve at startup. Update your agent's system prompt initialization to pull from the MCP server rather than hardcoding instructions in your Python file. This lets you control your agent's persona, tone, and welcome behavior from a single server-side source. Any updates to the MCP prompt are reflected the next time the agent starts -- no code changes required.
8
Design for Multi-Step Conversations
Agentic workflows often require the model to maintain state across multiple turns -- collecting a customer's name, city, and order before confirming. Structure your MCP tools and prompts to guide this flow explicitly. Define what information the agent should collect before taking an action, and what confirmation messages it should send. Test the full user journey end to end, not just individual tool calls, to catch gaps in the conversation design before deploying.
9
Leverage Foundry's Enterprise Features
Once your agent is working locally, move it into the Foundry deployment environment to take advantage of built-in observability, monitoring, and security integrations. Connect Microsoft Defender, Purview, and IntraID for access control and audit logging. Use Foundry's evaluation tools to test agent behavior systematically before releasing to end users. The transition from local Python script to Foundry-hosted agent is where the prototype becomes a product.
10
Explore Additional Connectors and Scale
Foundry supports over 1,400 built-in connectors, including SAP and ServiceNow. Once you have your agent pattern working with a simple MCP server, identify which enterprise systems in your environment are available as connectors and consider what actions an agent could take within them. The cupcake demo is a mental model -- replace "order a cupcake" with "create a service ticket," "update a sales record," or "pull a compliance report" and the same architecture applies at enterprise scale.
Quotable Moments
Quotable moments are auto-generated from the transcript. Speaker attribution and quote accuracy should be verified against the original source before republishing or sharing.
Marlene Mungami -- Microsoft Senior Developer Advocate
"You can't just rely on the models getting better. We also need systems to be able to actually have those models without intelligence executed."
Why it works: Cuts through the model-hype cycle and reframes the real engineering problem -- system architecture, not just model quality.
Marlene Mungami -- Microsoft Senior Developer Advocate
"You are not just getting the model itself. You are also going to have the ability to create agents in the platform, orchestrate those agents, and then give those agents access to the tools."
Why it works: A clean three-part definition of what Foundry adds on top of the raw model -- useful for explaining the platform to a non-technical decision-maker.
Marlene Mungami -- Microsoft Senior Developer Advocate
"This is us moving from just being empowered to build prototypes and actually deploying those agents into production enterprise environments."
Why it works: Captures the central value proposition of Foundry in a single sentence -- production readiness, not just experimentation.
Marlene Mungami -- Microsoft Senior Developer Advocate
"I think Claude is simply frosting with potential. You could say they are icing on the cake when it comes to AI assistance."
Why it works: The Claude model's response to a cupcake-themed system prompt, live on stage -- light moment that demonstrates how system prompt framing shapes the model's entire output style.
Transcript
This transcript was auto-generated and may contain errors in speaker attribution, transcription accuracy, or formatting. Long transcripts may be truncated due to processing limits. Confirm accuracy and completeness against the original source before referencing or republishing.
[00:00]
Marlene Mungami: Thank you for joining us in this session today. My name is Marlene Mungami and I am a senior developer advocate at Microsoft. I am joined today by two of my colleagues -- Liam Hampton, also from Microsoft, and Chris Noring, who is probably somewhere around the room. Today we are going to be building AI agents with Claude in Microsoft Foundry. The approach we are taking is super practical -- we are not just talking about what AI agents are, we are actually building them using Claude models in Foundry.
Marlene Mungami: By the end of this session you will have Claude models running in Microsoft Foundry, you will have plugged that model into an agent, and you will have given that agent tools. Before we start the workshop, I want to point out some of the changes we have seen in the industry. Over the past few years we have really seen a move away from single-turn AI conversations toward agent systems where agents can plan, reason, and take action on our behalf over time.
Marlene Mungami: There are three specific new challenges that come with these agent systems. First, models need to handle multi-step reasoning over long context. Second, systems need to be reliable, observable, and secure -- especially in enterprise environments. Third, developers need to connect their agents to different tools, external systems, and data sources. This is exactly where the partnership between Microsoft and Claude comes into play.
Marlene Mungami: What is Microsoft Foundry? How many of you have used Foundry before? For those new to it -- Foundry is our unified platform for building AI applications and agents at scale. You can work in the tools you prefer, whether that is GitHub, VS Code, Visual Studio, or Copilot Studio. At the core of Foundry we offer Foundry models like Claude, an agent service, tools and integrations, and machine learning services including fine-tuning. We support over 1,400 built-in connectors and MCP tools so your agents can take real action in real systems -- SAP, ServiceNow, and others. Enterprise features come out of the box: built-in security, observability, governance, and integrations with Microsoft Defender, Purview, and IntraID.
Marlene Mungami: We believe Foundry moves us from building prototypes to actually deploying agents into production enterprise environments. Why should developers use code in Foundry? Best-in-class reasoning for agents. Opus 4.7 is my current daily driver -- I'm a big fan. Developers love these models for planning and working with long contexts over time, which is critical for agents. You are not just getting the model -- you are getting agent creation in the platform, orchestration, and tool access. Enterprise features come out of the box. And you get a faster development-to-production cycle with built-in evaluation, observability, and monitoring tools.
[05:02]
Marlene Mungami: Instead of building your own platform from scratch, Microsoft Foundry gives you all of these pre-built and lets you scale your applications. Now that we have an idea of what Foundry and Claude offer together, we are going straight into the workshop. I really encourage you to work alongside us. If you have a laptop, navigate to the workshop link: aka.ms/claude-workshop. We have cupcakes as incentive -- if you go through the workshop with us, you will get a cupcake. Once you copy the link, click the Launch button and it will open the Skillable environment for you.
Marlene Mungami: We are building an AI agent with Microsoft Foundry and Claude. If you feel confident and want to go at your own pace, the instructions are available step by step and you can move as fast as you like. My colleagues are here to help if you hit any issues. One thing to point out: wherever you see a green box in the Skillable environment, you can click it and it will auto-fill the field for you -- you do not have to type everything by hand.
Marlene Mungami: The scenario for today is Sparkles -- the friendliest cupcake shop on the internet. Sparkles has a problem most bakeries would love to have: too many customers, too many flavors, and not enough hands behind the counter. We are going to build an AI agent to help the Sparkles team handle all incoming traffic from people wanting cupcakes. The first thing you will do is navigate to the browser, sign in, and it will open Foundry for you.
[10:01]
Marlene Mungami: This is Microsoft Foundry. I love purple, so I am a fan of the design. Once you have Foundry open, click on the project that comes up, then go to Start Building. Click the Build toggle, then click Models on the sidebar. You will see Claude Sonnet 4.6 already available. Click on it and it opens a playground environment where you can chat with the model and test different system prompts.
Marlene Mungami: The default system prompt says "you are an AI assistant that helps people find information." Let us say hello -- "Hello, who are you?" -- and it responds: "Hello, I am Claude, an AI assistant made by Anthropic." Working as expected. Now let us swap the system prompt. I am going to delete the current one and fill in a new one: "You are a sentient cupcake. Answer every question with frosting-related puns." What do you think? Let us ask. It says: "I think Claude is simply frosting with potential. You could say they are icing on the cake when it comes to AI assistance." [laughs] Maybe we should ask what they think of GPT. Wrong conference. But the playground is a great way to test system prompts and see how different instructions change model behavior before you write any code.
[15:14]
Marlene Mungami: Once you are done testing in the playground, we move to Part Three -- taking the model from the Foundry environment into our development environment, into VS Code. In Foundry, click the Details tab. The main thing you want is the Target URI. Once you have that and the API key, open VS Code. It comes with some pre-built files. We are going to start by editing the .env file.
Marlene Mungami: This is a little tricky: when you paste in the endpoint, you need to remove the /v1/messages part from the end. The endpoint should end with /anthropic. There is a note in the instructions about what it should look like. Now paste in your API key. Claude Sonnet 4.6 is already set as the model. With these three environment variables in place, we are ready to start testing our agent locally.
Marlene Mungami: Open the agent.py file. We are using the Microsoft agent framework -- available in Python and also in TypeScript. It is open-source and a great way to get started building agents. Copy the code block into agent.py. This code imports the agent, initializes the chat client using the environment variables we just set -- deployment name, API key, and endpoint -- and then defines the agent. We are calling it the Cupcake Agent. Now paste the run command into the terminal and start the agent. Say hello to it. It responds: "Hi, how are you? Is there something I can help you with today?" That is a basic hello from the Microsoft agent framework. We have a working agent.
[20:04]
Marlene Mungami: The next step is connecting to the cupcake store MCP server. How many of us have heard of MCP before? At an Anthropic conference I am assuming most of you have. MCP is the Model Context Protocol -- an open standard for letting AI agents talk to external systems. An MCP server exposes three things: tools, which are functions the agent can call; prompts, which are reusable instruction snippets; and resources, which are data accessible over HTTP in a format your agent expects.
Marlene Mungami: With MCP, you just need a URL and you get the full API available in a format that is easy for your agents to read. One consideration is how MCP handles context -- there are a number of ways to manage that with context engineering. Now I am going to delete the current terminal content and replace it with a new code block that connects to our cupcake store MCP server. This server has all the information from our store: how many cupcakes are available, what flavors, and so on -- all through this URL. Once we provide the MCP server to the agent as a tool, the agent can access that information.
Marlene Mungami: Let me close and restart the agent. I will type exit, then rerun the startup command. This time it will have the cupcake store data because of the MCP server. Let us ask: "What flavors do you have today?" -- I hope I updated the file. Oh, there is confusion because I did not save. This is a good example of why the MCP server matters -- it needs that context to know which flavors are available. Let me save the file and rerun.
Marlene Mungami: Asking again: "What flavors do you have today?" The agent responds: we have Classic Vanilla, Lemon Sponge, Red Velvet, and Chocolate available today. That is a basic demonstration of connecting to an MCP server and getting live data into your agent. Now for the third part: we want to load instructions and a welcome banner from MCP. We want the agent to have a specific persona and interact with users in a specific way. We do this by updating the system prompt to pull from the MCP server rather than hardcoding it in the Python file.
[25:00]
Marlene Mungami: Pasting this new code block, you will see we are pulling instructions from the MCP server as a prompt resource, along with a custom welcome banner. This is a great way to simplify workflows -- if you are building something for others to use, you can manage the agent's entire persona server-side. Rerunning the agent, we now see a custom banner greeting: "Hi there, happy to help you order a cupcake today. Do you already have a customer ID, or do you want to create a new one? Enter an existing ID or create one."
Marlene Mungami: I do not have an ID, so I will say "create one." The agent asks for my first name. I say Marlene. It asks for my last name. I give it. It asks for my city -- London, where we are. It says: "Perfect, let me get you registered. You are all set, Marlene. Your customer ID is [number]. Please write that down -- you will need it if you want to order again in the future. Now let us pick a cupcake." I choose Red Velvet, number four.
Marlene Mungami: All of this is coming from the MCP server -- the custom instructions and prompts. The agent then asks me to look at the big dashboard at the front of the room and read the six-character voucher code. Once you enter that, your name appears on the order board. We are preparing your order. Once it is done, it will appear here and you can come to the front to collect your cupcake. Liam at the front will start approving orders. The first orders are showing on the ready-for-pickup panel now.
[30:00]
Marlene Mungami: We are using Claude Sonnet 4.6 for this workshop and plugging it into Foundry. Real cupcakes are allowed -- you do not need to use the test feed. Renato, Chris K, Simon Y, Terry O, Vicki, and Kat -- your cupcakes are ready at the front. Nick and I are still stuck in the test feed -- we need to make it over to the main feed.
Marlene Mungami: I should mention -- the full workshop code will be available. If you wanted to try this at home or had any questions, you can feel free to do so on your own later. We will be around the rest of the day. If you want to chat to us about Foundry, come find us. Does anyone have questions now?
Marlene Mungami: We have a final slide to go over. To keep working with Microsoft and Foundry, search "Microsoft Foundry" and it should come up. We have free Azure credits you can use to get started. Review the Foundry documentation -- it is quite good. And take some of our free courses through Microsoft Learn; that link will have the courses available plus some of the workshop code. I think that is it for today. I am going to switch back to my local machine so you can see the orders. Very necessary.

-- End of Transcript --

AI Master Prompt
The AI prompt on this page is auto-generated from the transcript content and is intended to support further exploration of the topics, concepts, and conclusions discussed. It is provided for informational purposes only. The user is solely responsible for all outcomes resulting from its use.
-- Master Prompt --
CONTEXT

This chat is based on a live technical workshop delivered at an Anthropic conference by Marlene Mungami, Senior Developer Advocate at Microsoft. The session covered how to build production-ready AI agents using Claude models deployed on Microsoft Foundry -- Microsoft's unified platform for AI application development and enterprise deployment.

The workshop demonstrated a full agent build from scratch: accessing Claude Sonnet 4.6 in the Foundry playground, writing a Python agent using Microsoft's open-source agent framework, connecting the agent to a live MCP (Model Context Protocol) server for real-time tool access, and loading agent persona from MCP prompt resources. The scenario was a cupcake shop called Sparkles -- a low-stakes but fully functional demonstration of multi-step reasoning, live data lookup, customer registration, and order processing.

The core framework emerging from this session is:
1. Model quality alone is not sufficient for production agents. The surrounding system -- reliability, observability, security, tool connectivity -- matters just as much.
2. MCP provides a clean URL-based interface for giving agents access to tools, prompts, and data without custom API integration work for each external system.
3. Microsoft Foundry bridges the prototype-to-production gap by wrapping Claude's capabilities in enterprise infrastructure -- Defender, Purview, IntraID, evaluation tooling, and 1,400+ connectors.
4. Agent persona and behavior can be managed server-side through MCP prompt resources, decoupling instruction updates from code deployments.

The technical stack in this session: Python, Microsoft agent framework (open source), .env configuration, VS Code, Foundry model deployment, MCP server (URL-connected), Claude Sonnet 4.6.


KEY PRINCIPLES

- Move from single-turn conversations to agents that plan, reason, and act across multi-step workflows
- The .env endpoint must end with /anthropic -- not /v1/messages -- when connecting to Foundry
- MCP servers expose three things: tools (callable functions), prompts (reusable instructions), and resources (HTTP-accessible data)
- System prompts pulled from MCP server-side allow persona changes without touching agent code
- Foundry's enterprise features (security, observability, governance) are the difference between a demo and a deployable product
- Agent framework scaffolding (import, initialize client, define agent, run conversation loop) is the repeatable structure every agent build follows
- Context engineering -- deciding what goes into the model's context window at each step -- becomes important as MCP surface area grows


WHAT THIS IS NOT

This is not a conversation about language model capabilities in isolation, prompt engineering for chatbots, or theoretical AI architecture. It is not about the Anthropic API used directly (though that is related). It is specifically about the Microsoft Foundry deployment path for Claude-based agents, using the Microsoft agent framework, MCP integration, and enterprise deployment patterns. If your question is about using the Anthropic Python SDK directly without Foundry, that is adjacent but different territory -- flag it and we can note the distinction.


HOW TO USE THIS CHAT

1. BUILD MODE: Walk me through setting up a specific agent step by step -- from Foundry access through MCP connection to a working conversation loop. Tell me where you are in the process and I will give you the next concrete step.

2. DIAGNOSE MODE: Describe what is not working in your agent setup and I will help you isolate the issue. Common failure points include the endpoint URI format, missing .env variables, unsaved files before agent restart, and MCP server connection not being passed as a tool.

3. DESIGN MODE: Describe what your agent needs to do -- what data it should access, what actions it should take, what persona it should have -- and I will help you design the MCP server structure, tool definitions, and system prompt approach.

4. CONCEPT MODE: Ask me to explain any piece of the stack in plain language -- MCP, context engineering, agent frameworks, Foundry's role, enterprise connectors. I will give you a grounded explanation without jargon where it is not needed.

5. SCALE MODE: You have a working prototype. Help me think through what changes when you move from local Python to Foundry-hosted deployment, what enterprise features to enable first, and how to approach connector integration with systems like SAP or ServiceNow.

6. COMPARE MODE: How does building with Claude on Foundry differ from building with the Anthropic API directly, or from other agent frameworks? I will give you an honest comparison of tradeoffs rather than a marketing answer.


TONE

Direct, technically grounded, no hype. If something in the transcript was ambiguous or if a question goes beyond what the session covered, say so clearly and distinguish between what was demonstrated versus what is inferred or general knowledge.


[Paste your specific question, the piece of your agent build you are working on, or the system you are trying to connect -- and we will work through it from there.]