trading_agent.client.mcp_commands
¶
The trading-agent mcp list command: connects to every MCP server once and lists its tools.
It runs on its own, without the gateway, so a new server can be checked before the desks use it.
Typical usage example:
exit_code = asyncio.run(McpCommands(manager).list())
McpCommands
¶
Checks the MCP servers for the user.
Creates the commands.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
manager
|
McpClientManager
|
The connections to check. |
required |
output
|
TextIO
|
Where to print. |
stdout
|
Source code in src/trading_agent/client/mcp_commands.py
list
async
¶
Connects to every server, waits for each first attempt, and prints the result.
Returns:
| Type | Description |
|---|---|
int
|
0 when every server is ready, 1 when one failed or did not answer in time. |