Skip to content

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.

fix(mcp-server): make mcp-server lifespan and startup non-blocking for marimo server (#6545)

Joaquin Coromina80dfe60cd6d6
diff --git a/marimo/_mcp/server/lifespan.py b/marimo/_mcp/server/lifespan.py
index 4c66a15afd..bd98f66f9c 100644
--- a/marimo/_mcp/server/lifespan.py
+++ b/marimo/_mcp/server/lifespan.py
@@ -28,4 +28,5 @@ async def mcp_server_lifespan(app: Starlette) -> AsyncIterator[None]:
return
except Exception as e:
LOGGER.error(f"Failed to start MCP server: {e}")
- raise
+ yield
+ return