Skip to content
MCPA · Chapter 10 of 21 Day 8: Streamable HTTP

Day 8: Streamable HTTP

Goal: run an MCP server over HTTP, talk to it directly with curl, understand headers, status codes, JSON and SSE responses, protect the server against DNS rebinding, and use it from the host · Duration: about 2.5 h · Prerequisite: Day 7

Where we start

# on cp1, in ~/mcpa/tag07
jq -r 'select(.id==2) | .result.prompts[].name' p.out

Expected:

stoerungsbericht
uebergabe
# on worker1
uv --version

Expected: uv 0.13.10

If the first output is missing, work through Day 7, Drills 1 and 2. If uv is missing on worker1, repeat Day 0, Drill 3 on worker1. Today you also need all server files and the host from ~/mcpa/tag07.

Introduction

So far all servers ran as child processes of the client on the same machine: the client starts the program and talks to it via stdin and stdout. That is simple and safe, but it is not enough when a server has to run on a different machine – because the data lives there, because several people use it together, or because a team runs it centrally.

That is what the second standard transport is for: Streamable HTTP. The server is a web server with a single address, and every request is an HTTP POST. Today you put the control room (leitstand) on worker1 on the network, talk to it from cp1 with curl, and look at what happens on the wire: which headers are mandatory, which status codes belong to which errors, when a response comes as JSON and when as a data stream, and how cancellation works. Then you protect the server against requests from foreign web pages and connect it to your host – which then uses tools on two machines at the same time.

Today you learn:

  • how Streamable HTTP works in version 2026-07-28: one POST, one message, no session,
  • the headers MCP-Protocol-Version, Mcp-Method, and Mcp-Name and the error -32020,
  • which HTTP status codes belong to which JSON-RPC errors,
  • when a server responds with JSON and when with Server-Sent Events,
  • how a client cancels a request over HTTP,
  • why a server must check Origin and Host and how you set this up in the SDK,
  • how client and host address a remote server via its URL.

Background

The picture for today: the off-site service provider

Until now, all service providers of your hotel lived in the house: the front desk (the host) went down the corridor (stdio) and knocked on their door. Today one provider moves to another building, on worker1. The front desk now reaches it only through order slips delivered by courier – every order slip is an HTTP POST.

  • Every order slip is complete: who orders, in which version, what exactly. The provider does not have to remember any earlier slip – there is no session.
  • The envelope carries stickers with the type and name of the order (Mcp-Method, Mcp-Name). The gatekeeper (gateway, firewall) can sort mail without opening the envelope. The provider compares stickers and content; if they do not match, it refuses the slip.
  • If an order takes longer, the provider calls in between: “We are still working” – that is the SSE stream with : ping.
  • Hanging up cancels the order: if the front desk closes the connection, the provider stops.
  • The gatekeeper also checks where a slip comes from (Origin) and which address it is meant for (Host). A slip slipped in by a stranger does not get through.

The terms

Term Meaning In the picture
Streamable HTTP transport in which every request is an HTTP POST to one endpoint order slip by courier
MCP endpoint the server’s single address, /mcp in the SDK the provider’s mailbox
Mcp-Method, Mcp-Name copies of method and name from the body as headers stickers on the envelope
-32020 HeaderMismatch headers and body do not match stickers and content contradict each other
SSE (Server-Sent Events) response as a data stream with interim messages “still working” calls
Cancellation closing the connection hanging up
Origin/Host check protection against DNS rebinding gatekeeper checks sender and address

Remember: Over HTTP every request is a complete order slip. The stickers help the gatekeeper – the decision is made on the content, and both must match.

One POST per request

With Streamable HTTP, the server has a single address, the MCP endpoint – /mcp by default in the SDK. Every client request is a separate HTTP POST to this address, with exactly one JSON-RPC message in the body. The response comes back in the HTTP response to the same POST. There is no session and no handshake. Because every request brings its own _meta (Day 2), each POST is complete on its own. A server can therefore run on several machines behind a load balancer without them having to share state.

What Rule
Method only POST; the server answers other methods with 405 and Allow: POST
Body exactly one JSON-RPC message; batches (lists) are not allowed
Content-Type application/json
Accept the client must accept both formats: application/json, text/event-stream; otherwise 406
Notification from the client is acknowledged with 202 Accepted without a body

The headers of version 2026-07-28

A load balancer, a gateway, or a firewall should be able to decide where a request goes without reading the JSON body. That is why the client repeats the most important fields as HTTP headers:

Header Content Mandatory
MCP-Protocol-Version the version, for example 2026-07-28 – the same as in _meta always
Mcp-Method the JSON-RPC method, for example tools/call always
Mcp-Name the name from params.name or params.uri for tools/call, prompts/get, resources/read

The server compares the headers with the body. If a mandatory header is missing or differs, it responds with -32020 HeaderMismatch and HTTP 400. This way nobody can show a gateway a harmless method in the header and have a different one executed from the body.

Status codes and JSON-RPC errors

Over HTTP there are two levels: the HTTP status code and, in the body, the JSON-RPC error. The specification maps them to each other:

JSON-RPC error HTTP status
-32700 Parse error, -32600 Invalid Request, -32602 Invalid params 400
-32020 HeaderMismatch, -32021 MissingRequiredClientCapability, -32022 UnsupportedProtocolVersion 400
-32601 Method not found 404
Result, even with isError: true 200

A tool error (isError) is not a protocol error – the request was fine, only the tool did not work. That is why it comes with 200.

JSON or SSE

The server may respond to a POST in two ways:

  • Content-Type: application/json – a single JSON object. This is the normal case for short requests.
  • Content-Type: text/event-stream – a data stream in the Server-Sent Events (SSE) format. Notifications can arrive in it before the actual response (progress, Day 9), and the server can use comment lines (: ping) to show that it is still working. The last message in the stream is the response; after that the server closes it.

An SSE event consists of lines event: … and data: … and ends with an empty line. Lines starting with : are comments and are ignored by the client. The SDK responds with JSON if the handler finishes within 15 seconds and reports nothing. Otherwise it switches to SSE and sends a : ping every 15 seconds so that a proxy does not close the silent connection.

Cancellation

