feat: add startup diagnostics for debugging environment and library version
All checks were successful
Build and Push Monarch MCP Docker Image / build (push) Successful in 20s
All checks were successful
Build and Push Monarch MCP Docker Image / build (push) Successful in 20s
This commit is contained in:
@@ -26,6 +26,38 @@ logging.basicConfig(
|
|||||||
)
|
)
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
def run_startup_diagnostics():
|
||||||
|
"""Print startup diagnostics for debugging."""
|
||||||
|
import monarchmoney
|
||||||
|
from monarchmoney import MonarchMoneyEndpoints
|
||||||
|
|
||||||
|
print("\n" + "=" * 50)
|
||||||
|
print("Monarch MCP Server - Startup Diagnostics")
|
||||||
|
print("=" * 50)
|
||||||
|
|
||||||
|
print(f"\n📦 Library Version: monarchmoney {monarchmoney.__version__}")
|
||||||
|
|
||||||
|
print(f"\n🔗 API Endpoints:")
|
||||||
|
print(f" GraphQL: {MonarchMoneyEndpoints.getGraphQL()}")
|
||||||
|
print(f" Login: {MonarchMoneyEndpoints.getLoginEndpoint()}")
|
||||||
|
|
||||||
|
print(f"\n🔐 Environment Variables:")
|
||||||
|
env_vars = ['MONARCH_TOKEN', 'MONARCH_EMAIL', 'MONARCH_PASSWORD', 'MONARCH_MFA_SECRET']
|
||||||
|
for var in env_vars:
|
||||||
|
value = os.getenv(var)
|
||||||
|
if value:
|
||||||
|
masked = value[:8] + "..." if len(value) > 8 else "***"
|
||||||
|
print(f" {var}: ✓ ({masked})")
|
||||||
|
else:
|
||||||
|
print(f" {var}: ✗ (not set or empty)")
|
||||||
|
|
||||||
|
print("\n" + "=" * 50 + "\n")
|
||||||
|
|
||||||
|
|
||||||
|
# Run startup diagnostics
|
||||||
|
run_startup_diagnostics()
|
||||||
|
|
||||||
# Initialize FastMCP
|
# Initialize FastMCP
|
||||||
mcp = FastMCP("Monarch Money Custom")
|
mcp = FastMCP("Monarch Money Custom")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user