Appendix A: Cheat sheet
Everything you need to know by heart for the exam, on a few pages.
The basis is the specification 2026-07-28. Where the
Python SDK 2.3.0 answers differently, it is noted – in the exam, the
specification counts.
Roles and primitives (Day 1, 4)
| Term |
Meaning |
| Host |
the human’s application; talks to the model, obtains consent, sets
limits |
| Client |
inside the host, one per server; talks to exactly
one server |
| Server |
offers capabilities, sees only its client, never the
conversation |
| Tool |
model-controlled – the model asks for the call |
| Resource |
application-controlled – the host decides what
enters the conversation |
| Prompt |
user-controlled – the human picks the template, for
example as /befehl |
| Elicitation |
follow-up question to the human (form or URL) |
| Sampling, roots, logging |
deprecated since 2026-07-28 |
| Tasks |
extension
io.modelcontextprotocol/tasks, no longer in the core |
N applications × M services become N + M integrations. MCP does not
govern which model is used or how it decides.
Messages (Day 2)
| Kind |
Characteristic |
| Request |
jsonrpc, id (number or string,
never null), method,
params |
| Result |
same id, result with
resultType |
| Error |
same id, error with code,
message, optional data |
| Notification |
no id, no response |
- No batches in MCP.
- No handshake: Every request carries the required
fields
io.modelcontextprotocol/protocolVersion and
io.modelcontextprotocol/clientCapabilities in
params._meta, usually also
io.modelcontextprotocol/clientInfo.
- The prefix
io.modelcontextprotocol/ belongs to the
protocol; your own keys use your own prefix
(de.firma/kostenstelle).
resultType: complete (done) or
input_required (follow-up question, Day 10).
- Removed:
initialize, ping,
logging/setLevel, resources/subscribe,
resources/unsubscribe,
notifications/roots/list_changed,
Mcp-Session-Id, GET stream.
Methods
| Method |
Purpose |
Day |
server/discover |
What can the server do? (version, capabilities,
serverInfo, instructions) |
1 |
tools/list · tools/call |
list tools · call them (name,
arguments) |
1, 5 |
resources/list · resources/templates/list
· resources/read |
fixed resources · templates (RFC 6570) · read |
6 |
prompts/list · prompts/get |
list templates · fill them with arguments |
7 |
completion/complete |
up to 100 suggestions for an argument (ref/prompt,
ref/resource) |
7 |
subscriptions/listen |
subscribe to changes (stream) |
9 |
notifications/progress |
progress for a request with progressToken |
9 |
notifications/subscriptions/acknowledged |
first message on the listen stream |
9 |
Error codes
| Code |
Meaning |
HTTP |
Day |
-32700 |
Parse error – not valid JSON |
400 |
2 |
-32600 |
Invalid request – broken envelope |
400 |
2 |
-32601 |
method not found (also ping,
resources/subscribe) |
404 |
2, 8 |
-32602 |
wrong parameters: unknown tool, unknown resource, unknown prompt,
missing required argument, missing _meta, tampered
requestState |
400 |
2, 6, 7, 10 |
-32603 |
internal error (SDK 2.3.0 also for a missing prompt argument) |
– |
7 |
-32020 |
header does not match the body or is missing, duplicate header |
400 |
8, 14 |
-32021 |
client capability missing
(data.requiredCapabilities) |
400 |
10 |
-32022 |
version not supported (data.supported,
data.requested) |
400 |
2 |
-32002 |
old code for a missing resource – today
-32602 |
– |
6 |
Protocol error or execution error?
| Situation |
Response |
| tool does not exist |
-32602 (SDK 2.3.0: isError: true) |
| arguments do not match the schema |
isError: true – the model can correct itself |
| tool fails (service gone, file missing) |
isError: true with an explanation, HTTP
200 |
| crash inside the tool |
isError: true with a neutral message, details only in
the log |
Schemas and results (Day 3)
inputSchema is always an object (JSON
Schema 2020-12); without parameters
{"type":"object","additionalProperties":false}.
outputSchema → required: matching
structuredContent, plus the same content
as text in content.
- Content types in
content: text,
image, audio (Base64 + mimeType),
resource_link (reference), resource
(embedded).
- Python types → schema:
Literal[…] → enum,
Field(ge, le) → minimum/maximum,
Field(pattern, max_length) →
pattern/maxLength, BaseModel →
object with required.
Annotations – hints, not guarantees; believe them
only from trusted servers:
| Annotation |
Default if not set |
means when true |
readOnlyHint |
false |
changes nothing |
destructiveHint |
true |
can destroy data (only meaningful if not read-only) |
idempotentHint |
false |
repeating with the same arguments changes nothing further |
openWorldHint |
true |
talks to the outside world |
Tools (Day 4, 5)
- Model interaction flow: discover → question → model
with tool list → model’s request → check and consent in the host →
tools/call → result → back to the model → answer.
- The client in the host sends the
tools/call, never the model.
- The server sees only name and arguments, not the conversation.
- Names are only unique per server → the host assigns a
prefix (
leitstand__speicher).
- The server’s
instructions belong in the host’s system
prompt.
- State without sessions: handles as arguments,
checked on every call, opaque.
- A good error message: what was wrong, why, and what to do
instead.
Resources and prompts (Day 6, 7)
resources/read → contents[] with
uri, mimeType, and text
or blob (Base64).
- Annotations:
audience (user,
assistant), priority (0–1),
lastModified.
- Caching:
ttlMs (validity in milliseconds),
cacheScope (public = the same for all callers,
otherwise per user).
- Long lists:
nextCursor in the result,
cursor in the next request.
- Protect templates with paths against path
traversal.
prompts/get → messages[] with role
user or assistant; content text, image, audio,
resource.
completion/complete → completion.values
(max. 100), total, hasMore;
context.arguments = values already chosen.
Streamable HTTP (Day 8)
| Header |
Rule |
Accept |
application/json, text/event-stream – if one is
missing: 406 |
Content-Type |
application/json |
MCP-Protocol-Version |
same as _meta; if missing, the SDK takes the old path
with sessions |
Mcp-Method |
required on every request |
Mcp-Name |
for tools/call, prompts/get,
resources/read; non-ASCII as =?base64?…?= |
Origin |
server must check; foreign →
403 |
Host |
the SDK checks it too; foreign → 421 |
Authorization |
Bearer <token>, on every
request, never in the URL |
| Status code |
When |
| 200 |
result, also with isError: true; as JSON or SSE
stream |
| 202 |
notification accepted, no body |
| 400 |
protocol error (-32700, -32600,
-32602, -32020 to -32022) |
| 401 / 403 |
token missing or invalid / scope missing
(insufficient_scope) or foreign Origin |
| 404 |
method not found (-32601) – or wrong path (then without
JSON-RPC) |
| 405 |
GET on the endpoint |
| 406 |
Accept incomplete |
| 413 / 429 |
request too large / too many requests (gateway) |
- One endpoint (SDK:
/mcp), every request a
POST with exactly one message.
- SSE stream: notifications,
: ping, the response
is the last event.
- Cancellation = close the connection.
- DNS rebinding protection in the SDK is automatic only for
127.0.0.1/localhost; for 0.0.0.0
use
TransportSecuritySettings(allowed_hosts=…, allowed_origins=…).
Subscriptions and progress (Day 9)
- Progress: the client sets
progressToken in
_meta → notifications/progress with
progress (increasing), optional total,
message, on the response stream of the same call.
subscriptions/listen with
toolsListChanged, promptsListChanged,
resourcesListChanged, resourceSubscriptions
(list of URIs).
- First
notifications/subscriptions/acknowledged; every
notification carries io.modelcontextprotocol/subscriptionId
= id of the request.
- Notifications only say that something changed → the
client reloads. No replay after a disconnect.
Follow-up questions: MRTR (Day 10)
Round 1 Client → tools/call
Server → result: { resultType: "input_required",
inputRequests: { "frage1": { method: "elicitation/create", params: … } },
requestState: "…" }
Round 2 Client → tools/call (same arguments) + inputResponses: { "frage1": { action: "accept", content: … } }
+ requestState unchanged
Server → result: { resultType: "complete", … }
- Applies to
tools/call, prompts/get,
resources/read.
- Keys in
inputRequests: elicitation/create,
sampling/createMessage, roots/list.
- Elicitation form: flat schema (
string,
number, integer, boolean,
enum); response accept / decline
/ cancel. No passwords, keys, card data →
URL mode (mode: "url").
- Capability missing →
-32021. Tampered or expired
requestState → -32602.
requestState is input from outside: sign or encrypt it,
set an expiry (SDK: AES-GCM, 10 minutes, key per process – this does not
prevent replay).
Security (Day 11)
| Attack |
Path |
Countermeasure |
| Tool poisoning |
instruction in the tool description |
approval with fingerprint, vet servers |
| Indirect prompt injection |
instruction in results, resources, file names |
consent before changes; the model is no protection |
| Rug pull |
description changes after approval |
fingerprint over name, description, schema, annotations; new
approval |
| Tool shadowing |
description refers to other servers’ tools |
prefix, fingerprint, few servers |
| Data exfiltration |
data from server A as an argument to server B |
only the host sees both → ask the human when switching servers |
Authorization (Day 12, 13)
Client ──POST──▶ MCP-Server 401 + WWW-Authenticate: Bearer resource_metadata="…"
Client ──GET───▶ /.well-known/oauth-protected-resource → resource, authorization_servers, scopes_supported
Client ──GET───▶ AS: /.well-known/oauth-authorization-server (or openid-configuration)
→ issuer (must match), code_challenge_methods_supported
Browser ───────▶ /authorize code_challenge (S256) + resource + scope
Client ──POST──▶ /token code + code_verifier + resource
Client ──POST──▶ MCP-Server Authorization: Bearer <access token>
- Server = OAuth 2.1 resource server; checks
signature,
iss, exp,
aud → otherwise 401.
- PKCE S256 is required; if
code_challenge_methods_supported is missing → the client
aborts.
resource (RFC 8707) in the authorization request
and the token request binds the token to one
server.
- Missing scope → 403
error="insufficient_scope", scope="…" → the client requests
the union (step-up).
- Client ID: preregistered → CIMD (HTTPS URL as
client ID, document with
client_id,
client_name, redirect_uris) →
DCR (deprecated).
- No token passthrough. For the next service:
token exchange (RFC 8693).
- Confused deputy: a server with broad rights of its
own acts for humans with narrow ones.
- Refresh tokens of public clients are rotated; reuse
ends the login session.
- stdio: no OAuth requirement, credentials come from the
environment.
Operations and audit (Day 14)
- Audit log: who (from the validated token, not
clientInfo), what, when, with what, result; no tokens, no
secrets.
- Trace context in
_meta: traceparent,
tracestate, baggage.
- Without sessions: any number of replicas behind a normal load
balancer.
- The gateway filters by
Mcp-Method/Mcp-Name
and must decode or block =?base64?…?=; the server compares
header and body (-32020).
- Limits in every layer: 429, 413, 403, CPU and memory limits.
Ecosystem (Day 15)
- MCP Registry: metaregistry for
server.json with packages (npm, PyPI, OCI …)
and/or remotes (URL, always HTTPS). Name in reverse domain
notation with / (io.github.anna/wetter),
protected by GitHub, DNS, or HTTP verification.
- Versions are immutable; status
active,
deprecated (visible), deleted (removed from
the list).
- Host configuration:
mcpServers with
command/args/env (Claude Desktop,
Cursor) · servers with type (VS Code).
Absolute paths.
- Extensions via
capabilities.extensions; they apply only
if both sides name them; fall back gracefully.
- MCP Apps: tool with
_meta.ui.resourceUri → ui:// resource,
text/html;profile=mcp-app, in a sandboxed
iframe.
- Skills:
SKILL.md as a resource under
skill://; the host checks the fingerprint.
- Old era: the client tries
server/discover and falls
back to initialize; the server tells them apart by the
header. Old clients bring sessions back.
Traps in exam questions (Day 16)
- true, but not asked · old era (
initialize, session,
ping, -32002) · wrong role (the model calls,
the server asks humans directly) · hint instead of guarantee
(annotations, clientInfo) · SDK instead of specification ·
absolute words (“always”, “never”, “guaranteed”).
- Read the specification’s MUST / SHOULD / MAY carefully.