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
fix: better cli error when missing mcp dep (#6859)
Myles Scolnickaf7f499bc75c
diff --git a/marimo/_mcp/server/main.py b/marimo/_mcp/server/main.pyindex 656fbbb1e6..25cf946854 100644--- a/marimo/_mcp/server/main.py+++ b/marimo/_mcp/server/main.py@@ -12,6 +12,7 @@ from typing import TYPE_CHECKINGfrom marimo._ai._tools.base import ToolContextfrom marimo._ai._tools.tools_registry import SUPPORTED_BACKEND_AND_MCP_TOOLS+from marimo._dependencies.dependencies import DependencyManagerfrom marimo._loggers import marimo_loggerLOGGER = marimo_logger()@@ -33,6 +34,12 @@ def setup_mcp_server(app: Starlette) -> None:Returns:StreamableHTTPSessionManager: MCP session manager"""+ if not DependencyManager.mcp.has():+ from click import ClickException++ msg = "MCP dependencies not available. Install with `pip install marimo[mcp]` or `uv add marimo[mcp]`"+ raise ClickException(msg)+from mcp.server.fastmcp import FastMCPfrom starlette.middleware.base import BaseHTTPMiddlewarefrom starlette.responses import JSONResponse