learn-claude-with-phoebe / Session 6 of 6
Learn Claude with Phoebe · Session 6 of 6

Power user: subagents, MCP, and the platform

The ceiling comes off: delegate work to isolated subagents, plug Claude into any system with MCP, and understand the developer platform that turns personal automation into team infrastructure. Plus the deep-dive track: eight self-paced pages covering the full engineering curriculum.

🔴 Hardest DS & AI advanced C-level: first 10 min 45 min live + deep-dive track
0-3 · Welcome 3-20 · Concepts 20-40 · Terminal time 40-45 · Q&A
Part 0

Why this session exists

Everything so far ran inside one Claude conversation. Real systems need more: parallel work without context collisions (subagents), connections to YOUR databases and tools (MCP), and programmatic building blocks (the API and platform). This session is the map plus the first hands-on mile; the deep-dive track below is the full engineering curriculum, one 45-minute page at a time.

Live - presented in session Self-study - read after class ★ Build-along demo 3 courses live + 4 via deep dives
★ What you walk out with today A custom subagent reviewing work in parallel on your machine, one MCP server connected and queried, your first API call running - and the deep-dive roadmap that replaces 24 hours of engineering lectures.
Part 1 · covers "claude platform 101"

The platform map: from chat to production 7 min live

One mental model explains every Claude product: an agent loop with tools, bounded by a context window. Chat hides it, Claude Code exposes it, the API hands you the parts.

the context window - everything the model can "see": instructions, history, tool results. Finite. Managed deliberately. Model thinks Calls a tool Reads result repeat until done
🔍 Click to zoom - the agent loop, the one diagram behind every Claude product
LivePlatform 101 in one card4 min
  • Your first API call is ~10 lines (Demo 3). Everything else - models, tools, thinking - is parameters on that call.
  • Choosing models: the capable one for hard reasoning, the fast one for volume; price and latency scale accordingly. Rule: prototype on the best, optimize down once quality is proven.
  • Tool use = you describe functions, Claude decides when to call them, you execute and return results - the agent loop with YOUR tools. (Deep dive 6.3)
  • Extended thinking: a budget for the model to reason before answering - buy accuracy on hard problems with tokens. (6.5)
  • Built-in tools, skills, MCP: web search, code execution and files come managed; your Session 3 skills and MCP servers plug into the same loop.
  • Context management: the window is finite; production systems curate what's in it every turn - that discipline is half of platform engineering. (6.1, 6.5)
  • Managed agents: the newest layer - define an agent (instructions + tools) and run it as a service without owning the loop yourself.
Real world

For the executives in the room: this is the layer where "Maria's clever workflow" becomes "a company capability". The chief-of-staff briefing from Session 2, rebuilt on the platform, stops depending on Maria's laptop - it becomes a governed service with logs, access control, and an owner. That's the strategic point of everything on this page.

Part 2 · covers "introduction to subagents"

Subagents: delegation with clean context 5 min live

Session 1's working-memory lesson, weaponized: long sessions drift because everything shares one context window. Subagents give each task its OWN window - they work in isolation and return only the summary.