Over stdio, a client cancels a request with a message. Over HTTP it is enough to close the connection: the server notices the end of the response stream and stops the work. There is no separate cancellation message on this path.

Origin and Host: protection against DNS rebinding

An MCP server over HTTP is a web server – and therefore also reachable by web pages in a user’s browser. With DNS rebinding, an attacker makes the name of their web page point to an internal address, such as 127.0.0.1, shortly after it loads. The JavaScript on their page then sends requests to your local MCP server, and the browser considers this the same origin.

The specification therefore requires:

  • The server must check the Origin header if it is present and reject an unknown origin with 403 Forbidden. Browsers always send Origin; programs such as curl or the SDK do not.
  • A server that is only needed locally should listen only on 127.0.0.1, not on 0.0.0.0.
  • Servers should require authentication (Days 12 and 13).

Many servers additionally check the Host header: it must be one of the names under which the server is actually reachable. The SDK responds to a wrong Host with 421 Misdirected Request. It turns on both checks automatically only if the server listens on 127.0.0.1, localhost, or ::1. If you listen on 0.0.0.0, you have to set them up yourself – you do that in Drill 6.

Two eras on one endpoint

Older clients (version 2025-11-25 and earlier) talk over HTTP with initialize and a session in the header Mcp-Session-Id. A server can serve both: the SDK looks at the header MCP-Protocol-Version. If it names a new version, the new world without sessions applies. If it is missing or names an old version, the request ends up on the old path – and that expects an initialize first.

Drill 1: The control room on worker1

Where you are: first on worker1, then on your own computer, then on worker1 again.

What you have afterwards: a Python project on worker1 and the control room as an HTTP server on port 8000, running in its own terminal.

Step 1 – Create the project on worker1. Log in with ssh worker1. The project looks like the one on cp1 from Day 0, Drill 7:

# on worker1
mkdir -p ~/mcpa/tag08
# on worker1
cd ~/mcpa
# on worker1, in ~/mcpa
uv init --bare --python 3.12 .
# on worker1, in ~/mcpa
uv add "mcp[cli]==2.3.0"
  • mkdir -p ~/mcpa/tag08 creates the project directory and, inside it, the directory for today. -p also creates missing intermediate directories and reports no error if they already exist.
  • uv init --bare --python 3.12 . creates a Python project in the current directory (.). --bare creates only the file pyproject.toml, without sample code. --python 3.12 sets the Python version.
  • uv add "mcp[cli]==2.3.0" adds the SDK in exactly the course’s version and installs it into the virtual environment .venv. The quotation marks prevent the shell from interpreting [cli] as a file name pattern.

Step 2 – Copy the control room. The control room lives on cp1. From your own computer, copy it directly from cp1 to worker1:

# on your computer
scp -3 cp1:mcpa/tag07/leitstand.py worker1:mcpa/tag08/
  • scp copies files over SSH. Source and target have the form host:path; a path without a leading / is relative to the home directory on that machine.
  • -3 routes the data through your computer. Without this option, cp1 would have to log in to worker1 itself – but cp1 has no key for that. With -3, your computer logs in to both.
  • cp1 and worker1 are the short names from your SSH configuration (Day 0, Drill 1).

Step 3 – Write the start program. Back on worker1:

# on worker1
cd ~/mcpa/tag08
# on worker1, in ~/mcpa/tag08
nano fern.py
~/mcpa/tag08/fern.py new file
import sys
from typing import Annotated

import anyio
from mcp.types import ToolAnnotations
from pydantic import Field

from leitstand import mcp


@mcp.tool(title="Warten", annotations=ToolAnnotations(read_only_hint=True))
async def warten(sekunden: Annotated[int, Field(ge=1, le=60)]) -> str:
    """Wartet die angegebene Zahl von Sekunden und meldet sich dann. Zum Üben von Abbruch und SSE."""
    print(f"warten: Start, {sekunden} s", file=sys.stderr, flush=True)
    await anyio.sleep(sekunden)
    print("warten: fertig", file=sys.stderr, flush=True)
    return f"{sekunden} Sekunden gewartet"


mcp.run(transport="streamable-http", host="0.0.0.0", port=8000)

fern.py (remote) does not change leitstand.py; instead it imports the finished server and starts it differently:

  • from leitstand import mcp loads leitstand.py as a module and fetches the object mcp with the three tools. The block if __name__ == "__main__": in leitstand.py does not run, because on import __name__ is "leitstand" and not "__main__". So the server does not start over stdio.
  • @mcp.tool(...) adds a fourth tool to the imported server. warten (wait) waits the given number of seconds (ge=1, le=60: 1 to 60) and then reports back. It is asynchronous (async def) and waits with await anyio.sleep(…). This way it does not block the server, and the server can cancel it.
  • The two print(…, file=sys.stderr, flush=True) calls write start and end to the server’s terminal. With HTTP, stdout would also be free, but stderr is the habit from the stdio days. flush=True writes immediately instead of buffered.
  • mcp.run(transport="streamable-http", host="0.0.0.0", port=8000) starts a web server instead of stdio:
    • transport="streamable-http" selects the HTTP transport.
    • host="0.0.0.0" listens on all network interfaces so that cp1 can reach the server. The default would be 127.0.0.1, that is, only access from worker1 itself.
    • port=8000 is the TCP port. The endpoint’s path is /mcp by default in the SDK.

Step 4 – Start the server. The server runs in the foreground and occupies this terminal. Leave it open; here you will see every request in a moment. For everything else, open a second terminal with ssh cp1.

# on worker1, in ~/mcpa/tag08
uv run python fern.py

Expected (the last lines):

INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)

Uvicorn is the web server the SDK uses under the hood. It accepts the HTTP connections and passes each request on to the SDK. You stop it with Ctrl+C.

Remember: The same server, started differently: mcp.run(transport="streamable-http", host="0.0.0.0") turns the in-house provider into a provider with its own mailbox at /mcp.

Save your progress? Sign up for free

Drill 2: The first request with curl

Where you are: on cp1, in the second terminal. The server on worker1 is running.

What you have afterwards: the response to server/discover with all HTTP headers and a tool call over HTTP.

Step 1 – The body. The body of a request is the same JSON-RPC message as over stdio. Put it in a file so the commands stay short:

