@@ -60,7 +60,7 @@ pub async fn add_mcp_server(ctx: &Context, output: &mut SharedWriter, args: McpA
6060
6161 if config. mcp_servers . contains_key ( & args. name ) && !args. force {
6262 bail ! (
63- "MCP server '{}' already exists in {} (scope {}). Use --force to overwrite." ,
63+ "\n MCP server '{}' already exists in {} (scope {}). Use --force to overwrite." ,
6464 args. name,
6565 config_path. display( ) ,
6666 scope
@@ -74,11 +74,16 @@ pub async fn add_mcp_server(ctx: &Context, output: &mut SharedWriter, args: McpA
7474 "timeout" : args. timeout. unwrap_or( default_timeout( ) ) ,
7575 } ) ) ?;
7676
77+ writeln ! (
78+ output,
79+ "\n To learn more about MCP safety, see https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-mcp-security.html\n \n "
80+ ) ?;
81+
7782 config. mcp_servers . insert ( args. name . clone ( ) , tool) ;
7883 config. save_to_file ( ctx, & config_path) . await ?;
7984 writeln ! (
8085 output,
81- "✓ Added MCP server '{}' to {}" ,
86+ "✓ Added MCP server '{}' to {}\n " ,
8287 args. name,
8388 scope_display( & scope, & args. profile)
8489 ) ?;
@@ -100,15 +105,15 @@ pub async fn remove_mcp_server(ctx: &Context, output: &mut SharedWriter, args: M
100105 config. save_to_file ( ctx, & config_path) . await ?;
101106 writeln ! (
102107 output,
103- "✓ Removed MCP server '{}' from {}" ,
108+ "\n ✓ Removed MCP server '{}' from {}\n " ,
104109 args. name,
105110 scope_display( & scope, & args. profile)
106111 ) ?;
107112 } ,
108113 None => {
109114 writeln ! (
110115 output,
111- "No MCP server named '{}' found in {}" ,
116+ "\n No MCP server named '{}' found in {}\n " ,
112117 args. name,
113118 scope_display( & scope, & args. profile)
114119 ) ?;
@@ -154,7 +159,7 @@ pub async fn import_mcp_server(ctx: &Context, output: &mut SharedWriter, args: M
154159 for ( name, cfg) in src_cfg. mcp_servers {
155160 if dst_cfg. mcp_servers . contains_key ( & name) && !args. force {
156161 bail ! (
157- "MCP server '{}' already exists in {} (scope {}). Use --force to overwrite." ,
162+ "\n MCP server '{}' already exists in {} (scope {}). Use --force to overwrite.\n " ,
158163 name,
159164 config_path. display( ) ,
160165 scope
@@ -164,10 +169,15 @@ pub async fn import_mcp_server(ctx: &Context, output: &mut SharedWriter, args: M
164169 added += 1 ;
165170 }
166171
172+ writeln ! (
173+ output,
174+ "\n To learn more about MCP safety, see https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-mcp-security.html\n \n "
175+ ) ?;
176+
167177 dst_cfg. save_to_file ( ctx, & config_path) . await ?;
168178 writeln ! (
169179 output,
170- "✓ Imported {added} MCP server(s) into {}" ,
180+ "✓ Imported {added} MCP server(s) into {}\n " ,
171181 scope_display( & scope, & args. profile)
172182 ) ?;
173183 Ok ( ( ) )
@@ -199,7 +209,7 @@ pub async fn get_mcp_server_status(ctx: &Context, output: &mut SharedWriter, nam
199209 writeln ! ( output, "\n " ) ?;
200210
201211 if !found {
202- bail ! ( "No MCP server named '{name}' found in any scope/profile" ) ;
212+ bail ! ( "No MCP server named '{name}' found in any scope/profile\n " ) ;
203213 }
204214 Ok ( ( ) )
205215}
@@ -297,7 +307,7 @@ async fn ensure_config_file(
297307 ctx. fs ( ) . create_dir_all ( parent) . await ?;
298308 }
299309 McpServerConfig :: default ( ) . save_to_file ( ctx, path) . await ?;
300- writeln ! ( out, "📁 Created MCP config in '{}'" , path. display( ) ) ?;
310+ writeln ! ( out, "\n 📁 Created MCP config in '{}'" , path. display( ) ) ?;
301311 }
302312 load_cfg ( ctx, path) . await
303313}
0 commit comments