protocol-version-handshake
/protocol-version-handshake
Negocjuje jawnie wersję protokołu i przypina tę, którą serwer faktycznie obsługuje, gdy klient może działać na innej wersji.
- Autor
- Wsh7Ash ↗
- Repozytorium
- skillmcp ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 29.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 2
Brak sygnałów. Repozytorium zmienione 29.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Negocjuje jawnie wersję protokołu i przypina tę, którą serwer faktycznie obsługuje, gdy klient może działać na innej wersji.
Oryginalny opis (EN)
Negotiate the protocol revision explicitly and pin the one the server actually implements. Use when the client may run a different protocol revision than the server was written against
Jak działa
- Procedure
- Signals
- Patterns
- Pitfalls
- Done when
- References
Podgląd SKILL.md
---
name: protocol-version-handshake
description: "Negotiate the protocol revision explicitly and pin the one the server actually implements. Use when the client may run a different protocol revision than the server was written against"
pack: skillmcp
version: 1.0.0
category: ai-tool
tags: [setup, mcp, protocol]
---
# Protocol Version Handshake
> Negotiate the protocol revision explicitly and pin the one the server actually implements
**Use when:** the client may run a different protocol revision than the server was written against
**Avoid when:** server and client ship together and are upgraded as one unit
## Procedure
1. Read the client's requested protocolVersion from the initialize params
2. Decide the revision the server implements and state it in the response
3. Reject or downgrade gracefully when the client asks for an unsupported revision
4. Record the pinned revision in the README and in a constant
5. Assert the revision in a conformance test so a silent change is caught
6. Log both versions at handshake time to stderr for diagnosis
## Signals
- the initialize response names a revision the server genuinely implements
- a mismatched client revision produces a clear error instead of odd behaviour
- the pinned constant appears in exactly one place in the code
- the conformance test fails when the constant is edited without the docs
## Patterns
**1. Pinned constant**
```text
PROTOCOL_VERSION = "2025-03-26"
```
**2. Response shape**
```text
{"protocolVersion": PROTOCOL_VERSION, "capabilities": {...}}
```
**3. Diagnostic log**
```text
handshake: client=2024-11-05 server=2025-03-26
```
## Pitfalls
- Echoing the client's requested version without implementing it
- Scattering the version string through the code so a change is partial
- Treating a version mismatch as a transport failure and retrying forever
## Done when
- the server names one revision in a single constant and returns it
- a test asserts the returned revision equals the constant
## References
- [MCP - lifecycle](https://modelcontextprotocol.io/specification/2025-03-26/basic/lifecycle)
- [JSON-RPC 2.0](https://www.jsonrpc.org/specification)
Wersje
W bazie nie ma innych skilli o nazwie protocol-version-handshake.
Migawka bazy z 13.11.2026 · wersja paczki 2006abc659cd (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100verdi-bus-debug
Diagnozuje zawieszone magistrale i transakcje w Verdi, sprawdzając sygnały, uzgadnianie i reguły protokołu. - 90esp32-protocol-version-interoperability
Sprawdza współdziałanie różnych wersji protokołu w firmware ESP32 z urządzeniami i serwerami działającymi na innych wersjach. - 100protocol-conformance-test
Testuje protokół sieciowy bezpośrednio, by odróżnić błąd klienta od błędu serwera, gdy klient zgłasza awarię. - 90revision-lineage
Diagnozuje przypisanie wersji, gdy zasób lub wybór trafia do złej wersji, a oglądanie starej zmienia bieżącą. - 100lifecycle-test-initialize-then-tools
Sprawdza, że serwer przechodzi uzgadnianie połączenia przed listą narzędzi, bo klient nigdy nie wywołuje narzędzi po nieudanym initialize. - 95bitcoin-p2p
Opisuje protokół sieci P2P Bitcoin: handshake wersji, addrv2, compact blocks, filtry BIP157 i 158, szyfrowany transport BIP324, Erlay i Dandelion++.