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
Add server-discover command for MCP 2026-07-28 connections (#354)
MCP 2026-07-28 removed `ping`, so `mcpc @session ping` silently probes
with `server/discover` instead — invisible until it shows up in a
server's access log, with no way to see what that request returns. This
adds a command that says what it does.
- `mcpc @session server-discover` sends `server/discover` and reports
the answer: supported protocol versions (negotiated one marked),
capabilities, instructions, `_meta`. `--json` prints the
`DiscoverResult` verbatim.
- On 2025-era connections it refuses (exit 2) and points at `mcpc
@session`, whose `initialize` result carries the same data.
- `ping` output now names the request it measured; `ping --json` is
unchanged.
- Capability rendering extracted so both screens share it;
`SERVER_INFO_META_KEY` mirrored in the dependency-free `protocol.ts`
with an SDK drift test.
- New `basic/server-discover.test.sh` e2e suite (one branch per protocol
era); README, CHANGELOG and the agent skill updated.
Refs #316
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01KHDUfie1HZtvSiqFNTYs17
---
_Generated by [Claude
Code](https://claude.ai/code/session_01KHDUfie1HZtvSiqFNTYs17)_
Co-authored-by: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
13
13
- Support for MCP protocol version 2026-07-28: mcpc now probes each server with `server/discover` and talks the new stateless protocol when supported, falling back to older protocol versions (2025-11-25 down to 2024-10-07) automatically. Resource subscriptions use the new `subscriptions/listen` stream (with automatic re-listen on drops), and `ping` transparently uses `server/discover` on 2026-07-28 servers. mcpc now uses the official TypeScript SDK v2 (`@modelcontextprotocol/client`).
14
14
-`mcpc --json` now reports each session's server `capabilities`, plus `hasInstructions` to tell whether the server provided instructions (read them with `mcpc --json @<session>`).
15
15
- New `--protocol-version` option for `mcpc connect` to pin the MCP protocol version (e.g. `--protocol-version 2025-11-25`) instead of auto-negotiating; the connection fails if the server does not support the pinned version. Also supported as a `protocolVersion` field in mcp.json config entries.
16
+
- New `mcpc @<session> server-discover` command that sends a `server/discover` request and reports what the server advertises right now: every protocol version it supports, its capabilities, instructions, and `_meta`. Requires a 2026-07-28 connection, where `ping` is also translated into `server/discover` — the ping output now says so.
16
17
- Server details from 2026-07-28 servers now include everything their `server/discover` result carries: `supportedVersions` (every protocol version the server offers) and the result's `_meta`. Reported by `connect`, `restart` and `mcpc @session` in `--json`, and kept in `sessions.json`.
0 commit comments