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
4 changes: 2 additions & 2 deletions capiscio_mcp/connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ async def connect(
cached_org_id = org_id_file.read_text().strip() or None
except (OSError, UnicodeDecodeError):
cached_org_id = None
if cached_org_id:
if cached_org_id and "CAPISCIO_BUNDLE_URL" not in os.environ:
os.environ["CAPISCIO_BUNDLE_URL"] = f"{server_url}/v1/bundles/{cached_org_id}"

# Default enforcement mode to EM-GUARD when a bundle URL is configured.
Expand Down Expand Up @@ -546,7 +546,7 @@ async def connect(
# Update bundle URL if registration yielded a new/different org_id.
# (API key and cached bundle URL were already set in Step 1.5 before
# the Go core could be started.)
if org_id and org_id != cached_org_id:
if org_id and org_id != cached_org_id and "CAPISCIO_BUNDLE_URL" not in os.environ:
os.environ["CAPISCIO_BUNDLE_URL"] = f"{server_url}/v1/bundles/{org_id}"
if not os.environ.get("CAPISCIO_ENFORCEMENT_MODE"):
os.environ["CAPISCIO_ENFORCEMENT_MODE"] = "EM-GUARD"
Expand Down