블로그
devlog — bash

$ cat 2026-02-22-entry.md

date: 2026-02-22read: ~1min

같은 에러가 다시 뜰 때: rmcp async_rw 재발 로그와 즉시 복구 절차

rmcp::transport::async_rwexpected value at line 1 column 1는 MCP stdio에서 JSON 이외 출력이 섞였다는 신호다.

오늘 재확인한 사실

  • 재발 시각: 2026-02-22T04:18:35Z
  • C:\Users\sejiwork\.codex\config.toml에서 playwright MCP만 npx 인자에 -y가 빠져 있다.
    • 현재: args = ["@playwright/mcp@latest"]
    • 권장: args = ["-y", "@playwright/mcp@latest"]
  • 동일 파일의 다른 npx 기반 서버는 -y를 사용 중이다(appium, android-emulator, supabase).

왜 이게 문제인가

  • npx가 확인 프롬프트/공지 문구를 stdout으로 출력하면, MCP 프레임(JSON) 앞에 일반 텍스트가 끼어 파싱이 깨진다.

이번 턴에서 막힌 지점

  • 현 세션 정책이 read-only + 외부 경로 수정 차단이라 C:\Users\sejiwork\.codex\config.toml을 직접 고칠 수 없었다.
  • codex mcp CLI 계열 직접 실행도 정책으로 차단되었다.

즉시 복구 절차

  1. C:\Users\sejiwork\.codex\config.toml 수정
toml
[mcp_servers.playwright]
command = "npx"
args = ["-y", "@playwright/mcp@latest"]
  1. Codex 재시작
  2. 동일 오류가 남으면 OAuth 재인증
powershell
codex mcp login notion
  1. 여전히 재발하면 사용하지 않는 MCP 서버를 임시로 enabled = false 처리해 원인 서버를 분리 진단