Afternoon Session

Building and deploying a Python MCP server

Course delivery kit

The afternoon should make MCP feel buildable

One architecture picture beats a long definition

Copilot Studio

Remote MCP endpoint

FastMCP server

Public APIs

uv keeps the environment calm

uv lock
uv sync
uv run --directory .\mcp-servers\hello-world hello-world-server

Why it helps

  • fewer setup surprises
  • repeatable commands
  • good live-demo rhythm

MCP concepts should stay concrete

Tool

Call a function

Resource

Read useful data

Prompt

Reuse task framing

A tiny server makes the pattern visible

from mcp.server.fastmcp import FastMCP

mcp = FastMCP("hello-world")

@mcp.tool()
def ping(name: str) -> str:
    """Return a simple greeting."""
    return f"Hello, {name}!"

The decorator is the turning point

from mcp.server.fastmcp import FastMCP

mcp = FastMCP("hello-world")

@mcp.tool()
def ping(name: str) -> str:
    """Return a simple greeting."""
    return f"Hello, {name}!"

Teaching line

@mcp.tool() is the moment a normal function becomes a discoverable capability.

FastMCP removes protocol plumbing from the first lesson

It handles

  • schema generation
  • argument validation
  • protocol wiring

That lets us teach

  • naming
  • tool design
  • response shape

Two small tools are enough for a walkthrough

Lookup tool

Useful demo

Status or data tool

Canonical shape

One simple lookup plus one live-data or status tool is enough to teach discovery, invocation, and deployment.

Local inspection should happen before hosting

Inspect for

  • tool names
  • descriptions
  • parameters
  • output shape

Deployment should feel like packaging, not magic

Local project

Container image

Container Apps

Remote endpoint

Azure needs one clean visual anchor

Connection back to Copilot Studio closes the loop

Hosted server

Connection setup

Agent can call tools

User sees value

Why this matters

This is the moment the protocol stops feeling abstract.

The final discussion should stay practical

Internal lookups

What should become a tool

Public data blends

What outside signal helps

Governance

What still needs approval

The takeaway is that MCP is approachable

Final message

The goal is not protocol expertise. The goal is confidence that this can be built, tested, and connected.