fix: auto-load .env file for PyPI installations
PyPI users running `mcphub` had to manually export env vars because server.py didn't call load_dotenv(). Docker users were unaffected since docker-compose loads .env automatically. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -27,6 +27,10 @@ import warnings
|
||||
from datetime import UTC, datetime
|
||||
from typing import Optional
|
||||
|
||||
from dotenv import load_dotenv
|
||||
|
||||
load_dotenv() # Load .env from current working directory
|
||||
|
||||
# Suppress noisy deprecation warning from websockets (transitive dependency)
|
||||
warnings.filterwarnings("ignore", category=DeprecationWarning, module="websockets")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user