Merge pull request #35 from Panniantong/fix/mcporter-list-hang

fix: replace 'mcporter list' with 'mcporter config list' to prevent hangs
This commit is contained in:
Pnant 2026-02-27 12:56:40 +08:00 committed by GitHub
commit 60f5ddf4f0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 6 additions and 6 deletions

View file

@ -29,7 +29,7 @@ class DouyinChannel(Channel):
)
try:
r = subprocess.run(
["mcporter", "list"], capture_output=True, text=True, timeout=10
["mcporter", "config", "list"], capture_output=True, text=True, timeout=5
)
if "douyin" not in r.stdout:
return "off", (

View file

@ -24,7 +24,7 @@ class ExaSearchChannel(Channel):
)
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" in r.stdout.lower():
return "ok", "全网语义搜索可用(免费,无需 API Key"

View file

@ -26,7 +26,7 @@ class LinkedInChannel(Channel):
)
try:
r = subprocess.run(
["mcporter", "list"], capture_output=True, text=True, timeout=10
["mcporter", "config", "list"], capture_output=True, text=True, timeout=5
)
if "linkedin" in r.stdout.lower():
return "ok", "完整可用Profile、公司、职位搜索"

View file

@ -28,7 +28,7 @@ class XiaoHongShuChannel(Channel):
)
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" not in r.stdout:
return "off", (

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")