Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

MCP client sends legacy initialize after successful 2026-07-28 server/discover

Open
#4,888 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
shell
Domain
api, cli

Research direction

Start with the MCP stdio connection flow described in the issue, tracing the successful server/discover response and the subsequent initialize request. Reproduce the wire sequence against a dual-era server; done means Copilot adopts 2026-07-28 without sending initialize, or closes the connection before opening a fresh one for the legacy handshake.

Written by the indexing model from the issue text.

Description

triage

Summary

Copilot CLI sends a successful MCP 2026-07-28 discovery request and then sends a legacy 2025-11-25 initialize request on the same stdio connection. A dual-era MCP SDK server correctly locks the connection to the modern protocol after server/discover, so it rejects the subsequent handshake with -32022.

This prevents Basic Memory from connecting even though the server successfully answers Copilot's discovery request.

Versions

  • Copilot CLI stable: 1.0.85
  • Also reproduced with prerelease: 1.0.86-2
  • Basic Memory: 0.23.2
  • FastMCP: 4.0.3 and 4.0.4
  • Python MCP SDK: 2.2.0
  • macOS arm64
  • Transport: stdio

Wire sequence

Client sends:

{"jsonrpc":"2.0","id":0,"method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/protocolVersion":"2026-07-28","io.modelcontextprotocol/clientInfo":{"name":"copilot-cli","version":"1.0.85"},"io.modelcontextprotocol/clientCapabilities":{"sampling":{},"elicitation":{"form":{},"url":{}}}}}}

Server successfully responds:

{"jsonrpc":"2.0","id":0,"result":{"_meta":{"io.modelcontextprotocol/serverInfo":{"name":"Basic Memory","version":"4.0.3"}},"supportedVersions":["2026-07-28"],"capabilities":{"logging":{},"prompts":{"listChanged":false},"resources":{"subscribe":false,"listChanged":false},"tools":{"listChanged":false},"extensions":{"io.modelcontextprotocol/ui":{}}},"resultType":"complete"}}

Copilot then sends on the same connection:

{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{"sampling":{},"elicitation":{"form":{},"url":{}}},"clientInfo":{"name":"copilot-cli","version":"1.0.85"}}}

The server correctly rejects that mixed-era request:

{"jsonrpc":"2.0","id":1,"error":{"code":-32022,"message":"connection is serving the 2026-07-28 protocol; the initialize handshake is not accepted","data":{"supported":["2026-07-28"],"requested":"2025-11-25"}}}

Copilot logs the server as failed to initialize.

Expected behavior

After a successful server/discover, Copilot should adopt the returned modern protocol and must not send initialize on that connection. If Copilot decides discovery failed or is unusable, it should close that connection and open a fresh connection before attempting the legacy handshake.

Additional verification

  • A fresh MCP 1.x client successfully negotiates 2025-11-25 with the same Basic Memory server.
  • Forcing the server into handshake-only mode makes Copilot connect and call Basic Memory tools successfully.
  • Disabling Basic Memory's initialization sync does not fix the issue; server/discover still succeeds and Copilot still sends initialize afterward.
Dominant language
Shell
Stars
11.2k
Forks
1.9k
Avg merge
14h 16m
Merged PRs (30d)
6

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from github/copilot-cli

All issues in github/copilot-cli

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.