@@ -60,7 +60,7 @@ pub async fn add_mcp_server(ctx: &Context, output: &mut SharedWriter, args: McpA
60
60
61
61
if config. mcp_servers . contains_key ( & args. name ) && !args. force {
62
62
bail ! (
63
- "MCP server '{}' already exists in {} (scope {}). Use --force to overwrite." ,
63
+ "\n MCP server '{}' already exists in {} (scope {}). Use --force to overwrite." ,
64
64
args. name,
65
65
config_path. display( ) ,
66
66
scope
@@ -74,11 +74,16 @@ pub async fn add_mcp_server(ctx: &Context, output: &mut SharedWriter, args: McpA
74
74
"timeout" : args. timeout. unwrap_or( default_timeout( ) ) ,
75
75
} ) ) ?;
76
76
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
+
77
82
config. mcp_servers . insert ( args. name . clone ( ) , tool) ;
78
83
config. save_to_file ( ctx, & config_path) . await ?;
79
84
writeln ! (
80
85
output,
81
- "✓ Added MCP server '{}' to {}" ,
86
+ "✓ Added MCP server '{}' to {}\n " ,
82
87
args. name,
83
88
scope_display( & scope, & args. profile)
84
89
) ?;
@@ -100,15 +105,15 @@ pub async fn remove_mcp_server(ctx: &Context, output: &mut SharedWriter, args: M
100
105
config. save_to_file ( ctx, & config_path) . await ?;
101
106
writeln ! (
102
107
output,
103
- "✓ Removed MCP server '{}' from {}" ,
108
+ "\n ✓ Removed MCP server '{}' from {}\n " ,
104
109
args. name,
105
110
scope_display( & scope, & args. profile)
106
111
) ?;
107
112
} ,
108
113
None => {
109
114
writeln ! (
110
115
output,
111
- "No MCP server named '{}' found in {}" ,
116
+ "\n No MCP server named '{}' found in {}\n " ,
112
117
args. name,
113
118
scope_display( & scope, & args. profile)
114
119
) ?;
@@ -154,7 +159,7 @@ pub async fn import_mcp_server(ctx: &Context, output: &mut SharedWriter, args: M
154
159
for ( name, cfg) in src_cfg. mcp_servers {
155
160
if dst_cfg. mcp_servers . contains_key ( & name) && !args. force {
156
161
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 " ,
158
163
name,
159
164
config_path. display( ) ,
160
165
scope
@@ -164,10 +169,15 @@ pub async fn import_mcp_server(ctx: &Context, output: &mut SharedWriter, args: M
164
169
added += 1 ;
165
170
}
166
171
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
+
167
177
dst_cfg. save_to_file ( ctx, & config_path) . await ?;
168
178
writeln ! (
169
179
output,
170
- "✓ Imported {added} MCP server(s) into {}" ,
180
+ "✓ Imported {added} MCP server(s) into {}\n " ,
171
181
scope_display( & scope, & args. profile)
172
182
) ?;
173
183
Ok ( ( ) )
@@ -199,7 +209,7 @@ pub async fn get_mcp_server_status(ctx: &Context, output: &mut SharedWriter, nam
199
209
writeln ! ( output, "\n " ) ?;
200
210
201
211
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 " ) ;
203
213
}
204
214
Ok ( ( ) )
205
215
}
@@ -297,7 +307,7 @@ async fn ensure_config_file(
297
307
ctx. fs ( ) . create_dir_all ( parent) . await ?;
298
308
}
299
309
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( ) ) ?;
301
311
}
302
312
load_cfg ( ctx, path) . await
303
313
}
0 commit comments