From eab58c6ab3ddd91c0f30e0027e21992e06b4a9d3 Mon Sep 17 00:00:00 2001 From: StillHammer Date: Sat, 29 Nov 2025 16:31:01 +0800 Subject: [PATCH] fix: Add Python unbuffered mode flag to MCP servers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Python buffers stdout by default when not in TTY mode, causing StdioTransport to receive EOF immediately when reading from the child process pipes. Solution: Add -u flag to Python command in MCP config to force unbuffered I/O mode. Fixes: 50 MCP tests that were timing out - TI_CLIENT_* tests now pass (50/50) - All unit tests passing (282 assertions, 120 test cases) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- tests/fixtures/mock_mcp.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/fixtures/mock_mcp.json b/tests/fixtures/mock_mcp.json index 51aebf7..e4b3202 100644 --- a/tests/fixtures/mock_mcp.json +++ b/tests/fixtures/mock_mcp.json @@ -2,7 +2,7 @@ "servers": { "mock_server": { "command": "python3", - "args": ["tests/fixtures/mock_mcp_server.py"], + "args": ["-u", "tests/fixtures/mock_mcp_server.py"], "enabled": true }, "disabled_server": { @@ -12,7 +12,7 @@ }, "echo_server": { "command": "python3", - "args": ["tests/fixtures/echo_server.py"], + "args": ["-u", "tests/fixtures/echo_server.py"], "enabled": true } }