File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed
src/datapilot/core/mcp_utils Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -58,9 +58,24 @@ def create_mcp_proxy():
5858 hide_input = input_def .get ("password" , False )
5959 )
6060
61- # Process servers
61+ # Select server
6262 servers = mcp_config .get ("servers" , {})
63- for server_name , server_config in servers .items ():
63+ server_names = list (servers .keys ())
64+
65+ if not server_names :
66+ raise click .UsageError ("No servers configured in mcp config" )
67+
68+ if len (server_names ) > 1 :
69+ server_name = click .prompt (
70+ "Choose a server" ,
71+ type = click .Choice (server_names ),
72+ show_choices = True
73+ )
74+ else :
75+ server_name = server_names [0 ]
76+
77+ if server_name in servers :
78+ server_config = servers [server_name ]
6479 # Replace input tokens in args
6580 processed_args = [
6681 inputs .get (arg [8 :- 1 ], arg ) if isinstance (arg , str ) and arg .startswith ("${input:" ) else arg
You can’t perform that action at this time.
0 commit comments