Skip to main content

commands.mcp_servers_catalog

MCP servers catalog command for the Agent Runtimes CLI.

This module provides the mcp-servers-catalog command that displays the catalog of available MCP servers. It can be used directly by other libraries or through the CLI.

Usage as library: ```python from agent_runtimes.commands.mcp_servers_catalog import ( list_mcp_servers_catalog, get_mcp_servers_catalog, OutputFormat, )

# Get servers as list of dicts
servers = get_mcp_servers_catalog()
for server in servers:
print(f"{server['id']}: {server['name']}")

# Print formatted output
list_mcp_servers_catalog(output=OutputFormat.table)
```

OutputFormat Objects

class OutputFormat(str, Enum)

Output format options.

get_mcp_servers_catalog

def get_mcp_servers_catalog() -> list[dict[str, Any]]

Get the MCP servers catalog with availability status.

Returns:

List of MCP server dictionaries with keys:

  • id: Server ID
  • name: Human-readable name
  • description: Description of the server
  • command: Command to start the server
  • args: Arguments for the command
  • transport: Transport type (stdio, http)
  • required_env_vars: List of required environment variables
  • is_available: Whether required env vars are set

list_mcp_servers_catalog

def list_mcp_servers_catalog(
output: OutputFormat = OutputFormat.table) -> list[dict[str, Any]]

List MCP servers from the catalog with availability status.

This is the core logic of the mcp-servers-catalog command, usable by other libraries.

Arguments:

  • output - Output format (table or json). Controls how results are printed.

Returns:

List of MCP server dictionaries.