Skip to content

Commit 3387c9b

Browse files
committed
Disable MCP server by default
1 parent f2b0430 commit 3387c9b

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

dash/dash.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ def __init__( # pylint: disable=too-many-statements
600600
self.title = title
601601

602602
# MCP (Model Context Protocol) configuration
603-
self._enable_mcp = get_combined_config("mcp_enabled", enable_mcp, True)
603+
self._enable_mcp = get_combined_config("mcp_enabled", enable_mcp, False)
604604
_mcp_path = get_combined_config("mcp_path", mcp_path, "_mcp")
605605
self._mcp_path = (
606606
_mcp_path.lstrip("/") if isinstance(_mcp_path, str) else _mcp_path

tests/integration/mcp/conftest.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
"""Shared helpers for MCP integration tests."""
22

3+
import pytest
34
import requests
45

56

7+
@pytest.fixture(autouse=True)
8+
def _enable_mcp_for_integration_tests(monkeypatch):
9+
"""MCP is off by default; integration tests need it on."""
10+
monkeypatch.setenv("DASH_MCP_ENABLED", "true")
11+
12+
613
def _mcp_post(server_url, method, params=None, request_id=1):
714
return requests.post(
815
f"{server_url}/_mcp",

0 commit comments

Comments
 (0)