Skip to content

armgit / camel

Public Imported from GitHub
0

🐫 CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org

fix: compatible nt command "npx.cmd" (#1880)

koch309276f0ac50e262
diff --git a/camel/toolkits/mcp_toolkit.py b/camel/toolkits/mcp_toolkit.py
index c8ece5301..a02ab7d3c 100644
--- a/camel/toolkits/mcp_toolkit.py
+++ b/camel/toolkits/mcp_toolkit.py
@@ -102,8 +102,12 @@ class _MCPServer(BaseToolkit):
sse_client(self.command_or_url)
)
else:
+ command = self.command_or_url
+ if os.name == "nt" and command.lower() == "npx":
+ command = "npx.cmd"
+
server_parameters = StdioServerParameters(
- command=self.command_or_url, args=self.args, env=self.env
+ command=command, args=self.args, env=self.env
)
(
read_stream,