FDE Times dataFDE jobs open 932▼14 Change in open roles over 7 days, like-for-like: roles from companies we started tracking this week are left outNew in 7 days 62Companies hiring 202Remote-friendly 24%Median US pay $201kTop hirer Databricks 92
中文VI

The newspaper of the Forward Deployed Engineer

Books & courses

Anthropic's MCP course stops where the spec gets strict

The course explains sampling and transports well, but clean stdout, Origin checks and a human approving sampling requests are still yours to build and test.

ShareLinkedInFacebookX

In brief

  • Anthropic's course covers sampling, transports and production deployment for MCP; it assumes Python, async programming, JSON/HTTP and SSE.
  • Sampling leaves model choice and permissions with the client; the server only sends preferences and hints.
  • Stateless HTTP scales easily but has trade-offs, and the Python SDK still diverges from the spec in places, so test it yourself.
Diagram of the sampling flow in MCP. The request goes from the MCP server, which needs no API key of its own, to the client, which picks the model and grants permission. From there it passes through the reviewer, shaded orange because they can refuse, and only then reaches the client's model. The result returns to the server.
With sampling, the server needs no API key of its own: it asks the client to call the model. The client picks the model and grants permission. The spec recommends that a human can always refuse the request. Source: MCP specification, version 2025-06-18; Anthropic's course "Model Context Protocol: Advanced Topics".

On April 19th 2026, someone opened an issue on the MCP Python SDK repository. It was short: a Streamable HTTP server configured with stateless_http=True still accepted GET /mcp, contrary to the specification. A small bug, but proof that even the official library does not yet follow the spec everywhere.

That is also the right frame for Anthropic’s “Model Context Protocol: Advanced Topics”, published on Anthropic Academy (which runs on Skilljar). The course centres on server-client communication, transport mechanisms and what to watch for in production deployments. The course page says only © 2026; it gives no release date or length.

For a forward deployed engineer, these are the questions that come up on a client site. Where does the MCP server run? Who holds the model key? What happens when you put it behind a load balancer? The course answers most of them. The rest you have to work out from the spec yourself.

Who should take it, and in what order?

The course expects Python, async programming, JSON/HTTP and a basic grasp of SSE. If async Python is still unfamiliar, learn that first. Otherwise the transport lessons will be hard going, because you will be learning the protocol and the syntax at the same time.

A sensible order is to finish the course, then read the Sampling and Transports pages of the 2025-06-18 version of the spec, and only then open the SDK issue above. That way you move from concepts to the mandatory rules, and then to the place where real code still falls short of them. Three ideas are worth keeping.

The server borrows the client’s model

As the course puts it, sampling is the mechanism by which an MCP server asks for a language model call through the client connected to it. The MCP spec spells out the benefit: the server gets AI capabilities without needing its own API key, while the client keeps control over access, model selection and permissions.

Nor does the server hard-code a model name. It tells the client how much it values cost, speed or model quality, along with a few suggested model names. The spec stresses that these hints are advisory; the final decision belongs to the client.

Say you build a server that summarizes support tickets for a client. With sampling, you do not have to ask the client for a separate key for your server, and their security team still decides which model to use.

The spec does add a recommendation, though: there should always be a human able to refuse a sampling request. If you are writing the client, that approval step is your job.

stdout is for MCP messages only

The spec defines two standard transports, stdio and Streamable HTTP, and recommends that clients support stdio whenever possible. stdio comes with a mandatory rule: the server must not write anything to stdout that is not a valid MCP message. Logs go to stderr.

This mistake is easy to make when you write your own server. A single debugging print pollutes the message stream, and the client receives data it cannot parse. So the first thing to do when setting up a server, before writing any tool, is to configure the logger:

import logging, sys

logging.basicConfig(stream=sys.stderr, level=logging.INFO)
log = logging.getLogger("mcp-server")
log.info("server starting")  # goes to stderr, never touches stdout

Expected result: every log line appears on stderr, and stdout contains only MCP messages. To be sure, deliberately add a print("debug") and watch how the client reacts, so you recognize the symptom immediately next time.

State decides how you scale

The most valuable part of the course teaches you to choose a transport according to deployment requirements, the features you need and scaling limits, including when to use stateless HTTP to scale horizontally behind a load balancer.

Under the spec, sessions in Streamable HTTP are optional. A server may assign an ID through the Mcp-Session-Id header at initialization, and from then on the client must send that ID back with every request.

Take a client running three instances behind a load balancer. Instance A issues the session and holds the state, but the next request lands on instance B, which knows nothing about that session. Running stateless avoids this, but it is not free.

The course points out that configuration flags affect server-initiated requests and streaming. Sampling is precisely a request the server initiates, so you need to check it still works in whatever configuration you choose.

Two more rules belong directly in your test suite, each with its own command, so that when a request is rejected you know exactly which rule blocked it. Replace the address below with your server’s.

The first command checks the divergence raised in the SDK issue: send a GET to a server running stateless_http=True, with no other headers.

curl -i -X GET http://localhost:8000/mcp

The issue proposes that a stateless server return 405 for this request. If your server still accepts it normally, note it down and block it in your own layer rather than trusting the library to handle it.

The second command checks the mandatory rule on the Origin header, which a Streamable HTTP server must validate on every connection to prevent DNS rebinding attacks. Use POST so it does not get mixed up with the GET test above:

curl -i -X POST http://localhost:8000/mcp \
  -H "Origin: http://evil.example" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"ping"}'

You want to see the request rejected. Then run the same command without the Origin line: if only the version with the foreign Origin is blocked, you know the Origin check is working and the request was not failing for some other reason.

Turn the course into evidence on your CV

Do not list only the completion certificate on your CV; attach a small repository that proves you did the work.

Build a server that runs over both stdio and Streamable HTTP, logs to stderr, has a test that rejects a foreign Origin, runs a stateless configuration behind two instances, and comes with a client that has a sampling approval step.

In the README, write a short paragraph explaining why you chose stateful or stateless.

When an FDE job description mentions MCP, agent integration or production deployment, that paragraph is what to bring to the interview. Be ready to walk through the trade-offs, such as why session IDs make load balancing harder, rather than just listing the APIs you called.

Plenty of people will finish this course. Far fewer will have sent GET /mcp to their own server to see what it returns.

Was this article useful?

Use with your AI assistantAsk Claude ↗Ask ChatGPT ↗
4 sources
Read next on the roadmap · Stage 3: Applied AIGiskard's course on breaking chatbots has aged in code, not in ideasEvery FDE is eventually asked what happens when someone attacks the demo; this 99-minute course answers it, though its notebooks rest on Giskard v2.