You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basic Memory can fail to connect to Copilot CLI over local stdio when modern MCP discovery is delayed. Copilot times out its server/discover probe and sends legacy initialize on the same stream. The Python MCP SDK has selected the modern protocol from the opening request and rejects the later handshake with -32022.
Both protocols work individually. This is an interoperability/startup-readiness report, not a claim that BM's database or modern MCP support is intrinsically broken. Related client-side report: github/copilot-cli#4888.
Versions at the time of reproduction
Observed on 2026-10-09:
Windows; local stdio transport and SQLite, without cloud routing.
Copilot CLI: 1.0.95-0.
Installed Basic Memory distribution: 0.23.3.dev8; bm --version prints 0.23.2.
FastMCP: 4.0.0b1.
Python MCP SDK: 2.2.0.
Python used by the BM environment: 3.14.3.
Observed failure
failed to initialize MCP client: JSON-RPC error: -32022:
connection is serving the 2026-07-28 protocol; the initialize handshake is not accepted
{"supported":["2026-07-28"],"requested":"2025-11-25"}
BM's local database migrations and project initialization completed. A fresh, fast-starting Copilot connection to the unchanged BM configuration exposed all 21 tools successfully. Direct legacy initialization also succeeded, and direct modern discovery returned a valid result.
I have not isolated what delayed or invalidated discovery in the original failing session. The controlled reproduction below produces the same failure without requiring a particular dataset.
Controlled reproduction
Configure Copilot to launch the existing bm mcp stdio server.
Put a diagnostic stdio relay between Copilot and BM. Start BM normally, but buffer inbound client messages for 35 seconds before forwarding them unchanged. This emulates a slow-starting server; the relay does not fabricate responses or rewrite protocol fields.
Use a fresh Copilot runtime and perform live tool discovery, with the tool snapshot cache disabled.
Observe the message sequence below.
Sanitized trace; times are relative to connection startup:
Time
Direction
Message
approximately 0 s
Client to server
server/discover, _meta protocol version 2026-07-28
approximately 10 s
Client to server
initialize, requested protocol version 2025-11-25
approximately 35 s
Server to client
Successful modern discovery result for the first request
approximately 35 s
Server to client
-32022 rejection of the legacy initialization request
Repeating with the server's ordinary MCP timeout set to 60000 did not change the approximately 10-second discovery fallback or prevent failure.
A diagnostic handshake-only launch of the same installed BM server avoided the failure under the identical 35-second delay and exposed all 21 tools. Existing notes were readable through it. I have not adopted that workaround: a supported solution retaining modern MCP is preferable.
Expected behavior and possible resolutions
A delayed modern discovery response should not leave BM permanently unavailable because the client and server have selected different protocol eras on the same stream.
Possible approaches, offered for maintainer guidance rather than as confirmed fixes:
Client-side recovery: after a discovery timeout, retry modern discovery appropriately or reopen the stdio transport before attempting a legacy handshake. Adopt successful modern discovery results rather than initializing that stream again. The linked Copilot issue tracks this boundary.
BM startup/readiness: where feasible, answer modern discovery promptly without waiting for heavyweight initialization, while advertising capabilities accurately and preventing premature tool execution.
Supported configuration: document or expose an applicable discovery/readiness control. The normal tool timeout is not controlling the initial probe in this client.
Does BM have a supported modern-preserving remedy or relevant newer dependency/runtime fix, or should resolution be coordinated entirely with Copilot and the Python MCP SDK? I am not requesting a dependency downgrade or legacy-only operation as the default.
This small launcher runs the existing installed Basic Memory server through the Python MCP SDK's handshake-only runner. It returns method-not-found for the optional modern discovery probe before any modern era is selected, allowing Copilot's legacy initialize fallback on the same stdio stream.
It selects MCP 2025-11-25 for that entry. This is not a modern-protocol fix or a package/database downgrade.
Setup
Requirements: Python >=3.12, MCP SDK 2.x, FastMCP 4.x, and the existing Basic Memory environment.
Clone the repository and locate the existing BM environment's Python (uv tool dir for a Windows uv-tool installation).
Change only the existing basic-memory entry's command and args to that Python executable and the cloned launcher.py. Preserve its other fields, environment, tool filters, timeouts, project mappings, and other MCP entries.
Reconnect/retry only Basic Memory in the already-open Copilot MCP manager. No extension reload or full conversation restart is required.
Verify actual MCP diagnostics and read an existing note with an explicit project; a configured entry or cached tool list is not sufficient proof.
The README provides the configuration shape, test commands, and rollback: restore the original BM executable/arguments and reconnect only BM.
Evidence and limitations
The supplied tests verify exact normal tool schemas, delayed fallback, explicit errors, and EOF shutdown. Existing active sessions on Copilot 1.0.95-0 and 1.0.93-2 exposed all 21 tools and passed local reads/search. The active-session checks did not require a package downgrade, extension reload, or conversation restart.
The adapter uses FastMCP's internal _mcp_server reference, so revalidate after updates. Modern-only features are unavailable through this entry. The original startup-delay cause remains unisolated, and a supported modern-preserving upstream fix is still preferred. Local SQLite checks do not establish reliability for arbitrary hangs, cloud, or Postgres.
Activity
joniba commentedon Oct 11, 2026
Temporary, opt-in workaround
Repository: https://github.com/joniba/basic-memory-mcp-launcher
This small launcher runs the existing installed Basic Memory server through the Python MCP SDK's handshake-only runner. It returns method-not-found for the optional modern discovery probe before any modern era is selected, allowing Copilot's legacy
initializefallback on the same stdio stream.It selects MCP 2025-11-25 for that entry. This is not a modern-protocol fix or a package/database downgrade.
Setup
Requirements: Python >=3.12, MCP SDK 2.x, FastMCP 4.x, and the existing Basic Memory environment.
uv tool dirfor a Windows uv-tool installation).basic-memoryentry'scommandandargsto that Python executable and the clonedlauncher.py. Preserve its other fields, environment, tool filters, timeouts, project mappings, and other MCP entries.The README provides the configuration shape, test commands, and rollback: restore the original BM executable/arguments and reconnect only BM.
Evidence and limitations
The supplied tests verify exact normal tool schemas, delayed fallback, explicit errors, and EOF shutdown. Existing active sessions on Copilot 1.0.95-0 and 1.0.93-2 exposed all 21 tools and passed local reads/search. The active-session checks did not require a package downgrade, extension reload, or conversation restart.
The adapter uses FastMCP's internal
_mcp_serverreference, so revalidate after updates. Modern-only features are unavailable through this entry. The original startup-delay cause remains unisolated, and a supported modern-preserving upstream fix is still preferred. Local SQLite checks do not establish reliability for arbitrary hangs, cloud, or Postgres.