Build an MCP server
Stage 2 of 5v1 · 5b12d006

Negotiate the MCP session

Implement initialize and advertise server identity and capabilities.

The handshake

initialize is the first MCP request. This project supports only revision 2025-06-18 and advertises tools and resources as empty capability objects.

The response preserves the id and includes protocolVersion, capabilities, and serverInfo in that order. Use name shipcode-mcp and version 1.0.0. Order matters because stdout is a byte-level contract.

The client may then send the notifications/initialized notification. A notification has no id and never gets a response; you will complete its validation in the final stage.

Acceptance criteria

  • initialize returns the exact revision and capabilities.
  • ping still works.
  • Every request is handled independently.