carraraig commited on
Commit
0297f14
·
verified ·
1 Parent(s): e33b8ba
ComputeAgent/graph/graph.py CHANGED
@@ -55,8 +55,17 @@ python_executable = sys.executable
55
  mcp_client = MultiServerMCPClient(
56
  {
57
  "hivecompute": {
58
- "url": "http://private.hivegpt.hivenet.com:31055/hivecompute/mcp",
59
- "transport": "streamable_http"
 
 
 
 
 
 
 
 
 
60
  }
61
  }
62
  )
 
55
  mcp_client = MultiServerMCPClient(
56
  {
57
  "hivecompute": {
58
+ "command": python_executable,
59
+ "args": [mcp_server_path],
60
+ "transport": "stdio",
61
+ "env": {
62
+ # Pass HF Spaces secrets to the MCP subprocess
63
+ "HIVE_COMPUTE_DEFAULT_API_TOKEN": os.getenv("HIVE_COMPUTE_DEFAULT_API_TOKEN", ""),
64
+ "HIVE_COMPUTE_BASE_API_URL": os.getenv("HIVE_COMPUTE_BASE_API_URL", "https://api.hivecompute.ai"),
65
+ # Also pass these to ensure Python works correctly
66
+ "PATH": os.getenv("PATH", ""),
67
+ "PYTHONPATH": os.getenv("PYTHONPATH", ""),
68
+ }
69
  }
70
  }
71
  )
ComputeAgent/graph/graph_deploy.py CHANGED
@@ -47,8 +47,17 @@ python_executable = sys.executable
47
  mcp_client = MultiServerMCPClient(
48
  {
49
  "hivecompute": {
50
- "url": "http://private.hivegpt.hivenet.com:31055/hivecompute/mcp",
51
- "transport": "streamable_http"
 
 
 
 
 
 
 
 
 
52
  }
53
  }
54
  )
 
47
  mcp_client = MultiServerMCPClient(
48
  {
49
  "hivecompute": {
50
+ "command": python_executable,
51
+ "args": [mcp_server_path],
52
+ "transport": "stdio",
53
+ "env": {
54
+ # Pass HF Spaces secrets to the MCP subprocess
55
+ "HIVE_COMPUTE_DEFAULT_API_TOKEN": os.getenv("HIVE_COMPUTE_DEFAULT_API_TOKEN", ""),
56
+ "HIVE_COMPUTE_BASE_API_URL": os.getenv("HIVE_COMPUTE_BASE_API_URL", "https://api.hivecompute.ai"),
57
+ # Also pass these to ensure Python works correctly
58
+ "PATH": os.getenv("PATH", ""),
59
+ "PYTHONPATH": os.getenv("PYTHONPATH", ""),
60
+ }
61
  }
62
  }
63
  )
Compute_MCP/tools.py CHANGED
@@ -9,7 +9,7 @@ mcp = FastMCP(
9
  )
10
 
11
  @mcp.tool()
12
- async def create_compute_instance(name: str = "default", location: str = "uae", config: str = "1x RTX 4090") -> Dict[str, Any]:
13
  """
14
  Create a new compute instance with the specified configuration.
15
 
 
9
  )
10
 
11
  @mcp.tool()
12
+ async def create_compute_instance(name: str = "default", location: str = "uae", config: str = "2x RTX 4090") -> Dict[str, Any]:
13
  """
14
  Create a new compute instance with the specified configuration.
15