LiveWhat they are, when to use them, how to build one5 min
  • What: a named assistant with its own system prompt, tool permissions, and context window. Your main session delegates ("review this diff"), the subagent works separately, only its conclusion returns - your context stays clean.
  • Create: the /agents command in Claude Code scaffolds one interactively; it lives as a markdown file in .claude/agents/ - committed to the repo, shared like a skill.
  • Design rules: one job per agent (a reviewer that also fixes is neither) · write the description like a skill trigger (when to invoke it) · give it the MINIMUM tools (a read-only reviewer cannot delete data - that's governance by construction) · tell it what to return (a verdict format, not a transcript).
  • Use well: delegate self-contained work with a summarizable result: reviews, research sweeps, test triage, doc generation. Don't delegate work needing YOUR conversation's context - it doesn't have it.
  • Pitfall #1: vague agents ("helper") that do everything badly. Pitfall #2: forgetting the subagent can't see your chat - brief it like an email to a colleague, complete and standalone.
★ A data-QA reviewer subagent (.claude/agents/data-qa.md)--- name: data-qa description: Reviews data-transformation code and outputs for correctness. Use after any change to cleaning or pipeline scripts, or when asked to "QA this". tools: Read, Grep, Bash(pytest*) --- You are a meticulous data-QA reviewer. For the change you're given: 1. Check: joins that can fan out, silent NaN handling, timezone traps, hardcoded paths, seed-less randomness, PII in logs. 2. Run the test suite; report failures verbatim. 3. Return EXACTLY: VERDICT (pass / pass-with-warnings / fail), top 3 issues with file:line, and one-line fix per issue. No praise, no restating the diff.
Part 3 · covers "introduction to MCP" (overview)

MCP: the port that connects Claude to everything 5 min live

Model Context Protocol is the open standard behind every connector you've used since Session 2. One protocol, three primitives - learn it once, plug in anything.

Who decides when this capability fires Does Claude decide to call it mid-task? yes no TOOL model-controlled Does the client load it as context? yes no RESOURCE application-controlled PROMPT user-controlled Tools fire mid-task, resources load like an attached file, prompts are picked by a person.
🔍 Click to zoom - who initiates decides whether it's a tool, a resource, or a prompt
LiveThe three primitives + why this matters to us5 min
  • Tools - actions the server exposes ("query_warehouse", "create_ticket"). Claude calls them in the agent loop.
  • Resources - data the server offers (a schema, a config, a report) that the client can load into context.
  • Prompts - reusable prompt templates the server ships ("analyze this table properly").
  • Client/server: Claude (Code, app, or your API program) is the client; the server wraps your system. Anthropic and vendors ship servers for hundreds of tools; a custom one for YOUR internal API is an afternoon of Python (deep dive 6.6).
  • The connective insight: the Gmail connector (Session 2), Claude Code's tool integrations (Session 5), and your future warehouse hookup are ALL this one protocol. Approve once, reuse everywhere - which is also why sys-admin governance lives at the MCP layer.
Real world

The first MCP server most data teams add: their warehouse (read-only credentials). From then on, "which tables feed the exec dashboard, and when did revenue_daily last refresh?" is a chat message - in Claude Code, in the app, everywhere the server is connected. Second one: the ticket system, so "file the data-quality issues you just found" closes the loop.

Demo 1 of 3

Build the data-QA subagent and delegate to it ★ 8 min · everyone in terminal

In the claude-data-lab repo from Session 5, run /agents → create → paste the data-qa definition (Part 2), or write your own reviewer for your stack.

Make a deliberately sloppy change to the cleaning script (add a join without dedupe). Then: "Use the data-qa agent to review my uncommitted changes."

Watch the handoff: your session stays clean while the subagent works; only the verdict returns. Check it caught the fan-out.

Note the governance angle: the reviewer has read + pytest only. It CANNOT modify anything - by construction, not by promise.

Designing the data-QA subagent ✗ Reviewer, full access Can read, write, and deploy Fixes AND hides the problem Returns a long transcript ✓ Read + pytest only One job: review, never modify Cannot touch data, by construction Returns a verdict format only One job, minimum tools, a stated return format: governance by construction, not by promise.
🔍 Click to zoom - the tool list is the permission model, not the prompt
Demo 2 of 3

Connect an MCP server and use it ★ 7 min · everyone connects

Add a safe, useful server to Claude Code - the filesystem server on a data folder: claude mcp add datafiles -- npx -y @modelcontextprotocol/server-filesystem ~/work/claude-data-lab/data

Restart claude, then ask: "Using the datafiles server, list what's in data/processed and summarize the newest file." Watch the tool calls appear - that's MCP in the loop.

Inspect what you just trusted: claude mcp list, then review what tools the server exposes. The habit of auditing a server before granting it is THE security habit of this layer.

Map your next one: which internal system would pay off most as a server? (Warehouse read-only is the usual answer - take it to the deep dives.)

Demo 3 of 3

Your first API call ★ 5 min · everyone runs it

Grab the team's dev API key from the password manager (or console.anthropic.com if you're key-holder). pip install anthropic, export ANTHROPIC_API_KEY.