# on cp1
mkdir -p ~/mcpa/tag08
# on cp1
cd ~/mcpa/tag08
# on cp1, in ~/mcpa/tag08
nano discover.json
~/mcpa/tag08/discover.json new file
{"jsonrpc":"2.0","id":1,"method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/protocolVersion":"2026-07-28","io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"curl","version":"8.5.0"}}}}

The whole message is on one line – just as it is sent over stdio.

Step 2 – The POST.

# on cp1, in ~/mcpa/tag08
curl -si http://worker1:8000/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "MCP-Protocol-Version: 2026-07-28" \
  -H "Mcp-Method: server/discover" \
  --data @discover.json
  • curl sends an HTTP request to the URL. -s (silent) suppresses the progress display, -i (include) shows the response headers before the body.
  • -H "Name: Wert" sets a header. The four headers are:
    • Content-Type: application/json – the body is JSON.
    • Accept: application/json, text/event-stream – the client accepts both response formats. This is mandatory.
    • MCP-Protocol-Version: 2026-07-28 – the version, the same as in _meta.
    • Mcp-Method: server/discover – the method from the body.
  • --data @discover.json sends the content of the file as the body. The @ means “read from file”. With --data, the request automatically becomes a POST.
  • The \ at the end of a line continues the command on the next line.

Expected (date differs):

HTTP/1.1 200 OK
date: Sat, 28 Nov 2026 12:31:54 GMT
server: uvicorn
content-length: 440
content-type: application/json

{"jsonrpc":"2.0","id":1,"result":{"cacheScope":"private","capabilities":{"prompts":{"listChanged":true},"resources":{"listChanged":true,"subscribe":true},"tools":{"listChanged":true}},"instructions":"Werkzeuge für den Betrieb der Labor-Rechner: Plattenplatz, Laufzeit, Dienste.","resultType":"complete","supportedVersions":["2026-07-28"],"ttlMs":0,"_meta":{"io.modelcontextprotocol/serverInfo":{"name":"leitstand","version":"1.2.0"}}}}

The first line is the status line: 200 OK. It is followed by the response headers and, after an empty line, the body. content-type: application/json says that the response is a single JSON object. The content is the same as over stdio in Day 2. At the same time, this appears in the server’s terminal:

INFO:     172.16.0.126:55336 - "POST /mcp HTTP/1.1" 200 OK

Step 3 – A tool over HTTP. You put the three headers that are the same for every request into a shell variable:

# on cp1, in ~/mcpa/tag08
KOPF=(-H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" -H "MCP-Protocol-Version: 2026-07-28")
  • KOPF=( … ) creates a Bash array, a list of words. "${KOPF[@]}" inserts all elements individually again, as if you had typed them. The quotation marks keep Accept: application/json, text/event-stream together as one word.

Then the body for the tool call:

# on cp1, in ~/mcpa/tag08
nano speicher.json
~/mcpa/tag08/speicher.json new file
{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"speicher","arguments":{"pfad":"/"},"_meta":{"io.modelcontextprotocol/protocolVersion":"2026-07-28","io.modelcontextprotocol/clientCapabilities":{}}}}

And the call:

# on cp1, in ~/mcpa/tag08
curl -s http://worker1:8000/mcp "${KOPF[@]}" -H "Mcp-Method: tools/call" -H "Mcp-Name: speicher" --data @speicher.json | jq -c .result.structuredContent
  • Mcp-Name: speicher is mandatory for tools/call and repeats params.name.
  • | jq -c .result.structuredContent shows only the structured result.

The variable KOPF (header) applies only in this terminal. If you open a new one, create it again.

Expected (your numbers differ):

{"pfad":"/","gesamt":28.0,"frei":24.1,"einheit":"GB","belegt_prozent":14.0}

This is worker1’s disk: 28 GB instead of cp1’s 76 GB. The tool measures where the server runs – the sentence from the control room’s error message in Day 5 now becomes important.

Remember: An MCP request over HTTP needs four things: POST to /mcp, Content-Type, Accept with both formats, and the routing headers. The body is the same JSON-RPC message as over stdio.

Save your progress? Sign up for free

Drill 3: Headers, status codes, and errors

Where you are: on cp1, in ~/mcpa/tag08, with the variable KOPF from Drill 2.

What you have afterwards: the server’s responses to eight faulty requests, with status code.

-w ' -> HTTP %{http_code}\n' appends the HTTP status code to every output. -w (write-out) prints a text after the transfer, %{http_code} is the placeholder for the status code.

Step 1 – Headers that do not match the body. First a request without any Mcp-Method:

# on cp1, in ~/mcpa/tag08
curl -s -w ' -> HTTP %{http_code}\n' http://worker1:8000/mcp "${KOPF[@]}" --data @discover.json

Expected:

{"jsonrpc":"2.0","id":1,"error":{"code":-32020,"message":"mcp-method header does not match the request body's method"}} -> HTTP 400

Then a call in which Mcp-Name names the tool dienst, but the body names speicher:

# on cp1, in ~/mcpa/tag08
curl -s -w ' -> HTTP %{http_code}\n' http://worker1:8000/mcp "${KOPF[@]}" -H "Mcp-Method: tools/call" -H "Mcp-Name: dienst" --data @speicher.json

Expected:

{"jsonrpc":"2.0","id":2,"error":{"code":-32020,"message":"mcp-name header does not match the request body's 'name' parameter"}} -> HTTP 400

Stickers and content contradict each other. Both times the server responds with -32020 HeaderMismatch and 400 – and executes nothing.

Step 2 – Versions. Create two variants of discover.json that differ only in the version in _meta. The first names a version from the future:

# on cp1, in ~/mcpa/tag08
nano version2027.json
~/mcpa/tag08/version2027.json new file
{"jsonrpc":"2.0","id":1,"method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/protocolVersion":"2027-01-01","io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"curl","version":"8.5.0"}}}}

The second an old version:

# on cp1, in ~/mcpa/tag08
nano version2025.json
~/mcpa/tag08/version2025.json new file
{"jsonrpc":"2.0","id":1,"method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/protocolVersion":"2025-11-25","io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"curl","version":"8.5.0"}}}}

You send the first file with a matching header, that is, MCP-Protocol-Version: 2027-01-01:

# on cp1, in ~/mcpa/tag08
curl -s -w ' -> HTTP %{http_code}\n' http://worker1:8000/mcp -H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" -H "MCP-Protocol-Version: 2027-01-01" -H "Mcp-Method: server/discover" --data @version2027.json

Expected:

{"jsonrpc":"2.0","id":1,"error":{"code":-32022,"message":"Unsupported protocol version","data":{"supported":["2026-07-28"],"requested":"2027-01-01"}}} -> HTTP 400

You send the second with KOPF, that is, with the header 2026-07-28 – but the body says 2025-11-25:

# on cp1, in ~/mcpa/tag08
curl -s -w ' -> HTTP %{http_code}\n' http://worker1:8000/mcp "${KOPF[@]}" -H "Mcp-Method: server/discover" --data @version2025.json

Expected:

{"jsonrpc":"2.0","id":1,"error":{"code":-32020,"message":"mcp-protocol-version header does not match the request envelope's protocol version"}} -> HTTP 400

The server answers an unknown version with -32022. In data.supported it names the versions it supports so that the client can renegotiate (Day 2). If header and _meta contradict each other, that is again -32020.

Step 3 – Unknown method, broken JSON, batch. For the unknown method, a copy of discover.json with the method tools/run, which does not exist:

# on cp1, in ~/mcpa/tag08
nano unbekannt.json
~/mcpa/tag08/unbekannt.json new file
{"jsonrpc":"2.0","id":1,"method":"tools/run","params":{"_meta":{"io.modelcontextprotocol/protocolVersion":"2026-07-28","io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"curl","version":"8.5.0"}}}}
# on cp1, in ~/mcpa/tag08
curl -s -w ' -> HTTP %{http_code}\n' http://worker1:8000/mcp "${KOPF[@]}" -H "Mcp-Method: tools/run" --data @unbekannt.json

Expected:

{"jsonrpc":"2.0","id":1,"error":{"code":-32601,"message":"Method not found","data":"tools/run"}} -> HTTP 404

You write broken JSON directly into the command. -d is the short form of --data:

# on cp1, in ~/mcpa/tag08
curl -s -w ' -> HTTP %{http_code}\n' http://worker1:8000/mcp "${KOPF[@]}" -H "Mcp-Method: tools/list" -d '{kaputt'

Expected:

{"jsonrpc":"2.0","error":{"code":-32700,"message":"Parse error"},"id":null} -> HTTP 400

A batch is a list of requests. The file contains the same request as discover.json, just in square brackets:

# on cp1, in ~/mcpa/tag08
nano batch.json
~/mcpa/tag08/batch.json new file
[{"jsonrpc":"2.0","id":1,"method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/protocolVersion":"2026-07-28","io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"curl","version":"8.5.0"}}}}]
# on cp1, in ~/mcpa/tag08
curl -s -w ' -> HTTP %{http_code}\n' http://worker1:8000/mcp "${KOPF[@]}" -H "Mcp-Method: server/discover" --data @batch.json

Expected:

{"jsonrpc":"2.0","error":{"code":-32600,"message":"Body must be a single JSON-RPC request or notification object"},"id":null} -> HTTP 400
  • An unknown method is -32601 with 404.
  • Broken JSON is -32700 with 400. Over stdio, the SDK silently discarded such lines in Day 2. Over HTTP it responds as the specification requires. The id is null because the server could not read an id from the broken body.
  • Batches no longer exist since 2026-07-28: -32600 with 400.

Step 4 – Method, Accept, and notification. First a call without --data – then curl sends a GET:

# on cp1, in ~/mcpa/tag08
curl -si http://worker1:8000/mcp -H "MCP-Protocol-Version: 2026-07-28"

Expected (date differs):

HTTP/1.1 405 Method Not Allowed
date: Sat, 28 Nov 2026 12:31:54 GMT
server: uvicorn
allow: POST
content-length: 0

Then a POST that accepts only JSON with Accept: application/json, no SSE. -o /dev/null throws the body away (-o writes it to a file, /dev/null swallows everything):

# on cp1, in ~/mcpa/tag08
curl -s -o /dev/null -w 'HTTP %{http_code}\n' http://worker1:8000/mcp -H "Content-Type: application/json" -H "Accept: application/json" -H "MCP-Protocol-Version: 2026-07-28" -H "Mcp-Method: server/discover" --data @discover.json

Expected:

HTTP 406

Finally a notification, that is, a message without id:

# on cp1, in ~/mcpa/tag08
curl -s -o /dev/null -w 'HTTP %{http_code}\n' http://worker1:8000/mcp "${KOPF[@]}" -H "Mcp-Method: notifications/cancelled" -d '{"jsonrpc":"2.0","method":"notifications/cancelled","params":{"requestId":2}}'

Expected:

HTTP 202
  • 405 with allow: POST: the endpoint accepts only POST. In older versions, a GET opened a stream for messages from the server. This job is now done by subscriptions/listen (Day 9).
  • 406 Not Acceptable: the client must accept both formats, because the server decides only while working whether it sends JSON or SSE.
  • 202 Accepted without a body: notifications are acknowledged. A notifications/cancelled has no effect over HTTP, however, because cancellation works differently here (Drill 5).

Remember: 400 means “faulty order slip” (headers, version, JSON, batch), 404 “this service does not exist”, 405 “POST only”, 406 “accept both response formats”, 202 “message received”.

Save your progress? Sign up for free

Drill 4: Two eras on one endpoint

Where you are: on cp1, in ~/mcpa/tag08.

What you have afterwards: the server’s response to a request without MCP-Protocol-Version.

# on cp1, in ~/mcpa/tag08
curl -si http://worker1:8000/mcp \
  -H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" \
  -H "Mcp-Method: server/discover" --data @discover.json

This time the header MCP-Protocol-Version is missing; otherwise everything is as in Drill 2.

Expected (session number differs):

HTTP/1.1 400 Bad Request
date: Sat, 28 Nov 2026 12:32:40 GMT
server: uvicorn
content-type: application/json
mcp-session-id: d76d77a24b3545c9b49a60bff4547d24
content-length: 95

{"jsonrpc":"2.0","id":null,"error":{"code":-32600,"message":"Bad Request: Missing session ID"}}

This is not a response from the new world. Without the version header, the SDK routed the request to the old path, which it keeps ready for clients up to 2025-11-25. There, every connection starts with initialize, and the server assigns a session in the header mcp-session-id. It rejects a request without a session.

So over HTTP the header decides the era, not the first message as over stdio. For you as a developer this means: if MCP-Protocol-Version is missing, you get confusing errors about sessions. For the exam: in 2026-07-28 there is no Mcp-Session-Id and no initialize.

Remember: Without MCP-Protocol-Version, an order slip ends up in the old mailbox with sessions. The header decides the era.

Save your progress? Sign up for free

Drill 5: JSON, SSE, and cancellation

Where you are: on cp1, in ~/mcpa/tag08. Keep an eye on the server’s terminal on worker1.

What you have afterwards: a JSON response, an SSE response with ping, and a cancelled tool call.

Step 1 – Three requests for warten. The three files differ only in the number for sekunden (seconds): 3, 20, and 10. First three seconds:

# on cp1, in ~/mcpa/tag08
nano warten3.json
~/mcpa/tag08/warten3.json new file
{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"warten","arguments":{"sekunden":3},"_meta":{"io.modelcontextprotocol/protocolVersion":"2026-07-28","io.modelcontextprotocol/clientCapabilities":{}}}}

Then 20 seconds:

# on cp1, in ~/mcpa/tag08
nano warten20.json
~/mcpa/tag08/warten20.json new file
{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"warten","arguments":{"sekunden":20},"_meta":{"io.modelcontextprotocol/protocolVersion":"2026-07-28","io.modelcontextprotocol/clientCapabilities":{}}}}

And 10 seconds:

# on cp1, in ~/mcpa/tag08
nano warten10.json
~/mcpa/tag08/warten10.json new file
{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"warten","arguments":{"sekunden":10},"_meta":{"io.modelcontextprotocol/protocolVersion":"2026-07-28","io.modelcontextprotocol/clientCapabilities":{}}}}

Step 2 – A short request.

# on cp1, in ~/mcpa/tag08
curl -si http://worker1:8000/mcp "${KOPF[@]}" -H "Mcp-Method: tools/call" -H "Mcp-Name: warten" --data @warten3.json

Expected (excerpt – look for the line with content-type and the line with jsonrpc; the second is cut off on the right here):

content-type: application/json
{"jsonrpc":"2.0","id":3,"result":{"content":[{"text":"3 Sekunden gewartet","type":"text"}],"isError":false,"re

After three seconds the tool was done. It reported nothing along the way, so the server responds with JSON.

Step 3 – A long request.

# on cp1, in ~/mcpa/tag08
curl -siN http://worker1:8000/mcp "${KOPF[@]}" -H "Mcp-Method: tools/call" -H "Mcp-Name: warten" --data @warten20.json

-N (no buffer) prints each line as soon as it arrives. Without -N, curl collects the output, and you would see the stream only at the end.

Expected (after about 15 seconds the headers and : ping, after 20 seconds the rest):

HTTP/1.1 200 OK
date: Sat, 28 Nov 2026 12:31:57 GMT
server: uvicorn
content-type: text/event-stream
cache-control: no-cache, no-transform
connection: keep-alive
x-accel-buffering: no
Transfer-Encoding: chunked

: ping

event: message
data: {"jsonrpc":"2.0","id":3,"result":{"content":[{"text":"20 Sekunden gewartet","type":"text"}],"isError":false,"resultType":"complete","structuredContent":{"result":"20 Sekunden gewartet"},"_meta":{"io.modelcontextprotocol/serverInfo":{"name":"leitstand","version":"1.2.0"}}}}
  • After 15 seconds without a result, the SDK switched to text/event-stream and sent a comment : ping.
  • cache-control: no-cache, no-transform and x-accel-buffering: no ask proxies and nginx neither to cache nor to buffer the stream.
  • Transfer-Encoding: chunked: the length is not known in advance, the response comes in pieces.
  • The event event: message with the data: line contains the JSON-RPC response. After that the server closes the stream.

Step 4 – Cancellation.

# on cp1, in ~/mcpa/tag08
curl -s --max-time 3 http://worker1:8000/mcp "${KOPF[@]}" -H "Mcp-Method: tools/call" -H "Mcp-Name: warten" --data @warten10.json

--max-time 3 aborts the whole transfer after three seconds and closes the connection. Then you ask for curl’s return value – $? always contains the return value of the last command:

# on cp1, in ~/mcpa/tag08
echo "Exit-Code: $?"

Expected (after three seconds):

Exit-Code: 28

Exit code 28 means “timeout reached” for curl. Now look at the server’s terminal on worker1. Wait ten seconds and look at the last lines with warten::

warten: Start, 3 s
warten: fertig
warten: Start, 20 s
warten: fertig
warten: Start, 10 s

There is no fertig (done) for the 10 seconds. The server noticed that the connection was closed and cancelled the tool. Over HTTP, closing the connection is the cancellation. For you as a server developer this means: long-running tools should be cancellable (async with await), and cleanup belongs in try/finally.

Remember: Short and silent → JSON. Long or with interim messages → SSE with : ping. Hanging up cancels the order.

Save your progress? Sign up for free

Drill 6: Check Origin and Host

Where you are: on cp1, in ~/mcpa/tag08, and on worker1 in the server’s terminal.

What you have afterwards: a server that rejects a foreign origin with 403 and wrong host names with 421.

Step 1 – The unprotected server. Pretend to be a web page that an attacker has pointed at your server via DNS rebinding:

# on cp1, in ~/mcpa/tag08
curl -s http://worker1:8000/mcp "${KOPF[@]}" -H "Mcp-Method: server/discover" -H "Origin: http://boese.example" -H "Host: localhost:8000" --data @discover.json | jq -c '.result._meta'
  • Origin: http://boese.example is the origin a browser would send for a page from boese.example (“boese” = evil).
  • Host: localhost:8000 is the host name the browser uses after the rebinding.

Expected:

{"io.modelcontextprotocol/serverInfo":{"name":"leitstand","version":"1.2.0"}}

The server responds completely normally. Because it listens on 0.0.0.0, the SDK has not turned on the checks. A web page could call your server’s tools this way.

Step 2 – Turn on protection. Stop the server on worker1 with Ctrl+C and change fern.py:

# on worker1, in ~/mcpa/tag08
nano fern.py
~/mcpa/tag08/fern.py changes in green
import sys
from typing import Annotated

import anyio
from mcp.server.transport_security import TransportSecuritySettings
from mcp.types import ToolAnnotations
from pydantic import Field

from leitstand import mcp


@mcp.tool(title="Warten", annotations=ToolAnnotations(read_only_hint=True))
async def warten(sekunden: Annotated[int, Field(ge=1, le=60)]) -> str:
    """Wartet die angegebene Zahl von Sekunden und meldet sich dann. Zum Üben von Abbruch und SSE."""
    print(f"warten: Start, {sekunden} s", file=sys.stderr, flush=True)
    await anyio.sleep(sekunden)
    print("warten: fertig", file=sys.stderr, flush=True)
    return f"{sekunden} Sekunden gewartet"


schutz = TransportSecuritySettings(
    enable_dns_rebinding_protection=True,
    allowed_hosts=["worker1:8000", "172.16.0.228:8000"],
    allowed_origins=["http://cp1:8080"],
)

mcp.run(transport="streamable-http", host="0.0.0.0", port=8000, transport_security=schutz)

New are the import and the block schutz (protection):

  • TransportSecuritySettings collects the settings for checking Host and Origin.
  • enable_dns_rebinding_protection=True turns on both checks.
  • allowed_hosts lists all values that may appear in the Host header, each with port: the names and addresses under which clients actually address the server. An entry such as "worker1:*" would allow any port.
  • allowed_origins lists the origins of web pages that may use the server. Here it is an imaginary web interface on cp1 – it does not exist, but this way you see what an allowed origin looks like. The SDK always lets through requests without Origin – from curl, from the SDK, from your host.
  • transport_security=schutz passes the settings to mcp.run.

Restart the server:

# on worker1, in ~/mcpa/tag08
uv run python fern.py

Step 3 – Check. Five requests, each with a different question for the gatekeeper. First the foreign origin:

# on cp1, in ~/mcpa/tag08
curl -s -w ' -> HTTP %{http_code}\n' http://worker1:8000/mcp "${KOPF[@]}" -H "Mcp-Method: server/discover" -H "Origin: http://boese.example" --data @discover.json

Expected:

Invalid Origin header -> HTTP 403

A wrong host name:

# on cp1, in ~/mcpa/tag08
curl -s -w ' -> HTTP %{http_code}\n' http://worker1:8000/mcp "${KOPF[@]}" -H "Mcp-Method: server/discover" -H "Host: localhost:8000" --data @discover.json

Expected:

Invalid Host header -> HTTP 421

The allowed origin:

# on cp1, in ~/mcpa/tag08
curl -s -o /dev/null -w 'HTTP %{http_code}\n' http://worker1:8000/mcp "${KOPF[@]}" -H "Mcp-Method: server/discover" -H "Origin: http://cp1:8080" --data @discover.json

Expected: HTTP 200

No origin at all, as usual with curl:

# on cp1, in ~/mcpa/tag08
curl -s -o /dev/null -w 'HTTP %{http_code}\n' http://worker1:8000/mcp "${KOPF[@]}" -H "Mcp-Method: server/discover" --data @discover.json

Expected: HTTP 200

And the IP address instead of the name:

# on cp1, in ~/mcpa/tag08
curl -s -o /dev/null -w 'HTTP %{http_code}\n' http://172.16.0.228:8000/mcp "${KOPF[@]}" -H "Mcp-Method: server/discover" --data @discover.json

Expected: HTTP 200

  • Foreign origin: 403 Forbidden, as the specification requires.
  • Wrong host name: 421 Misdirected Request (“this request is not for me”).
  • Allowed origin, no origin, and the IP address from allowed_hosts get through. curl sets the Host header automatically to the name from the URL, that is, worker1:8000 or 172.16.0.228:8000.

These rejections are pure HTTP responses with text in the body, not JSON-RPC: the check runs before the SDK even reads the body. The server’s terminal shows warnings such as WARNING Invalid Origin header.

Remember: Anyone listening on 0.0.0.0 needs a gatekeeper: TransportSecuritySettings with allowed_hosts and allowed_origins. Foreign origin → 403, wrong host → 421.

Save your progress? Sign up for free

Drill 7: Client and host over HTTP

Where you are: on cp1, in ~/mcpa/tag08. The protected server on worker1 is running.

What you have afterwards: a Python program that addresses the server via its URL, and a host with six servers on two machines.

Step 1 – A client with a URL.

# on cp1, in ~/mcpa/tag08
nano fernabfrage.py
~/mcpa/tag08/fernabfrage.py new file
import asyncio

from mcp import Client

URL = "http://worker1:8000/mcp"


async def main() -> None:
    async with Client(URL) as client:
        print("Server:", client.instructions)
        print("Werkzeuge:", [t.name for t in (await client.list_tools()).tools])
        ergebnis = await client.call_tool("speicher", {"pfad": "/"})
        print("Speicher auf worker1:", ergebnis.structured_content)


asyncio.run(main())
# on cp1, in ~/mcpa/tag08
uv run python fernabfrage.py

The only difference from the clients of the last few days: instead of StdioServerParameters, Client(URL) receives a URL as text. The SDK then starts no process but talks to the server via Streamable HTTP and sets all headers itself. Everything else – instructions, list_tools, call_tool – stays the same. The transport is just a layer below the data layer.

Expected:

Server: Werkzeuge für den Betrieb der Labor-Rechner: Plattenplatz, Laufzeit, Dienste.
Werkzeuge: ['speicher', 'dienst', 'groesste_dateien', 'warten']
Speicher auf worker1: {'pfad': '/', 'gesamt': 28.0, 'frei': 24.1, 'einheit': 'GB', 'belegt_prozent': 14.0}

Three POSTs appear in the server’s terminal: server/discover (for instructions), tools/list, and tools/call. Each is a separate, complete request.

Step 2 – Fetch files for the host.

# on cp1, in ~/mcpa/tag08
cp ../tag07/leitstand.py ../tag07/handbuch.py ../tag07/betriebsbuch.py ../tag07/betriebsbuch.json ../tag07/protokolle.py ../tag07/vorlagen.py ../tag07/host.py .

Step 3 – Extend the host. Open host.py with nano host.py and change three places:

  1. In the dictionary SERVER, add a new line after the line with "vorlagen":

        "fern": "http://worker1:8000/mcp",
  2. VERTRAUT gets the name "fern":

    VERTRAUT = {"leitstand", "handbuch", "betriebsbuch", "protokolle", "vorlagen", "fern"}
  3. In systemanweisung, replace the line "Du bist ein Betriebsassistent auf dem Rechner cp1. Die Werkzeuge wirken auf diesem Rechner. " with two lines (“The tools of the server fern act on the machine worker1, all others on cp1.”):

            "Du bist ein Betriebsassistent auf dem Rechner cp1. Die Werkzeuge des Servers fern wirken auf "
            "dem Rechner worker1, alle anderen auf cp1. "

Nothing more is needed. Client(parameter) in main accepts start parameters and URLs alike. The change to the system prompt is important: both servers are internally called leitstand and have the same tools. Only from the prefix fern__ can the model tell which machine is meant. Trusting fern is a deliberate decision: it is your own server in your lab. You would not trust a foreign server on the network without asking (Day 11).

Check:

# on cp1, in ~/mcpa/tag08
grep -c worker1 host.py

Expected: 2

Step 4 – One question for two machines.

# on cp1, in ~/mcpa/tag08
echo n | uv run python host.py Wie viel Prozent der Platte sind auf worker1 belegt und wie viel auf cp1? 2>>server.log

Expected (shortened; the first run can take a few minutes because Ollama loads the model):

[host] 12 Werkzeuge von 6 Servern: leitstand__speicher, leitstand__dienst, leitstand__groesste_dateien, handbuch__handbuch_suche, betriebsbuch__eintrag_anlegen, betriebsbuch__eintrag_lesen, betriebsbuch__eintrag_loeschen, protokolle__logs_finden, fern__speicher, fern__dienst, fern__groesste_dateien, fern__warten
[host] Kontext: [protokolle: Grenzwerte] {"speicher_warnung_prozent": 85, "speicher_kritisch_prozent": 95}
[runde 1] Modell will fern__speicher mit {"pfad": "/", "einheit": "GB"}
[runde 1] Ergebnis: {
  "pfad": "/",
...
[runde 1] Modell will leitstand__speicher mit {"pfad": "/", "einheit": "GB"}
...
[modell] Auf **worker1** sind 14,0 % der Platte belegt.
Auf **cp1** sind 21,6 % der Platte belegt.

The model calls two tools in one round: fern__speicher over HTTP on worker1 and leitstand__speicher over stdio on cp1. For the model and for the host’s loop there is no difference. The transport is completely hidden behind the Client.

If you added your own tools in Day 5, the number of tools is higher. The order of the calls can vary.

Remember: For the client, an off-site provider is just a different address: Client("http://worker1:8000/mcp") instead of start parameters. Everything above stays the same.

Save your progress? Sign up for free

If it doesn’t work

  • curl: (7) Failed to connect to worker1 port 8000: The server is not running or listens only on 127.0.0.1. Check the terminal on worker1 and the value host="0.0.0.0" in fern.py.
  • Bad Request: Missing session ID: The header MCP-Protocol-Version is missing, and the request ends up on the old path (Drill 4). If you opened a new terminal, the variable KOPF is probably missing. Create it again as in Drill 2.
  • -32020 … header does not match: Mcp-Method or Mcp-Name is missing or does not match the body. For tools/call you need both.
  • HTTP 406 without a body: The Accept header is missing text/event-stream or application/json.
  • Invalid Host header (421) after Drill 6: You are addressing the server under a name that is not in allowed_hosts, for example localhost on worker1 itself. Add the name with its port.
  • ModuleNotFoundError: No module named 'leitstand': leitstand.py is not in ~/mcpa/tag08 on worker1. Repeat Drill 1, Step 2.
  • [Errno 98] address already in use: An old server is still running on port 8000. Stop it with Ctrl+C.

Exercise: Tool list over HTTP (10 min)

Use curl to fetch the tool list of the server on worker1 and print the name and the value of readOnlyHint for each tool. Build the body from discover.json.

Solution

First the body – a copy of discover.json with the method tools/list:

# on cp1, in ~/mcpa/tag08
nano liste.json
~/mcpa/tag08/liste.json new file
{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{"_meta":{"io.modelcontextprotocol/protocolVersion":"2026-07-28","io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"curl","version":"8.5.0"}}}}

Then the query:

# on cp1, in ~/mcpa/tag08
curl -s http://worker1:8000/mcp "${KOPF[@]}" -H "Mcp-Method: tools/list" --data @liste.json | jq -r '.result.tools[] | "\(.name) \(.annotations.readOnlyHint)"'

Expected:

speicher true
dienst true
groesste_dateien true
warten true

liste.json contains the method tools/list, and Mcp-Method must match. In jq, "\(.name) \(.annotations.readOnlyHint)" builds a string in which \( … ) inserts the value of an expression; -r prints it without quotation marks.

Save your progress? Sign up for free

Challenge: A gateway that blocks tools (15 min)

A gateway that does not read the body is supposed to sit in front of your server. It should block calls to the tool groesste_dateien (largest files) because the tool searches entire directory trees. Which headers does the gateway filter on? How could a client try to trick it, and why does that not work? Also try what happens when a client sends the same header twice.

Solution

The gateway blocks requests with Mcp-Method: tools/call and Mcp-Name: groesste_dateien. A client could send Mcp-Name: speicher in the header and "name":"groesste_dateien" in the body. The gateway would let the request through, but the server compares header and body and rejects it with -32020 (Drill 3, Step 1). Another trick would be to send the header twice, hoping that gateway and server read different copies:

# on cp1, in ~/mcpa/tag08
curl -s -w ' -> HTTP %{http_code}\n' http://worker1:8000/mcp "${KOPF[@]}" -H "Mcp-Method: tools/call" -H "Mcp-Name: speicher" -H "Mcp-Name: speicher" --data @speicher.json

Expected:

{"jsonrpc":"2.0","id":2,"error":{"code":-32020,"message":"mcp-name header appears more than once"}} -> HTTP 400

The server also rejects duplicate routing headers with -32020. The headers are an aid for gateways, but the server decides what is executed based on the body – and it makes sure that both match. Still, a gateway alone is not access control. That is what authorization is for (Days 12 and 13).

Save your progress? Sign up for free

Checkpoint

# on cp1, in ~/mcpa/tag08
curl -s http://worker1:8000/mcp "${KOPF[@]}" -H "Mcp-Method: server/discover" --data @discover.json | jq -r '.result._meta."io.modelcontextprotocol/serverInfo".name'

Expected: leitstand

# on cp1, in ~/mcpa/tag08
curl -s -o /dev/null -w '%{http_code}\n' http://worker1:8000/mcp "${KOPF[@]}" -H "Mcp-Method: server/discover" -H "Origin: http://boese.example" --data @discover.json

Expected: 403

# on cp1, in ~/mcpa/tag08
grep -c worker1 host.py

Expected: 2

Leave the server on worker1 running if you continue with Day 9 right away. Otherwise stop it with Ctrl+C. Tomorrow you start it again.

Exam questions

1. A client sends tools/call for the tool speicher but sets the header Mcp-Name: dienst. What does a server respond after 2026-07-28?

    1. HTTP 200 with the result of speicher
    1. HTTP 200 with isError: true
    1. HTTP 400 with -32020 HeaderMismatch
    1. HTTP 404 with -32601

2. Which Accept header must a client send with a POST to a Streamable HTTP server?

    1. application/json
    1. text/event-stream
    1. application/json, text/event-stream
    1. none, the server decides

3. How does a client cancel a running request over Streamable HTTP?

    1. with notifications/cancelled to the endpoint
    1. by closing the connection or the response stream
    1. with a DELETE on the endpoint
    1. not at all, requests over HTTP cannot be cancelled

4. A server receives a request with Origin: https://fremd.example that is not among the allowed origins. How should it respond?

    1. 401 Unauthorized
    1. 403 Forbidden
    1. 404 Not Found
    1. 200, because Origin is only a hint

5. Which statement about Streamable HTTP in version 2026-07-28 is correct?

    1. The server assigns a session in Mcp-Session-Id on the first POST.
    1. A GET on the endpoint opens a stream for messages from the server.
    1. Every POST contains exactly one JSON-RPC message and is understandable without previous requests.
    1. Several requests can be sent as a batch in one POST.

Solutions

  1. C. Header and body must match. Otherwise -32020 with 400 applies, and the server executes nothing.
  2. C. The client must accept both; otherwise the server responds with 406.
  3. B. Over HTTP, closing the connection is the cancellation.
  4. B. The specification requires 403 for an invalid origin.
  5. C. No session, no GET stream (that is what subscriptions/listen is for), no batches.

Interview Note

“When stdio, when HTTP?” – stdio when the server is supposed to run on the user’s machine and has only one client: the client starts it, it inherits the client’s permissions, and no port is open to the outside. HTTP when the server is run centrally, serves several users, needs data on another machine, or should scale behind a load balancer. Since 2026-07-28, HTTP has no sessions. Every POST is complete on its own, and every server behind the load balancer can serve every request. The price: an HTTP server is a web server. It needs Origin and Host checks, TLS, and authentication.

Enterprise Note

The headers Mcp-Method and Mcp-Name are made for operations. An API gateway or a web application firewall can use them to route, count, throttle, or block requests by method and tool without parsing JSON. Metrics such as “calls per tool” come straight from the proxy’s access logs. Because the server compares headers and body, this data is reliable. In production, every MCP server belongs behind a reverse proxy with TLS. It should not buffer responses with text/event-stream; for nginx that means proxy_buffering off or the header X-Accel-Buffering: no, which the SDK already sends. In addition, the read timeout should be longer than the server’s ping interval.

Summary

  • Streamable HTTP: one endpoint (/mcp in the SDK), every request a POST with exactly one JSON-RPC message; no session, no initialize, no batches. GET gets 405, notifications get 202.
  • Mandatory headers: MCP-Protocol-Version (equal to _meta), Mcp-Method, and for tools/call, prompts/get, and resources/read also Mcp-Name. Mismatches and duplicate headers result in -32020 with 400.
  • Accept must contain application/json and text/event-stream, otherwise 406.
  • Status codes: protocol errors 400 (-32700, -32600, -32602, -32020 to -32022), unknown method 404, results (including isError) 200.
  • Response as JSON or as an SSE stream with notifications and : ping; the response is the last event.
  • Cancellation over HTTP = close the connection.
  • Servers must check Origin (403); the SDK also checks Host (421). The checks are active automatically only with 127.0.0.1/localhost; with 0.0.0.0 you need TransportSecuritySettings.
  • Without MCP-Protocol-Version, the SDK routes a request to the old path with sessions.
  • In the client, a URL instead of start parameters is enough: Client("http://worker1:8000/mcp").

Commands at a glance

For review: all commands and SDK calls of this day with the parameters you used.

Command / call What it does Parameters
scp -3 cp1:<path> worker1:<path> copy a file between two machines -3 via your own computer
mcp.run(transport="streamable-http", host=…, port=…) start the server over HTTP host="0.0.0.0" all interfaces, path /mcp
TransportSecuritySettings(…) check Host and Origin enable_dns_rebinding_protection, allowed_hosts, allowed_origins
Client("http://…/mcp") client over Streamable HTTP URL instead of StdioServerParameters
curl -si <url> -H "…" --data @file POST with headers, response with headers -s silent, -i show headers, -H header, --data/-d body
curl -w '%{http_code}\n' print the status code -o /dev/null discard the body
curl -N · curl --max-time 3 print the stream immediately · abort after 3 s exit code 28 = timeout
KOPF=( … ) · "${KOPF[@]}" create a Bash array · insert all elements –
nano <file> create or change a file –
echo "Exit-Code: $?" show the return value of the last command $?
Headers MCP-Protocol-Version, Mcp-Method, Mcp-Name routing headers of 2026-07-28 Mcp-Name for tools/call, prompts/get, resources/read
Status codes 200 result · 202 notification · 400 protocol error · 403 Origin · 404 method · 405 not POST · 406 Accept · 421 Host –

Contents

More