HKUDS/Vibe-Trading · critical · LiveRunnerUnavailable

no MCP server configured for live broker {broker!r}

Error message

no MCP server configured for live broker {broker!r}

What it means

`_live_broker_adapter` scans configured MCP servers for one matching the requested live broker via `is_live_broker_entry`; when none matches it raises LiveRunnerUnavailable with the broker name. This is a configuration error — the deployment has no MCP server entry wired to that broker.

Source

Thrown at agent/src/api/live_routes.py:382

    from src.tools.mcp import MCPServerAdapter

    try:
        from src.config.schema import is_live_broker_entry
    except Exception:  # pragma: no cover - older schema without URL detection
        is_live_broker_entry = None  # type: ignore[assignment]

    cfg = load_agent_config()
    servers = getattr(cfg, "mcp_servers", {}) or {}
    for name, server_cfg in servers.items():
        is_match = name == broker
        if not is_match and is_live_broker_entry is not None and broker == "robinhood":
            try:
                is_match = is_live_broker_entry(name, server_cfg)
            except Exception:  # pragma: no cover
                is_match = False
        if is_match:
            return MCPServerAdapter(name, server_cfg)
    raise LiveRunnerUnavailable(f"no MCP server configured for live broker {broker!r}")


def _fetch_broker_ceilings(broker: str) -> Optional[Dict[str, Any]]:
    """Best-effort fetch of broker-side account ceilings for the commit re-check.

    Returns ``None`` on any failure so the caller falls back to the proposal's
    own snapshot — a commit is never blocked on a broker read.
    """
    h = _host()
    try:
        adapter = h._live_broker_adapter(broker)
    except LiveRunnerUnavailable:
        return None
    try:
        from src.trading.service import runner_tool_name

        account_tool = runner_tool_name(broker, "account") or "get_account"
        result = adapter.call_tool(account_tool, {})

View on GitHub (pinned to 80ffdda44c)

Solutions

  1. Check the MCP server configuration and confirm an entry exists for the requested broker with the exact broker identifier used in the request.
  2. Fix naming mismatches (case, aliases) between the request's broker string and the config entry.
  3. If the entry exists but is skipped, inspect it — malformed metadata makes is_live_broker_entry fail and the entry is silently ignored.
  4. Deploy or restore the missing MCP server config for live trading.

Example fix

# before
runner = _build_live_runner(session, broker="IBKR")  # config says broker='ibkr'

# after
broker = broker.strip().lower()          # normalize like the config lookup
assert any(is_live_broker_entry(n, c) for n, c in mcp_servers.items() for _ in [0] if is_live_broker_entry(n, c)), "no live broker MCP configured"
runner = _build_live_runner(session, broker=broker)
Defensive patterns

Strategy: fallback

Validate before calling

def has_live_broker_adapter(broker: str) -> bool:
    try:
        _live_broker_adapter(broker)
        return True
    except LiveRunnerUnavailable:
        return False

Try / catch

try: adapter = _live_broker_adapter(broker) except LiveRunnerUnavailable: fallback_to_paper_or_fail_fast(broker)

Prevention

When it happens

Trigger: Requesting a live operation for broker X (e.g. through `_build_live_runner` or `_fetch_broker_ceilings`) when the MCP server config contains no entry flagged/matching live broker X.

Common situations: Broker name casing/mismatch between config and request ('ibkr' vs 'IBKR'), MCP server entry missing after a config migration, live trading enabled without provisioning the broker MCP server, or entry present but `is_live_broker_entry` throwing so it's skipped.

Related errors


AI-assisted analysis of HKUDS/Vibe-Trading@80ffdda44c (2026-08-28). Data as JSON: /api/errors/b4aa1c8f05465162. Report an issue: GitHub.