Skip to content

feat: probe stdio MCP servers with an initialize handshake - #7

Closed
feiler0 wants to merge 1 commit into
PerryLink:mainfrom
feiler0:feat/stdio-probe
Closed

feat: probe stdio MCP servers with an initialize handshake#7
feiler0 wants to merge 1 commit into
PerryLink:mainfrom
feiler0:feat/stdio-probe

Conversation

@feiler0

@feiler0 feiler0 commented Aug 16, 2026

Copy link
Copy Markdown

What

Extends connectivity probing to stdio MCP servers. Previously mcp_probe, the panel probe action, /mcp <server> probe, and the optional passive probe only supported streamable-http endpoints and rejected stdio rows outright (stdio servers have no HTTP endpoint to probe).

Now a probe on a stdio row:

  • spawns the configured command / args with the scrubbed parent env + configured env (same scrubbedParentEnv policy as the mcp-client bridge) and optional cwd,
  • completes one MCP initialize handshake over stdin/stdout,
  • records the sanitized server name/version or a sanitized failure detail in the panel — still panel-only, with the same job semantics (unowned background job, cancel, per-probe timeout, display cap).

Changes

  • src/probe.ts — new ProbeTarget union (http | stdio), probeStdio(), probeJob() dispatch on transport; mcp_probe tool copy updated for both transports.
  • src/service.ts — new probeSpec() that resolves either the raw HTTP endpoint or the stdio launch spec per mcp-client row; probe(), the passive sweep, and tool targeting all share it.
  • tests/probe.spec.ts — stdio handshake + child-exit cases (real spawned node child, no network).
  • CHANGELOG.md[Unreleased] entry.

Notes

  • The published bundle (lib/) is generated by tsdown and is not tracked in this repository, so no build artifacts are included.
  • The stdio handshake path was manually validated against real stdio MCP servers before submission (initialize over stdio returns serverInfo).
  • Follows the existing read-only / panel-only contract: probe credentials and details never reach logs, snapshots beyond the panel, or model context.

Extends the one-shot mcp_probe tool, the panel probe action, /mcp <server>
probe, and the optional passive probe to stdio MCP servers: the probe spawns
the configured command and completes one MCP initialize handshake over stdio,
recording sanitized server info or failure detail in the panel. A new
ProbeTarget union and service.probeSpec() resolve either an HTTP endpoint or
a stdio launch spec per mcp-client row.
@PerryLink PerryLink closed this Aug 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants