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
10 changes: 9 additions & 1 deletion packages/prime-mcp-server/src/prime_mcp/core/config.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
"""Lightweight configuration for MCP server."""

import json
import logging
import os
from pathlib import Path
from typing import Optional

logger = logging.getLogger(__name__)


class Config:
"""Minimal configuration class."""
Expand All @@ -21,7 +24,12 @@ def _load_config(self) -> None:
try:
config_data = json.loads(self.config_file.read_text())
self.config = config_data
except (json.JSONDecodeError, IOError):
except (json.JSONDecodeError, IOError) as e:
logger.warning(
"Failed to parse config file %s: %s. Using empty config.",
self.config_file,
e,
)
self.config = {}
else:
self.config = {}
Expand Down
Loading