Skip to content
Open
Show file tree
Hide file tree
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
8 changes: 6 additions & 2 deletions falcon_mcp/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,21 @@ def __init__(
base_url: Optional[str] = None,
debug: bool = False,
user_agent_comment: Optional[str] = None,
client_id: Optional[str] = None,
client_secret: Optional[str] = None,
):
"""Initialize the Falcon client.

Args:
base_url: Falcon API base URL (defaults to FALCON_BASE_URL env var)
debug: Enable debug logging
user_agent_comment: Additional information to include in the User-Agent comment section
client_id: Falcon API Client ID
client_secret: Falcon API Client Secret
"""
# Get credentials from environment variables
self.client_id = os.environ.get("FALCON_CLIENT_ID")
self.client_secret = os.environ.get("FALCON_CLIENT_SECRET")
self.client_id = client_id or os.environ.get("FALCON_CLIENT_ID")
self.client_secret = client_secret or os.environ.get("FALCON_CLIENT_SECRET")
self.base_url = base_url or os.environ.get(
"FALCON_BASE_URL", "https://api.crowdstrike.com"
)
Expand Down
6 changes: 6 additions & 0 deletions falcon_mcp/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ def __init__(
debug: bool = False,
enabled_modules: Optional[Set[str]] = None,
user_agent_comment: Optional[str] = None,
client_id: Optional[str] = None,
client_secret: Optional[str] = None
):
"""Initialize the Falcon MCP server.

Expand All @@ -38,6 +40,8 @@ def __init__(
debug: Enable debug logging
enabled_modules: Set of module names to enable (defaults to all modules)
user_agent_comment: Additional information to include in the User-Agent comment section
client_id: Falcon API Client ID
client_secret: Falcon API Client Secret
"""
# Store configuration
self.base_url = base_url
Expand All @@ -55,6 +59,8 @@ def __init__(
base_url=self.base_url,
debug=self.debug,
user_agent_comment=self.user_agent_comment,
client_id=client_id,
client_secret=client_secret
)

# Authenticate with the Falcon API
Expand Down