1
---
2
name: mcp-server-review
3
description: Review a Model Context Protocol (MCP) server implementation against the 2026-07-28 protocol revision, which removed the initialize handshake and Mcp-Session-Id and made the protocol stateless. Use when the user asks to review, audit, upgrade or migrate an MCP server, asks whether their MCP server is spec compliant, asks which protocol revision their server implements, or reports that an MCP client cannot connect to their server.
4
---
5
6
# Review an MCP Server Against the 2026-07-28 Revision
7
8
Protocol revision `2026-07-28` is the largest change to the Model Context Protocol since it launched. Server code written before it still compiles, still passes its own tests, and still looks correct in review. It simply speaks a shape that modern clients no longer send.
9
10
This skill finds that gap. It reviews an MCP server implementation against the current revision, reports what is obsolete, what is missing, and what is a security requirement rather than a nicety, and it distinguishes between a genuine finding and something it could not determine from the code available.
11
12
## Before Starting
13
14
**Critical**: Always ask the user for the following information before proceeding:
15
16
1. **Server code** - the repository, folder, or files implementing the MCP server
17
2. **Target revision** - the protocol revision the server intends to implement. Defaults to `2026-07-28` if not specified
18
3. **Transport** - Streamable HTTP or stdio. Defaults to Streamable HTTP if not specified, since the header rules below apply only to it
19
4. **Backward compatibility requirement** - whether the server must still serve clients on `2025-03-26` through `2025-11-25`. Defaults to no
20
21
If the user doesn't provide all details upfront, ask for the missing ones before proceeding.
22
23
Do not infer the revision from an SDK version number. SDK majors and protocol revisions move independently. Read what the code actually sends and accepts.
24
25
## Output Structure
26
27
Produce a review report with these sections:
28
29
1. **Revision verdict** - one line stating which revision the code appears to implement, and the evidence for that conclusion
30
2. **Blocking findings** - table of `Finding | Location | Why it breaks | Fix`
31
3. **Security findings** - the spec's security requirements with their MUST or SHOULD levels, listed separately because they are not stylistic
32
4. **Deprecated but working** - features on the twelve month removal clock
33
5. **Not determined** - checks that could not be evaluated from the code provided, and what to look at to resolve each
34
6. **Nothing to change** - the checks that passed
35
36
The **Not determined** section is required and must never be silently folded into "passed". A reviewer reading a clean report has to be able to tell the difference between "this is correct" and "this was not visible".
37
38
Every finding must cite the specific rule it comes from. Do not invent limits or headers. If a rule cannot be tied to the specification, leave it out and say so.
39
40
## Step 1: Establish which revision the server implements
41
42
Look for the strongest available evidence, in this order:
43
44
- An explicit protocol version constant or string, for example `2026-07-28`, `2025-11-25`, `2025-06-18`, `2025-03-26`, `2024-11-05`
45
- The presence or absence of an `initialize` request handler
46
- The presence or absence of `Mcp-Session-Id` handling
47
- Whether request handlers read `params._meta` for the protocol version
48
49
State the verdict plainly. "This server implements a pre-2026-07-28 revision" is a useful finding on its own, and it is usually the root cause when a client cannot connect.
50
51
## Step 2: Find removed features still present
52
53
These were removed in `2026-07-28`. Each is a blocking finding for a server that claims to implement it.
54
55
| Removed | What to search for | Replacement |
56
|---|---|---|
57
| `initialize` / `initialized` handshake (SEP-2575) | A handler for method `initialize`, or `notifications/initialized` | Nothing. Every request is self contained |
58
| `Mcp-Session-Id` (SEP-2567) | The header name, session stores, sticky routing, `DELETE` to terminate a session | Nothing. Any request may land on any instance |
59
| GET stream endpoint | A `GET` route on the MCP endpoint that opens SSE | `subscriptions/listen`, whose response is itself the stream |
60
| Resumable streams | `Last-Event-ID` handling | Not supported. Streams are not resumable |
61
| Server-initiated JSON-RPC requests on SSE | The server sending a request (not a notification) on a response stream | Multi Round-Trip Requests: return an `InputRequiredResult` containing `inputRequests` |
62
63
A server that only supports this revision and receives legacy traffic **should** answer `GET` or `DELETE` on the MCP endpoint with `405 Method Not Allowed`, ignore any `Mcp-Session-Id` it receives without minting or echoing one, and ignore `Last-Event-ID`.
64
65
## Step 3: Check the request metadata contract
66
67
Under Streamable HTTP the client mirrors body fields into headers so intermediaries can route without parsing the body. The server has obligations on the receiving side.
68
69
**Required headers on every JSON-RPC request POST:**
70
71
- `MCP-Protocol-Version` - must equal the `io.modelcontextprotocol/protocolVersion` value inside `params._meta`
72
- `Mcp-Method` - must equal the body's `method`
73
- `Mcp-Name` - required for `tools/call`, `resources/read` and `prompts/get`; sourced from `params.name` or `params.uri`
74
75
**The server MUST reject disagreement.** If a header and its body value differ, or a required header is missing or malformed, respond `400 Bad Request` with JSON-RPC error code **`-32020`** (`HeaderMismatch`). Verify this is actually implemented, not merely documented. A server that trusts headers without validating them against the body is the exact vulnerability this rule exists to prevent, because a load balancer may route on the header while the server executes on the body.
76
77
**The `_meta` keys are exact.** Check for all three:
78
79
```
80
io.modelcontextprotocol/protocolVersion
81
io.modelcontextprotocol/clientInfo
82
io.modelcontextprotocol/clientCapabilities
83
```
84
85
**Version negotiation:** an unsupported version must return `400` with an `UnsupportedProtocolVersionError` listing the versions the server does support. An unimplemented method must return `404` with JSON-RPC `-32601`. The JSON-RPC error body is what distinguishes a modern server's `404` from a legacy server that simply does not host the endpoint.
86
87
## Step 4: Check response handling
88
89
- The endpoint **must** accept `POST`. A request body is a single JSON-RPC request or notification, never a response
90
- For a **request**, the server returns either `Content-Type: application/json` with one JSON object, or `Content-Type: text/event-stream` with a stream. Either is valid; the client must support both
91
- For a **notification**, the server returns `202 Accepted` with **no body** when it accepts it
92
- On an SSE stream, the server may send notifications related to that request before the final response, and the final response should terminate the stream
93
- Closing the response stream **must** be treated as cancellation of that request. The server **should** stop work as soon as practical and **must not** send further messages for it
94
- When opening an SSE stream, the server **should** send `X-Accel-Buffering: no` so reverse proxies do not buffer events
95
- For long-lived `subscriptions/listen` streams, the server is encouraged to emit periodic SSE comment lines (`:`) as keep-alives
96
97
## Step 5: Check the security requirements
98
99
Report the specification's security requirements separately from style findings, preserving their MUST or SHOULD requirement levels.
100
101
1. **Origin validation (MUST).** The server **must** validate the `Origin` header on all incoming connections to prevent DNS rebinding attacks, and respond `403 Forbidden` when it is present and invalid. This is the most commonly missing check in server code
102
2. **Local binding (SHOULD).** When running locally, bind to `127.0.0.1` rather than `0.0.0.0`
103
3. **Authentication (SHOULD).** The server should implement proper authentication for all connections
104
105
Without the first two, a remote web page can reach a local MCP server through the user's browser.
106
107
## Step 6: Check `x-mcp-header` tool annotations
108
109
If the server annotates tool parameters for header mirroring, the annotations must be valid or conforming clients will exclude the whole tool from `tools/list`.
110
111
An `x-mcp-header` value must:
112
113
- Be non-empty and match HTTP field-name token syntax
114
- Contain no control characters, including CR or LF
115
- Be case-insensitively unique across the `inputSchema`
116
- Sit only on **primitive** properties: `string`, `boolean`, `integer`. **`number` is not permitted**
117
- Be *statically reachable* from the schema root through a chain consisting solely of `properties` keys. The chain must not pass through `items`, `oneOf`, `anyOf`, `allOf`, `not`, `if`/`then`/`else`, or `$ref`
118
119
Also confirm the server **decodes** the Base64 sentinel form before comparing a header to its body value. Values that are not header-safe travel as `=?base64?<base64>?=`, and a plain value that merely looks like the sentinel is also encoded. A server that compares the raw header against the body will reject valid requests from conforming clients.
120
121
## Step 7: Flag deprecated features
122
123
Deprecated in this revision, with a twelve month minimum window before removal. These are not blocking, but a server still relying on them needs a migration plan.
124
125
- Roots
126
- Sampling
127
- Logging
128
- Dynamic Client Registration, in favour of Client ID Metadata Documents
129
- The legacy HTTP+SSE transport from `2024-11-05`
130
131
## Step 8: Check what the revision added
132
133
Not implementing these is not a defect, but they are the reason to move:
134
135
- **Stateless operation.** No session store, no sticky routing. Confirm nothing in the server assumes affinity between requests
136
- **`server/discover`.** An optional RPC letting a client learn capabilities without a handshake
137
- **Cacheable list results.** `tools/list`, `prompts/list`, `resources/list` and `resources/read` may return `ttlMs` and `cacheScope`
138
- **Multi Round-Trip Requests.** Server-to-client interaction is returned inside a result rather than sent as a separate request
139
140
## Step 9: Write the report
141
142
Follow the Output Structure above.
143
144
## Rules
145
146
- **Cite the rule** behind every finding. A finding a reader cannot verify is not actionable
147
- **Separate MUST from SHOULD.** The specification distinguishes them and so should the report
148
- **Put anything unverifiable in "Not determined"**, never in "passed". If the auth path is in a separate service you cannot see, say that
149
- **Do not guess header names, error codes or limits.** If you are unsure, check the specification at https://modelcontextprotocol.io/specification/2026-07-28/basic/transports/streamable-http rather than writing from memory. The single most likely way to produce a wrong review of this revision is to describe the protocol as you remember it
150
151
## Example
152
153
**Input:** Review a Streamable HTTP server that handles `initialize`, mints `Mcp-Session-Id`, binds locally to `0.0.0.0`, and has authentication implemented by an API gateway whose configuration is not included.
154
155
**Output excerpt:**
156
157
| Section | Finding |
158
|---|---|
159
| Revision verdict | The server implements a pre-2026-07-28 revision, evidenced by its `initialize` handler and session header handling |
160
| Blocking findings | Remove the `initialize` handler and stop minting or requiring `Mcp-Session-Id` |
161
| Security findings | Local binding to `0.0.0.0` does not meet the specification's SHOULD-level localhost-binding guidance |
162
| Not determined | Authentication cannot be evaluated without the API gateway configuration |
163
164
## Validation Checklist
165
166
Before returning the report, verify:
167
168
- [ ] The revision verdict cites evidence from the reviewed code
169
- [ ] Every finding cites a specification rule and preserves its MUST or SHOULD level
170
- [ ] Removed features, security findings, and deprecated features are reported separately
171
- [ ] Unverifiable checks appear under **Not determined**, not **Nothing to change**
172
- [ ] Header names, error codes, and protocol behavior were checked against the target revision
173
- [ ] The report follows every section in the Output Structure
174
175
## References
176
177
- Streamable HTTP transport: https://modelcontextprotocol.io/specification/2026-07-28/basic/transports/streamable-http
178
- What changed in 2026-07-28: https://blog.modelcontextprotocol.io/posts/2026-07-28
179
- Specification index: https://modelcontextprotocol.io/specification/latest
180