fix: replace 'mcporter list' with 'mcporter config list' to prevent hangs

mcporter list probes all configured servers sequentially, which can hang
indefinitely when servers are slow/offline. mcporter config list reads
config without probing — sufficient for checking if a server is configured.

Affected: doctor checks (4 channels) and install command (2 calls).

Fixes #34
This commit is contained in:
Panniantong
2026-02-27 03:06:27 +01:00
parent a5682716ec
commit 39f76ee4dc
5 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -453,7 +453,7 @@ def _install_mcporter():
# Configure Exa MCP (free, no key needed)
try:
r = subprocess.run(
["mcporter", "list"], capture_output=True, text=True, timeout=10
["mcporter", "config", "list"], capture_output=True, text=True, timeout=5
)
if "exa" not in r.stdout:
subprocess.run(
@@ -469,7 +469,7 @@ def _install_mcporter():
# Check XiaoHongShu MCP (only if server is running)
try:
r = subprocess.run(
["mcporter", "list"], capture_output=True, text=True, timeout=10
["mcporter", "config", "list"], capture_output=True, text=True, timeout=5
)
if "xiaohongshu" in r.stdout:
print(" ✅ XiaoHongShu MCP already configured")