Repository navigation
Expand file tree
/
Copy pathtest_mcp_setup.py
More file actions
executable file
·64 lines (51 loc) · 1.83 KB
/
Copy pathtest_mcp_setup.py
File metadata and controls
executable file
·64 lines (51 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/usr/bin/env python3
"""Test MCP Setup"""
import os
import sys
from pathlib import Path
def test_setup():
"""Test the development setup"""
print("\n🔍 Testing MCP Development Setup\n")
# Check .env file
if Path(".env").exists():
print("✅ .env file exists")
# Load and check key variables
with open(".env", "r") as f:
env_content = f.read()
required_vars = ["DATABASE_URL", "MCP_TRANSPORT", "JWT_SECRET_KEY"]
for var in required_vars:
if var in env_content:
print(f"✅ {var} is configured")
else:
print(f"❌ {var} is missing")
else:
print("❌ .env file not found")
# Check directories
for dir_name in ["data", "cache", "logs"]:
if Path(dir_name).exists():
print(f"✅ {dir_name}/ directory exists")
else:
print(f"❌ {dir_name}/ directory missing")
# Check sample data
if Path("data/sample.json").exists():
print("✅ Sample data exists")
# Test imports
try:
from config.mcp_config import MCPConfig
config = MCPConfig()
print("✅ Can import MCPConfig")
# Test no mocks
try:
config.check_no_mocks()
print("✅ No mock endpoints configured")
except ValueError as e:
print(f"❌ Mock endpoint found: {e}")
except ImportError as e:
print(f"❌ Cannot import MCPConfig: {e}")
print("\n📊 Setup Summary:")
print("- Use 'source .env' to load environment variables")
print("- Run 'python3 mcp_server/real_mcp_server.py' to start MCP server")
print("- D-Wave: Sign up at https://cloud.dwavesys.com/leap/ for free API token")
print("\n✨ Development environment ready!")
if __name__ == "__main__":
test_setup()