A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
Wait for buffered stdout/stderr before reading MCP execution results (#8577)
Trevor Manzf2a096f08441
diff --git a/marimo/_mcp/code_server/main.py b/marimo/_mcp/code_server/main.pyindex 3ad63e4f64..635958c8ea 100644--- a/marimo/_mcp/code_server/main.py+++ b/marimo/_mcp/code_server/main.py@@ -193,6 +193,12 @@ def setup_code_mcp_server(# Wait for the scratch cell to become idleawait asyncio.wait_for(done.wait(), timeout=_EXECUTION_TIMEOUT)++ # FIXME: stdout/stderr are flushed every 10ms by the buffered+ # writer thread. Wait 50ms so trailing console output arrives+ # before we read cell_notifications.+ # See: marimo-team/marimo-lsp ExecutionRegistry.ts+ await asyncio.sleep(0.05)except asyncio.TimeoutError:return CodeExecutionResult(success=False,