# Fix: initialize handshake returns serverInfo + protocolVersion

> Web-audit fix skill for the `mcp-initialize` check (MCP & API, MUST).

## Goal

Answer JSON-RPC initialize with serverInfo and protocolVersion so clients can begin a session.

## Fix

Answer the JSON-RPC `initialize` method on your MCP endpoint with a `result` that carries
`serverInfo` (an object with `name` and `version`) and `protocolVersion`. Accept `POST` with
`Content-Type: application/json` and `Accept: application/json, text/event-stream`, and echo
the negotiated `protocolVersion` (the current pinned value is `2025-06-18`).

## Resources

- [MCP lifecycle](https://modelcontextprotocol.io/specification/2025-06-18/basic/lifecycle)

## Copy-paste prompt

Paste this into your coding agent, replacing the Issue line with the Result line from [your audit](https://anc.dev/web-audit):

```text
Goal: Answer JSON-RPC initialize with serverInfo and protocolVersion so clients can begin a session
Issue: <the audit's finding for this check>
Fix: Answer the JSON-RPC `initialize` method on your MCP endpoint with a `result` that carries `serverInfo` (an object with `name` and `version`) and `protocolVersion`. Accept `POST` with `Content-Type: application/json` and `Accept: application/json, text/event-stream`, and echo the negotiated `protocolVersion` (the current pinned value is `2025-06-18`).
Skill: https://anc.dev/web-audit/skill/mcp-initialize
Docs: https://modelcontextprotocol.io/specification/2025-06-18/basic/lifecycle
```

## Verify

Re-run the audit at [https://anc.dev/web-audit](https://anc.dev/web-audit) or call the `audit_website` MCP tool; the `mcp-initialize` check should report `pass`.
