0Pricing
MCP Academy · Lektion

Der Initialize-Handshake

Wie sich Client und Server auf Version und Funktionen einigen.

Der Initialize-Handshake ist eine kostenlose MCP Academy-Lektion auf CoddyKit. Dies ist Lektion 3 von 4. Du kannst die komplette Lektion unten kostenlos lesen – dann übst du sie direkt im Browser mit einem integrierten Code-Editor und einem KI-Tutor rund um die Uhr. Sie ist Teil des MCP Academy-Lernpfads, und dein Fortschritt wird über Web und CoddyKit-App synchronisiert. Der MCP Academy-Kurs umfasst insgesamt 4 Lektionen.

Teile dieser Lektion wurden noch nicht übersetzt und werden auf Englisch angezeigt.

First Words Matter

Before any tool runs, client and server must meet. That opening exchange is the initialize handshake, and nothing else happens until it finishes.

The Client Speaks First

The handshake always starts with the client sending an initialize request. The server stays quiet and waits to be greeted before it replies.

{"jsonrpc": "2.0", "id": 0, "method": "initialize"}

Agreeing on a Version

The client offers a protocolVersion so both sides speak the same MCP edition. The server confirms a version it can support in its reply.

{"params": {"protocolVersion": "2025-06-18"}}

Declaring Capabilities

Each side lists its capabilities, such as tools, resources, or sampling. This tells the other party which features it may safely use.

{"capabilities": {"tools": {}, "resources": {}}}

Introducing Yourself

The client also sends clientInfo with its name and version. It is a friendly nameplate so the server knows exactly who connected.

{"clientInfo": {"name": "claude-desktop", "version": "1.0"}}

The Server Responds

The server replies with its own chosen version, its capabilities, and serverInfo. Now both sides know what the other can do.

{"result": {"protocolVersion": "2025-06-18",
  "serverInfo": {"name": "my-server", "version": "0.1"}}}

Sealing the Deal

After the reply, the client sends a final notifications/initialized message. It has no id and no answer, simply signaling that setup is complete.

{"jsonrpc": "2.0", "method": "notifications/initialized"}

Only Then, Real Work

Until that initialized notification arrives, the server should refuse other calls. The handshake gates everything that follows it.

Why Negotiate at All

Versions and features evolve, so the handshake lets a new client and an old server negotiate common ground instead of crashing on mismatch.

Capabilities Shape the Session

If the server never advertised resources, a polite client will not ask for them. Declared capabilities quietly define the rules of the whole session.

The Handshake in Three Beats

Remember the rhythm: client sends initialize, server responds, client confirms with initialized. Three beats and the connection is live.

Quick Check

What does the client send to finish the initialize handshake?

Recap: Saying Hello

You traced the handshake end to end: the client offers a version and capabilities, the server confirms, and a final initialized note opens the session for real work.

Häufig gestellte Fragen

Ist die Lektion „Der Initialize-Handshake“ kostenlos?

Ja — der vollständige Text von „Der Initialize-Handshake“ ist hier im Web kostenlos zu lesen. Um sie interaktiv zu üben (integrierter Code-Editor und 24/7 KI-Tutor) und den Rest des MCP Academy-Kurses freizuschalten, upgrade auf CoddyKit PRO. Der MCP Academy-Kurs umfasst insgesamt 4 Lektionen.

Was lerne ich in „Der Initialize-Handshake“?

Wie sich Client und Server auf Version und Funktionen einigen. Du übst MCP Academy mit praktischem Code, den du direkt im Browser ausführst, und ein 24/7 KI-Tutor beantwortet deine Fragen während du die Lektion bearbeitest.

Brauche ich Erfahrung, um MCP Academy zu starten?

Keine Vorkenntnisse erforderlich. MCP Academy auf CoddyKit ist für Anfänger bis fortgeschrittene Lernende strukturiert, sodass du hier starten oder von Anfang an beginnen und in deinem eigenen Tempo voranschreiten kannst. Dies ist Lektion 3 von 4.

Wie lange dauert die Lektion „Der Initialize-Handshake“?

Die meisten CoddyKit-Lektionen dauern etwa 5–10 Minuten. Jede ist kompakt und interaktiv, sodass du stetig Fortschritte machst und genau dort weitermachst, wo du aufgehört hast – im Web und in der App.

Kann ich in dieser MCP Academy-Lektion Code schreiben und ausführen?

Ja. Jede MCP Academy-Lektion enthält einen integrierten Code-Editor, sodass du echten Code direkt in deinem Browser schreibst und ausführst und sofort KI-Feedback erhältst — ohne lokale Einrichtung erforderlich.

Alle Lektionen in diesem Kurs

  1. Anfragen, Antworten und Benachrichtigungen
  2. Aufbau eines JSON-RPC-Aufrufs
  3. Der Initialize-Handshake
  4. Fehler im Datenstrom lesen
← Zurück zu MCP Academy