This repository was archived by the owner on May 29, 2025. It is now read-only.

Description
In the app demo I had to define the env or I will get
Failed to initialize MCPClient: dataStreamClosed

I had to define the env like this...
var env = ProcessInfo.processInfo.environment
env["PATH"] = "/opt/homebrew/bin:/usr/local/bin:" + (env["PATH"] ?? "")
self.client = try await MCPClient(
info: .init(name: "GIthubMCPClient", version: "1.0.0"),
transport: .stdioProcess(
"npx",
args: ["-y", "@modelcontextprotocol/server-github"],
env: env,
verbose: true
),
capabilities: .init()
)
Also: FYI APP MUST be set to sandbox to false.
