MCPcopy Create free account
hub / github.com/agentforce314/clawcodex / run

Method run

src/command_system/mcp_command.py:86–101  ·  view source on GitHub ↗
(self, args: str, context: CommandContext)

Source from the content-addressed store, hash-verified

84 ``OutputStyleCommand`` pattern); ``run()`` returns text without touching ``ctx.ui``."""
85
86 async def run(self, args: str, context: CommandContext) -> InteractiveOutcome:
87 parts = (args or "").strip().split()
88 if parts and parts[0].lower() in _MGMT_ARGS:
89 # TS enable/disable/reconnect/settings — need the unported MCP
90 # connection-manager subsystem.
91 return InteractiveOutcome(message=_NOT_SUPPORTED, display="system")
92
93 servers = _collect_mcp_servers()
94 if not servers:
95 return InteractiveOutcome(
96 message="No MCP servers configured.", display="system"
97 )
98 lines = [f"• {s['name']} — {_status_summary(s)}" for s in servers]
99 return InteractiveOutcome(
100 message="MCP servers:\n" + "\n".join(lines), display="system"
101 )
102
103
104MCP_COMMAND = McpCommand(

Callers 5

context_command_callFunction · 0.45
compact_command_callFunction · 0.45
_execute_interactiveMethod · 0.45
_run_asyncFunction · 0.45
_git_cmdFunction · 0.45

Calls 4

InteractiveOutcomeClass · 0.85
_collect_mcp_serversFunction · 0.85
_status_summaryFunction · 0.85
joinMethod · 0.80

Tested by

no test coverage detected