"""FCTR Okta MCP Server - A FastMCP-based server for Okta API operations."""
import sys
__version__ = "0.1.0"
# Ensure minimum Python version
if sys.version_info < (3, 10):
raise RuntimeError("fctr-okta-mcp requires Python 3.10 or later")
# =============================================================================
# PUBLIC API EXPORTS
# =============================================================================
# These exports enable other packages to import and extend this server.
#
# Usage:
# from fctr_okta_mcp import mcp, get_operations_catalog, OktaAPIClient
# mcp.add_middleware(MyMiddleware())
# mcp.run()
#
# IMPORTANT: If extending this server, call load_dotenv() BEFORE importing
# to ensure your .env file is loaded instead of the base package's.
# =============================================================================
def __getattr__(name):
"""Lazy import to avoid RuntimeWarning when running as python -m fctr_okta_mcp.server"""
if name in ("mcp", "get_operations_catalog", "get_tool_details", "initialize_catalog", "run_server", "main"):
from fctr_okta_mcp import server
return getattr(server, name)
elif name == "OktaAPIClient":
from fctr_okta_mcp.client import OktaAPIClient
return OktaAPIClient
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
__all__ = [
# Server instance and helpers
"mcp",
"get_operations_catalog",
"get_tool_details",
"initialize_catalog",
"run_server",
"main",
# API client
"OktaAPIClient",
# Version
"__version__",
]