File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ use std::{
3
3
path:: { Path , PathBuf } ,
4
4
} ;
5
5
6
+ use but_action:: cli:: get_cli_path;
6
7
use serde:: { Deserialize , Serialize } ;
7
8
use tokio:: fs;
8
9
@@ -107,12 +108,15 @@ impl ClaudeMcpConfig {
107
108
}
108
109
109
110
pub fn mcp_servers_with_security ( & self ) -> McpConfig {
111
+ let cli_path = get_cli_path ( )
112
+ . map ( |p| p. to_string_lossy ( ) . into_owned ( ) )
113
+ . unwrap_or ( "but" . into ( ) ) ;
110
114
let mut out = self . mcp_servers ( ) ;
111
115
out. mcp_servers . insert (
112
116
BUT_SECURITY_MCP . to_owned ( ) ,
113
117
McpServer {
114
118
r#type : Some ( "stdio" . to_owned ( ) ) ,
115
- command : Some ( "but" . to_owned ( ) ) ,
119
+ command : Some ( cli_path ) ,
116
120
url : None ,
117
121
args : Some ( vec ! [ "claude" . to_owned( ) , "pp" . to_owned( ) ] ) ,
118
122
env : Some ( HashMap :: new ( ) ) ,
You can’t perform that action at this time.
0 commit comments