- A hands-on Microsoft workshop where attendees deploy a Claude model in Microsoft Foundry, plug it into an agent built with Microsoft Agent Framework, and give that agent tools via an MCP server.
- The running example is "Sparkles," a cupcake shop agent that takes customer orders, registers customers, and serves cupcakes — connected to a cupcake-store MCP server for live menu data, instructions, and a welcome banner.
- Foundry is positioned as a unified, enterprise-ready platform (security, observability, governance, 1,400+ connectors) for moving Claude-powered agents from prototype to production.
Build AI agents using Claude in Microsoft Foundry
- Microsoft Foundry is a unified platform for building AI applications and agents at scale, offering Foundry models (including Claude), an agent service, tools/integrations, and ML services like fine-tuning.
- The industry is shifting from single-turn AI conversations to agentic systems that plan, reason, and take action; these systems need multi-step reasoning over long context, reliability/observability/security, and connections to external tools and data.
- In the workshop, developers first deploy and test Claude Sonnet 4.6 in the Foundry playground, experimenting with system prompts (e.g. a "sentient cupcake" persona that answers in frosting puns) before moving to code.
- The agent is built locally in VS Code using Microsoft Agent Framework (open source, Python and TypeScript), wiring up a
.envfile with the Foundry target URI (ending inanthropic, withv1/messagesremoved), API key, and deployment name. - MCP (Model Context Protocol) is an open standard that lets agents talk to external systems; connecting the cupcake-store MCP server gives the agent tools, reusable prompt snippets, and resources — including live cupcake flavors, agent instructions, and a welcome banner.
- Foundry supports over 1,400 built-in connectors and MCP tools (e.g. SAP, ServiceNow) so agents can take real action in real systems.
- Foundry's enterprise features include built-in security, observability, and governance plus integrations with Microsoft Defender, Microsoft Purview, and Entra ID, reducing reliance on raw
.envsecret handling. - Four reasons developers pair Claude with Foundry: best-in-class reasoning for agents, native agent creation/orchestration with tool access, out-of-the-box enterprise features, and a faster prototype-to-production cycle via built-in evaluation, monitoring, and deployment tooling.
Microsoft Foundry — Microsoft's unified platform for building, orchestrating, and deploying AI applications and agents at scale.
Agentic system — An AI system that can plan, reason, and take actions over time, rather than just responding in a single turn.
Microsoft Agent Framework — Microsoft's open-source framework (Python/TypeScript) for building AI agents that connect to models and tools.
MCP (Model Context Protocol) — An open standard that lets AI agents connect to external systems, exposing tools, prompts, and resources via a URL.
Tools — Functions or capabilities an agent can call to take action or retrieve information.
Prompts (MCP) — Reusable instruction snippets served by an MCP server that can be plugged into an agent.
Resources (MCP) — Data served over HTTP in a format the agent expects, accessible through an MCP server.
Target URI / endpoint — The Foundry model endpoint the agent uses; in this workshop it must end with anthropic and have v1/messages removed.
Playground — The Foundry interface for chatting with a model, comparing models, and testing system prompts before coding.
Hi everyone. Good afternoon. Thank you for joining us in this session today. My name is Marlene Mungami and I am a senior developer advocate at Microsoft. And I'm joined today as well by two of my colleagues, Liam Hampton, who's also from Microsoft, and Chris Snoring, who's probably around the room somewhere. And today we are going to be building AI agents using Claude in Microsoft Foundry. And the approach that we're taking today is super practical. So we're not just going to be talking about what AI agents are, but we're actually going to be building them using Claude models in Foundry.
By the end of the session, you're going to have deployed Claude models in Microsoft Foundry. You're also going to plug that model into an agent, and finally you'll give that agent tools as well. Some things to point out in terms of changes we're seeing in the industry right now: over the past few years especially, we've really seen the industry moving away from just single-turn AI conversations where you're just talking to an AI and it's giving you a response. Now we're actually building agentic systems where our agents can plan, they can reason, and they can take action on our behalf over time.
There's three specific new challenges that come with these agentic systems. The first is that the models need to be able to handle multi-step reasoning over long context. The second is the systems need to be reliable — especially when you're working with enterprises, they need to be reliable, they need to have observability built in, and they also need to be secure. And the third is that, as developers are building out their agents, they need to be able to connect to different tools and external systems and data sources to bring that information in for their agent. This next wave of AI means that, even though we love the Claude models and the models are getting better every day, you can't just rely on the models getting better. We also need systems to actually have those models with that intelligence executed. This is exactly where we believe this partnership between Microsoft and Claude comes into play.
What is Microsoft Foundry? Microsoft Foundry is our unified platform for building AI applications and agents at scale. You can work in the tools that you want with Foundry, whether you're using GitHub, Visual Studio Code, Visual Studio itself, or Copilot Studio. At the core in Foundry, we have several different products: Foundry models like Claude, an agent service, tools and integrations, and some different machine learning services like fine-tuning. We support over 1,400 built-in connectors and MCP tools, so your agents can take real action in the real world — you can build agents that have access to SAP or ServiceNow and different things like that.
Agents that are built on Foundry come with enterprise-ready features. You'll have built-in security, built-in observability, and governance features. We also have integrations with Microsoft Defender, Microsoft Purview, and Entra ID, so you're not working with .env files all the time. When you use Microsoft Foundry, this is us moving from just being empowered to build prototypes to actually deploying those agents into production enterprise environments.
Why should developers use Claude in Foundry? There are four things developers love about this combination. The first is best-in-class reasoning for agents. You are here at a Claude Code conference, so I'm assuming you like the Opus or the Claude models. Opus 4.7 is my current daily driver. These models are excellent at planning and working with long context over time and understanding that context, which is critical for agents. Second, when you're using Foundry, you're not just getting the model itself — you also have the ability to create agents in the platform, orchestrate those agents, and give those agents access to tools. Third, you have enterprise features out of the box, so you get security compliance and so on. And fourth, we have a faster development-to-production cycle, with built-in evaluation tools, observability, monitoring tools, and integrations that can take your agent from prototype and deploy it into production. Instead of building out your own platform from scratch, with Microsoft Foundry you get all of these pre-built and you're able to scale your applications.
Now we're going to go straight into the workshop. If you have a laptop, go ahead and navigate to aka.ms/cloudworkshop. If you go through the workshop with us, you will get a cupcake — we are bribing you. Once you copy the website, you should see a screen and you click the launch button and it will launch this environment for you. We are going to be building out an agent with Microsoft Foundry and Claude. If you feel confident and are self-paced, you can just go through the instructions and click next, but I'm also going to walk you through step-by-step. We're using an environment called Skillable, and you don't have to type things in — if you click an input box and click the green Skillable box, it will immediately fill out that box for you.
Welcome to Sparkles, which is the friendliest cupcake shop on the internet. Sparkles has a problem most bakeries would love to have: too many customers and too many flavors and not enough hands behind the counter. So today we're going to build an AI agent that's going to help the Sparkles team handle all of the incoming traffic from people wanting cupcakes.
First, you navigate to the browser, and when you open it, it opens on the Foundry page. You sign in with the username and password (which auto-fill). This is Microsoft Foundry. Once you have Foundry opened, you click on the project, then click on the "start building" page, then click the "build" toggle, and on the side click "models." This shows which models are available for you to use — you'll see Claude Sonnet 4.6. When I click on this model, it opens a playground environment in Foundry where I can chat with the model. The custom instructions on the side say "you are an AI assistant that helps people find information." Here in the Foundry environment, this is a great place to experiment with the model, compare different models, and see how they perform with different system prompts.
I can say "Hello, who are you?" and it responds "Hello, I'm Claude, an AI assistant made by Anthropic." It's working as expected. But we can swap out that system prompt. I'll delete the current ones and fill in a new one: "you are a sentient cupcake. Answer every question with frosting-related puns." Then I'll ask "what do you think of Claude?" and it says "I think Claude is simply frosting with potential. They're the icing on the cake when it comes to AI assistance." The playground is a fantastic way for us to try out our models and decide what we like.
Once you're done testing in the playground, we move on to part three, where we want to take the model and bring it into our development environment, into our IDE. We have VS Code already installed. In Foundry, we click on the details tab, and the main thing we want is the target URI and the API keys. We open VS Code, which comes with some pre-built files. The main thing we start by editing is our .env file. We want to update the endpoint — paste in the endpoint, and remove the v1/messages part at the end, because the endpoint should end with anthropic. Then I grab my API key and paste it in. It already sees that Claude Sonnet 4.6 is our model. Now that we have these three environment variables, we're ready to start testing our agent locally.
We open the agent.py file, where we're going to test. The next step is to build out our agent for helping with the cupcake store, using Microsoft Agent Framework — a framework built by Microsoft, available in Python and probably TypeScript. It's open source and a great way to get started building agents. We copy a block of code and paste it in. This is all the code we need to run our Sparkles agent with Agent Framework. We import our agent, initiate the client, and it detects which environment variables we put into the .env file — the deployment, the key, and the endpoint. Then we define the agent in our Python code, calling it a cupcake agent. We copy the run command, paste it in the terminal, and it starts our agent so we can greet it: "Hi, how are you? Is there something I can help you with today?" This is a basic hello-world to Microsoft Agent Framework.
The next step is to connect to the cupcake store MCP server. MCP is Model Context Protocol, an open standard for letting AI agents talk to external systems. An MCP server lets us access a set of tools (functions the agent can call), prompts (reusable instruction snippets), and resources (data sent over HTTP in a specific way your agent expects). With MCP, you just need a URL and you can plug it in and get the full API available in a format that's easy for your agent to read. We pull down the terminal, delete what's there, and replace it with a new code block that connects to our cupcake store MCP server. This will have all the information from our store about how many cupcakes are available and what flavors are available. Once we have the MCP server in the code, we provide it to the agent as a tool. When I ask "what flavors do you have today?" it initially gets confused because I hadn't saved the file — a good example of why it needs the MCP server for that context. After saving and rerunning, it tells me: classic vanilla, lemon sponge, red velvet, and chocolate.
The third step is to load instructions and a welcome banner from MCP. We want the agent to have a specific persona and to greet us in a specific way, which we do by updating the system prompt with instructions pulled from the MCP server. We're getting a prompt that's already available through the MCP server with agent instructions, plus the welcome banner. Prompts are reusable, which is a great way to simplify workflows. We run the same command, and now it has a custom banner from the MCP server. It says, "Hi there. Happy to help you order a cupcake today. First, do you already have a customer ID or do you want to order a new one?"
I don't have an ID, so I ask the agent to create one. It asks for my first name (Marlene), last name, and city (London), then registers me and gives me a customer ID to write down. Then I pick a cupcake — red velvet, number four — and all of this is coming from the MCP server because it has those custom instructions. It asks me to read the six-character voucher off the big dashboard at the front of the room. Once I put in the voucher, the agent puts my name on the screen and prepares the order. The dashboard refreshes every minute or so, mainly so we don't get overwhelmed by cupcake orders. Once your order is done it appears in the pickup-ready area and you come to the front to collect your cupcake.
This is just an introduction to how to use Foundry. We're using the Claude models — Sonnet for this workshop — and plugging that into Foundry. You can actually order a real cupcake, not just test. We'll have the full workshop and code available afterward if you want to try it at home. If you want to keep working with Microsoft and Foundry, search Microsoft Foundry — we have free Azure credits so you can try it, pretty good documentation on Foundry docs, and some free courses available through Microsoft Learn. That's it for the workshop today. Thanks for joining us, everyone.
TL;DR
- A hands-on Microsoft workshop where attendees deploy a Claude model in Microsoft Foundry, plug it into an agent built with Microsoft Agent Framework, and give that agent tools via an MCP server.
- The running example is "Sparkles," a cupcake shop agent that takes customer orders, registers customers, and serves cupcakes — connected to a cupcake-store MCP server for live menu data, instructions, and a welcome banner.
- Foundry is positioned as a unified, enterprise-ready platform (security, observability, governance, 1,400+ connectors) for moving Claude-powered agents from prototype to production.
Takeaways
- Microsoft Foundry is a unified platform for building AI applications and agents at scale, offering Foundry models (including Claude), an agent service, tools/integrations, and ML services like fine-tuning.
- The industry is shifting from single-turn AI conversations to agentic systems that plan, reason, and take action; these systems need multi-step reasoning over long context, reliability/observability/security, and connections to external tools and data.
- In the workshop, developers first deploy and test Claude Sonnet 4.6 in the Foundry playground, experimenting with system prompts (e.g. a "sentient cupcake" persona that answers in frosting puns) before moving to code.
- The agent is built locally in VS Code using Microsoft Agent Framework (open source, Python and TypeScript), wiring up a
.envfile with the Foundry target URI (ending inanthropic, withv1/messagesremoved), API key, and deployment name. - MCP (Model Context Protocol) is an open standard that lets agents talk to external systems; connecting the cupcake-store MCP server gives the agent tools, reusable prompt snippets, and resources — including live cupcake flavors, agent instructions, and a welcome banner.
- Foundry supports over 1,400 built-in connectors and MCP tools (e.g. SAP, ServiceNow) so agents can take real action in real systems.
- Foundry's enterprise features include built-in security, observability, and governance plus integrations with Microsoft Defender, Microsoft Purview, and Entra ID, reducing reliance on raw
.envsecret handling. - Four reasons developers pair Claude with Foundry: best-in-class reasoning for agents, native agent creation/orchestration with tool access, out-of-the-box enterprise features, and a faster prototype-to-production cycle via built-in evaluation, monitoring, and deployment tooling.
Vocabulary
Microsoft Foundry — Microsoft's unified platform for building, orchestrating, and deploying AI applications and agents at scale.
Agentic system — An AI system that can plan, reason, and take actions over time, rather than just responding in a single turn.
Microsoft Agent Framework — Microsoft's open-source framework (Python/TypeScript) for building AI agents that connect to models and tools.
MCP (Model Context Protocol) — An open standard that lets AI agents connect to external systems, exposing tools, prompts, and resources via a URL.
Tools — Functions or capabilities an agent can call to take action or retrieve information.
Prompts (MCP) — Reusable instruction snippets served by an MCP server that can be plugged into an agent.
Resources (MCP) — Data served over HTTP in a format the agent expects, accessible through an MCP server.
Target URI / endpoint — The Foundry model endpoint the agent uses; in this workshop it must end with anthropic and have v1/messages removed.
Playground — The Foundry interface for chatting with a model, comparing models, and testing system prompts before coding.
Transcript
Hi everyone. Good afternoon. Thank you for joining us in this session today. My name is Marlene Mungami and I am a senior developer advocate at Microsoft. And I'm joined today as well by two of my colleagues, Liam Hampton, who's also from Microsoft, and Chris Snoring, who's probably around the room somewhere. And today we are going to be building AI agents using Claude in Microsoft Foundry. And the approach that we're taking today is super practical. So we're not just going to be talking about what AI agents are, but we're actually going to be building them using Claude models in Foundry.
By the end of the session, you're going to have deployed Claude models in Microsoft Foundry. You're also going to plug that model into an agent, and finally you'll give that agent tools as well. Some things to point out in terms of changes we're seeing in the industry right now: over the past few years especially, we've really seen the industry moving away from just single-turn AI conversations where you're just talking to an AI and it's giving you a response. Now we're actually building agentic systems where our agents can plan, they can reason, and they can take action on our behalf over time.
There's three specific new challenges that come with these agentic systems. The first is that the models need to be able to handle multi-step reasoning over long context. The second is the systems need to be reliable — especially when you're working with enterprises, they need to be reliable, they need to have observability built in, and they also need to be secure. And the third is that, as developers are building out their agents, they need to be able to connect to different tools and external systems and data sources to bring that information in for their agent. This next wave of AI means that, even though we love the Claude models and the models are getting better every day, you can't just rely on the models getting better. We also need systems to actually have those models with that intelligence executed. This is exactly where we believe this partnership between Microsoft and Claude comes into play.
What is Microsoft Foundry? Microsoft Foundry is our unified platform for building AI applications and agents at scale. You can work in the tools that you want with Foundry, whether you're using GitHub, Visual Studio Code, Visual Studio itself, or Copilot Studio. At the core in Foundry, we have several different products: Foundry models like Claude, an agent service, tools and integrations, and some different machine learning services like fine-tuning. We support over 1,400 built-in connectors and MCP tools, so your agents can take real action in the real world — you can build agents that have access to SAP or ServiceNow and different things like that.
Agents that are built on Foundry come with enterprise-ready features. You'll have built-in security, built-in observability, and governance features. We also have integrations with Microsoft Defender, Microsoft Purview, and Entra ID, so you're not working with .env files all the time. When you use Microsoft Foundry, this is us moving from just being empowered to build prototypes to actually deploying those agents into production enterprise environments.
Why should developers use Claude in Foundry? There are four things developers love about this combination. The first is best-in-class reasoning for agents. You are here at a Claude Code conference, so I'm assuming you like the Opus or the Claude models. Opus 4.7 is my current daily driver. These models are excellent at planning and working with long context over time and understanding that context, which is critical for agents. Second, when you're using Foundry, you're not just getting the model itself — you also have the ability to create agents in the platform, orchestrate those agents, and give those agents access to tools. Third, you have enterprise features out of the box, so you get security compliance and so on. And fourth, we have a faster development-to-production cycle, with built-in evaluation tools, observability, monitoring tools, and integrations that can take your agent from prototype and deploy it into production. Instead of building out your own platform from scratch, with Microsoft Foundry you get all of these pre-built and you're able to scale your applications.
Now we're going to go straight into the workshop. If you have a laptop, go ahead and navigate to aka.ms/cloudworkshop. If you go through the workshop with us, you will get a cupcake — we are bribing you. Once you copy the website, you should see a screen and you click the launch button and it will launch this environment for you. We are going to be building out an agent with Microsoft Foundry and Claude. If you feel confident and are self-paced, you can just go through the instructions and click next, but I'm also going to walk you through step-by-step. We're using an environment called Skillable, and you don't have to type things in — if you click an input box and click the green Skillable box, it will immediately fill out that box for you.
Welcome to Sparkles, which is the friendliest cupcake shop on the internet. Sparkles has a problem most bakeries would love to have: too many customers and too many flavors and not enough hands behind the counter. So today we're going to build an AI agent that's going to help the Sparkles team handle all of the incoming traffic from people wanting cupcakes.
First, you navigate to the browser, and when you open it, it opens on the Foundry page. You sign in with the username and password (which auto-fill). This is Microsoft Foundry. Once you have Foundry opened, you click on the project, then click on the "start building" page, then click the "build" toggle, and on the side click "models." This shows which models are available for you to use — you'll see Claude Sonnet 4.6. When I click on this model, it opens a playground environment in Foundry where I can chat with the model. The custom instructions on the side say "you are an AI assistant that helps people find information." Here in the Foundry environment, this is a great place to experiment with the model, compare different models, and see how they perform with different system prompts.
I can say "Hello, who are you?" and it responds "Hello, I'm Claude, an AI assistant made by Anthropic." It's working as expected. But we can swap out that system prompt. I'll delete the current ones and fill in a new one: "you are a sentient cupcake. Answer every question with frosting-related puns." Then I'll ask "what do you think of Claude?" and it says "I think Claude is simply frosting with potential. They're the icing on the cake when it comes to AI assistance." The playground is a fantastic way for us to try out our models and decide what we like.
Once you're done testing in the playground, we move on to part three, where we want to take the model and bring it into our development environment, into our IDE. We have VS Code already installed. In Foundry, we click on the details tab, and the main thing we want is the target URI and the API keys. We open VS Code, which comes with some pre-built files. The main thing we start by editing is our .env file. We want to update the endpoint — paste in the endpoint, and remove the v1/messages part at the end, because the endpoint should end with anthropic. Then I grab my API key and paste it in. It already sees that Claude Sonnet 4.6 is our model. Now that we have these three environment variables, we're ready to start testing our agent locally.
We open the agent.py file, where we're going to test. The next step is to build out our agent for helping with the cupcake store, using Microsoft Agent Framework — a framework built by Microsoft, available in Python and probably TypeScript. It's open source and a great way to get started building agents. We copy a block of code and paste it in. This is all the code we need to run our Sparkles agent with Agent Framework. We import our agent, initiate the client, and it detects which environment variables we put into the .env file — the deployment, the key, and the endpoint. Then we define the agent in our Python code, calling it a cupcake agent. We copy the run command, paste it in the terminal, and it starts our agent so we can greet it: "Hi, how are you? Is there something I can help you with today?" This is a basic hello-world to Microsoft Agent Framework.
The next step is to connect to the cupcake store MCP server. MCP is Model Context Protocol, an open standard for letting AI agents talk to external systems. An MCP server lets us access a set of tools (functions the agent can call), prompts (reusable instruction snippets), and resources (data sent over HTTP in a specific way your agent expects). With MCP, you just need a URL and you can plug it in and get the full API available in a format that's easy for your agent to read. We pull down the terminal, delete what's there, and replace it with a new code block that connects to our cupcake store MCP server. This will have all the information from our store about how many cupcakes are available and what flavors are available. Once we have the MCP server in the code, we provide it to the agent as a tool. When I ask "what flavors do you have today?" it initially gets confused because I hadn't saved the file — a good example of why it needs the MCP server for that context. After saving and rerunning, it tells me: classic vanilla, lemon sponge, red velvet, and chocolate.
The third step is to load instructions and a welcome banner from MCP. We want the agent to have a specific persona and to greet us in a specific way, which we do by updating the system prompt with instructions pulled from the MCP server. We're getting a prompt that's already available through the MCP server with agent instructions, plus the welcome banner. Prompts are reusable, which is a great way to simplify workflows. We run the same command, and now it has a custom banner from the MCP server. It says, "Hi there. Happy to help you order a cupcake today. First, do you already have a customer ID or do you want to order a new one?"
I don't have an ID, so I ask the agent to create one. It asks for my first name (Marlene), last name, and city (London), then registers me and gives me a customer ID to write down. Then I pick a cupcake — red velvet, number four — and all of this is coming from the MCP server because it has those custom instructions. It asks me to read the six-character voucher off the big dashboard at the front of the room. Once I put in the voucher, the agent puts my name on the screen and prepares the order. The dashboard refreshes every minute or so, mainly so we don't get overwhelmed by cupcake orders. Once your order is done it appears in the pickup-ready area and you come to the front to collect your cupcake.
This is just an introduction to how to use Foundry. We're using the Claude models — Sonnet for this workshop — and plugging that into Foundry. You can actually order a real cupcake, not just test. We'll have the full workshop and code available afterward if you want to try it at home. If you want to keep working with Microsoft and Foundry, search Microsoft Foundry — we have free Azure credits so you can try it, pretty good documentation on Foundry docs, and some free courses available through Microsoft Learn. That's it for the workshop today. Thanks for joining us, everyone.