yoi/.yoi/tickets/00001KVHR3WRY/item.md

1.9 KiB

title state created_at updated_at assignee readiness risk_flags queued_by queued_at
MCP: implement stdio JSON-RPC lifecycle client closed 2026-06-20T05:30:04Z 2026-06-20T07:59:30Z null implementation_ready
mcp
stdio
json-rpc
process-lifecycle
diagnostics
workspace-panel 2026-06-20T05:58:54Z

Background

After MCP local stdio server config exists, Yoi needs a lifecycle client that can start a configured server, speak newline-delimited JSON-RPC over stdio, perform MCP initialize/capability negotiation, and shut down safely.

This Ticket creates the protocol/lifecycle foundation only. It does not expose MCP tools/resources/prompts to the model-visible ToolRegistry.

Requirements

  • Spawn configured local stdio MCP servers from explicit config only.
  • Use stdin/stdout newline-delimited JSON-RPC.
  • Treat stdout as protocol messages.
  • Treat stderr as bounded diagnostics/logging, not automatic protocol failure.
  • Implement initialize, capability negotiation, and notifications/initialized.
  • Track server name and startup phase in diagnostics.
  • Implement graceful shutdown, terminate, and kill fallback.
  • Handle process exit/disconnect/startup failure with bounded diagnostics.
  • Do not declare sampling or elicitation client capabilities initially.
  • Add local mock MCP server tests.

Acceptance criteria

  • Mock local stdio MCP server initializes successfully.
  • Initialize failure reports server name and phase.
  • stderr is bounded and redacted where needed.
  • Shutdown is safe and deterministic.
  • Sampling/elicitation are not advertised and fail closed if requested.
  • No tools/resources/prompts are registered by this Ticket.

Non-goals

  • tools/list ToolRegistry registration.
  • tools/call execution.
  • resources/prompts operations.
  • Streamable HTTP/OAuth/remote MCP.
  • Depends on 00001KVHR3WRF.
  • Objective: 00001KTR80WMN.