File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -75,10 +75,24 @@ pub struct FileSearchResult {
7575 pub matches : Vec < ContentMatchResult > ,
7676}
7777
78+ /// This addresses the issue with the DockerHub mcp-registry & mcp-gateway where tool discovery fails to resolve
79+ /// references to 'example' or 'default' values when running the run->command from the server.yaml file
80+ /// should be removed once mcp-gateway is more mature
81+ /// reference: https://github.com/docker/mcp-registry/blob/7d815fac2f3b7a9717eebc3f3db215de3ce3c3c7/internal/mcp/client.go#L170-L173
82+ #[ allow( clippy:: ptr_arg) ]
83+ fn fix_dockerhub_mcp_registry_gateway ( input : & String ) -> & str {
84+ if input. contains ( "{{rust-mcp-filesystem.allowed_directories|volume-target|into}}" ) {
85+ "."
86+ } else {
87+ input
88+ }
89+ }
90+
7891impl FileSystemService {
7992 pub fn try_new ( allowed_directories : & [ String ] ) -> ServiceResult < Self > {
8093 let normalized_dirs: Vec < PathBuf > = allowed_directories
8194 . iter ( )
95+ . map ( fix_dockerhub_mcp_registry_gateway)
8296 . map_while ( |dir| {
8397 let expand_result = expand_home ( dir. into ( ) ) ;
8498 if !expand_result. is_dir ( ) {
Original file line number Diff line number Diff line change @@ -12,5 +12,4 @@ async fn main() {
1212 if let Err ( error) = server:: start_server ( arguments) . await {
1313 eprintln ! ( "{error}" ) ;
1414 }
15- println ! ( ">>> 90 {:?} " , 90 ) ;
1615}
You can’t perform that action at this time.
0 commit comments