MCPcopy Create free account
hub / github.com/IBM/mcp-cli / check_api_keys

Function check_api_keys

diagnostics/debug_models.py:46–67  ·  view source on GitHub ↗

Check what API keys are configured.

()

Source from the content-addressed store, hash-verified

44
45
46def check_api_keys():
47 """Check what API keys are configured."""
48 print("\n🔑 API Keys Status:")
49
50 keys_to_check = [
51 "OPENAI_API_KEY",
52 "ANTHROPIC_API_KEY",
53 "GROQ_API_KEY",
54 "GEMINI_API_KEY",
55 "MISTRAL_API_KEY",
56 "DEEPSEEK_API_KEY",
57 "PERPLEXITY_API_KEY",
58 "WATSONX_API_KEY",
59 ]
60
61 for key in keys_to_check:
62 value = os.getenv(key)
63 if value:
64 masked = value[:8] + "..." if len(value) > 8 else "***"
65 print(f" ✅ {key}: {masked}")
66 else:
67 print(f" ❌ {key}: not set")
68
69
70def check_configuration_files():

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected