Share
Embed
Creating Your First MCP Server
This is the deck presented at the 1st session of the MS Reactor MCP Bootcamp: https://developer.microsoft.com/en-us/reactor/events/26169/
Carlotta Castelluccio
August 29, 2025
Transcript
33 slides
-
Creating Your First MCP Server MCP Bootcamp https://aka.ms/mcpbootcamp Carlotta Castelluccio
– Senior AI Advocate @ Microsoft -
Agenda 1. Why another protocol? 2. Model Context Protocol (MCP):
Deep Dive 3. Building your MCP server 4. AI Agents and MCP 5. MCP at Microsoft -
MCP is an open protocol created by Anthropic that standardizes
how applications provide context to LLMs. It’s like USB-C but for AI -
The need for MCP arises – a Timeline Integration chaos!!!
Tools are integral to LLM performance The need for a standard (MCP) -
But how do we provide real time context? How do
we connect to our database? Query GitHub Issues? Run tests with natural language? How can we bridge the gaps between our code, the client and LLM, and everything else? Agent mode Agentic coding Accelerate delivery by shifting from code to outcomes Autonomous AI pair programmer that plans, executes, and iterates on multi-step coding tasks – from editor to terminal, tests to debugger. -
What is a Protocol? http:// http:// HTTP request GET /wiki/Mount_Kilimanjaro
HTTP Response Server Client Browser -
What is a Protocol? HTTP request GET /api/mountains/kilimanjaro HTTP Response
Server REST Client { "name": "Mount Kilimanjaro", "elevation": 5895, "location": "Tanzania" } -
MCP is the HTTP for LLMs! MCP Host MCP Client
LLM MCP Server MCP Server MCP Server Tool Resource Prompt IN OUT { name: string; description?: string; inputSchema: type: "object", properties: { ... } } } { uri: string; name: string; description?: string; mimeType?: string; } { name: string; description?: string; arguments?: [ { name: string; description?: string; required?: boolean; } ] } -
MCP Deep-Dive Adapted from Mahesh Murag (Anthropic) AI Engineer session
MCP Client Invokes Tools Queries for Resources Interpolates Prompts MCP Server Exposes Tools Exposes Resources Exposes Prompts Tools Model-controlled Functions invoked by the model Resources Application-controlled Data exposed to the application Prompts User-controlled Pre-defined templates for AI interactions Retrieve / search Send a message Update DB records Files Database records API Responses Document Q&A Transcript Summary Output as JSON -
Functions that LLMs can call to perform specific actions
- basically function calling. • Send email • Update todos • Run tests • File issue bug The popular basic primitive Tools -
Tools: User controls Provide user controls to fine-tune and improve
tool calls Per-chat tool selection Manually reduce tools required to complete a specific task Mention tools in prompts Reduce the guessing and reference tools as needed. User-defined tool sets Re-use task-specific tools across tasks -
Expose data in a read-only fashion as URIs •
Files • Documents • Database entries/schemas • Images Ease of adding and returning data Resources -
Resources: Use cases Make data accessible to clients and users
Reduce response tokens Returning embedded resources lets the agent pull the data. Expose data/files to user Provide to assets for the user to act on, not LLM context. Attach as context Reducing tool lookups with specific resources attached. -
Pre-defined templates for AI tasks, explicitly invoked by the
user. • Static presets • Reusable with placeholders • Dynamically generated Quick Prompts -
/welcome /setup /need-info {issue} /impl-metric {name}
/migrate-db … /root-cause-wizard Prompts: Use cases From static templates to dynamically generates workflows Onboarding prompts Welcome prompts for users to verify setup and tour the tools Common workflows One-shot tasks, parameterized for reusability Context-aware workflows Dynamically customized for the current user/codebase -
Official Python SDK for MCP Clients Servers Local – Stdio
Transport aka.ms/python-sdk-mcp Remote – Server Sent Events Remote – Streamable HTTP -
Demo aka.ms/mcp-for-beginners 1. Building your first MCP server in Python
2. Building your first MCP client in Python and make it interact with the server -
User experience and/or Trigger Orchestrator Knowledge Grounding and memory Tools
Actions, triggers, workflows Autonomy Planning, exceptions, self- learning Foundation models Integration chaos! System Message (this is the “job description” of your agent!) MCP as AI Agent’s tools -
User experience and/or Trigger Orchestrator Knowledge Grounding and memory Tools
Actions, triggers, workflows Autonomy Planning, exceptions, self- learning Foundation models Integration chaos! System Message (this is the “job description” of your agent!) MCP as AI Agent’s tools MCP -
Model Context Protocol At Microsoft Model Context Protocol MPC enables
seamless Integration between LLM Apps and external data sources Azure API Management Build Local & Remote MCPs Tools Community Enterprise Windows MCP Clients & Host Copilot Studio VS Code Foundry Agent Visual Studio Semantic Kernel Registry GitHub Copilot C# MCP SDK Microsoft Connectors Azure Functions Microsoft Teams Windows -
Risks and security best practices Risks: - Prompt injection &
Tool Poisoning - Authentication & Tokens management - Excessive permissions - Supply Chain Security Mitigations: - Azure Content Safety & Prompt Shields - Microsoft Entra ID - RBAC & least privilege - GitHub Advanced Security, Azure DevOps -
Today's tutorial aka.ms/mcp-for-beginners Python SDK for MCP aka.ms/python-sdk-mcp Model Context
Protocol modelcontextprotocol.io Get support https://aka.ms/foundrydevs Learn more