Skip to content

Commit f03c72f

Browse files
committed
Disable MCP server by default
1 parent 9fe570b commit f03c72f

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
@@ -580,7 +580,7 @@ def __init__( # pylint: disable=too-many-statements
580580
self.title = title
581581

582582
# MCP (Model Context Protocol) configuration
583-
self._enable_mcp = get_combined_config("mcp_enabled", enable_mcp, True)
583+
self._enable_mcp = get_combined_config("mcp_enabled", enable_mcp, False)
584584
_mcp_path = get_combined_config("mcp_path", mcp_path, "_mcp")
585585
self._mcp_path = (
586586
_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)