Run the ten-liner:

★ first_call.pyimport anthropic client = anthropic.Anthropic() # reads ANTHROPIC_API_KEY msg = client.messages.create( model="claude-sonnet-5", max_tokens=500, system="You are a terse data engineer.", messages=[{"role": "user", "content": "Three ways our nightly ETL could silently drop rows. One line each."}], ) print(msg.content[0].text)

Change the model name, run again, compare. Congratulations: every parameter you'll ever tune is now visible in one file - and the whole deep-dive track builds on these ten lines.

The engineering deep-dive track

Eight pages replacing 24 hours of lectures ◐ self-paced or optional sessions

The three 8-hour platform courses (Building with the Claude API, Claude with Amazon Bedrock, Claude with Vertex AI) share ~85% of their curriculum. The track teaches that shared core once, properly, plus the platform deltas - each page is also runnable as an optional 45-minute DS&AI session. Recommended order below; 6.1 → 6.3 → 6.7 is the minimum path to building real agents.

6.1The Claude APIrequests, multi-turn, system prompts, streaming, structured output
6.2Prompt engineering & evalsXML structure, examples, eval workflow, model- & code-graded tests
6.3Tool useschemas, the tool loop, multiple tools, batch, web search, text editor
6.4RAG & agentic searchchunking, embeddings, BM25, multi-index, reranking, contextual retrieval
6.5Features of Claudeextended thinking, vision, PDFs, citations, prompt caching, Files API
6.6MCP deep divebuild servers & clients; sampling, notifications, roots, transports
6.7Agents & workflowschaining, routing, parallelization, agents vs workflows, computer use
6.8Bedrock & Vertex onboardingrunning Claude inside our AWS estate (and GCP), auth, model IDs, deltas
After the session

This week, and where the series lands

Source material

Official courses covered

From claude.com/resources/courses - this session live, plus four more via the deep-dive track:

Claude Platform 1011 hr · Part 1 + Demo 3: API call, models, agent loop, tool use, thinking, built-ins, context, managed agents
Introduction to subagents20 min · Part 2 + Demo 1: all 4 lessons
Introduction to Model Context Protocol1 hr · Part 3 + Demo 2 at overview level; full build in deep dive 6.6
MCP: Advanced Topics · Building with the Claude API · Claude with Bedrock · Claude with Vertex AI→ deep-dive track 6.1-6.8, ≥80% each
Check yourself

Three questions before you go 🎯 ◐ 90 seconds

1 · A subagent's superpower is...

Session 1's working-memory lesson, weaponized: your context stays clean, the verdict comes back. And give it MINIMUM tools - governance by construction.

2 · MCP's three primitives are...

Actions the server exposes, data it offers, templates it ships. Every connector you've used since Session 2 is this one protocol.

3 · Which model do you prototype on?

Never the reverse: if the best model can't do the task, no cheaper one will - and you'll blame the wrong thing.

Session 6 cheat sheet · pin this

The one modelAgent loop (think → tool → result → repeat) inside a finite context window. Every product is this.
Subagent rulesOne job · skill-like trigger description · minimum tools · fixed return format · brief it standalone.
MCP primitivesTools (actions) · resources (data) · prompts (templates). Connectors ARE MCP - govern at this layer.
First API callclient.messages.create(model, max_tokens, system, messages). Ten lines; everything else is parameters.
Model choicePrototype on the most capable, optimize down after quality is proven - never the reverse.
Deep-dive minimum path6.1 API → 6.3 tool use → 6.7 agents & workflows. Then 6.8 for our AWS estate.