fixed mcp command location

This commit is contained in:
Concedo
2026-01-17 00:09:46 +08:00
parent 22af5f1250
commit a5204d2363
2 changed files with 135 additions and 0 deletions
+7
View File
@@ -444,8 +444,15 @@ class StdoutRedirector:
self.terminal.flush()
class MCPStdioClient:
def resolve_command(self, command):
resolved = shutil.which(command)
if resolved:
return resolved
return command # fallback
def __init__(self,command,largs,env=None,cwd=None):
if isinstance(command, str):
command = self.resolve_command(command)
cmd = [command]
else:
cmd = list(command)