Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion marimo/_server/ai/mcp/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,12 @@ def is_mcp_config_empty(config: MCPConfig | None) -> bool:
"""Check if the MCP configuration is empty."""
if config is None:
return True
return not config.get("mcpServers") and not config.get("presets")
# Use direct key lookup with .get and short-circuit evaluation for early return
mcp_servers = config.get("mcpServers")
if mcp_servers:
return False
presets = config.get("presets")
return not presets


@dataclass
Expand Down