OpenBB-finance/OpenBB · error · ValueError

Target provider '{target}' not found or not loaded. Availabl

Error message

Target provider '{target}' not found or not loaded. Available targets: {', '.join(available)}

What it means

Raised by install_skill when the target skills provider cannot be found among the loaded MCP providers. Targets are matched by name ('bundled' plus any registered vendor skills providers); if none matches, the server enumerates the actually-available targets in the error. Typically caused by a typo or by a vendor extension not being installed/loaded.

Source

Thrown at openbb_platform/extensions/mcp_server/openbb_mcp_server/app/app.py:813

            if target_key == "bundled":
                if settings.default_skills_dir:
                    bundled_root = Path(settings.default_skills_dir).resolve()
                    if bundled_root in provider._roots:  # noqa: SLF001
                        target_provider = provider
                        break
            else:
                vendor_cls = _VENDOR_SKILLS_PROVIDERS.get(target_key)
                if vendor_cls and isinstance(provider, vendor_cls):
                    target_provider = provider
                    break

        if target_provider is None:
            available = ["bundled"]
            for p in mcp.providers:
                for vendor_name, vendor_cls in _VENDOR_SKILLS_PROVIDERS.items():
                    if isinstance(p, vendor_cls):
                        available.append(vendor_name)
            raise ValueError(
                f"Target provider '{target}' not found or not loaded. "
                f"Available targets: {', '.join(available)}"
            )

        if not target_provider._roots:  # noqa: SLF001
            raise ValueError(
                f"Target provider '{target}' has no configured root directories."
            )

        # Use the first root directory for writing
        root_dir = target_provider._roots[0]  # noqa: SLF001
        skill_dir = root_dir / skill_name

        # Create the directory and write all files
        skill_dir.mkdir(parents=True, exist_ok=True)
        written_files: list[str] = []
        for filename, content in files.items():
            file_path = skill_dir / filename

View on GitHub (pinned to 3e071fcc2c)

Solutions

  1. Pick a target from the 'Available targets' list in the error message.
  2. Install/enable the vendor extension that registers the skills provider and restart the MCP server.
  3. Use the default 'bundled' target if you just want the skill available locally.
  4. Check server startup logs to confirm which SkillsDirectoryProviders actually loaded.

Example fix

# before
await install_skill(skill_name="s", target="acme", files={"SKILL.md": "..."})

# after
await install_skill(skill_name="s", target="bundled", files={"SKILL.md": "..."})  # or a name from the error's Available targets
Defensive patterns

Strategy: validation

Validate before calling

async def available_skill_targets(mcp_client) -> set[str]:
    # 'bundled' is always present; vendors appear per loaded providers
    res = await mcp_client.call_tool("list_resources", {})
    return {"bundled", *(r.get("provider", "") for r in res.result)}

assert target in available_skill_targets(client)

Type guard

def is_valid_target(target: str, available: list[str]) -> bool:
    return isinstance(target, str) and target.strip().lower() in {a.lower() for a in available}

Try / catch

try:
    await install_skill(skill_name=n, target=target, files=files)
except ValueError as e:
    if "Available targets:" in str(e):
        target = "bundled"  # safe default from the error's own list
        await install_skill(skill_name=n, target=target, files=files)
    else:
        raise

Prevention

When it happens

Trigger: Calling install_skill(target='my-vendor') when no provider with that name is registered; a vendor skills provider class existing but never instantiated because its extension is missing; trailing whitespace/casing differences in the target string (it is lower().strip()'d, so casing is fine but the name must match).

Common situations: Installing skills to a vendor directory whose extension isn't installed; mismatch between documentation target names and the running server's registered providers; stale examples referencing removed vendors.

Related errors


AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14). Data as JSON: /api/errors/4be30b7a992c6cfe. Report an issue: GitHub.