Skip to content

MCP transport: positional args mishandled in access-group-user-add and user-policy-create #225

@rut31337

Description

@rut31337

Environment

  • ibmcloud version: 2.41.1 (1ed318786-2026-02-11T15:56:18+00:00)
  • macOS (Darwin 25.3.0)
  • MCP transport: --mcp-transport stdio

Description

When using the built-in MCP server (ibmcloud --mcp-transport stdio), two commands have broken parameter mapping where positional arguments are not correctly passed to the underlying CLI.

Bug 1: iam access-group-user-add

The MCP tool schema exposes GROUP_NAME and iam-ids as named properties. When called via MCP with:

{
  "GROUP_NAME": "Add cases and view orders",
  "iam-ids": "RedHat-55097289"
}

The iam-ids value appears to be passed as the positional GROUP_NAME argument instead, producing:

FAILED
Access group 'RedHat-55097289' was not found.

Expected: The CLI should execute the equivalent of:

ibmcloud iam access-group-user-add "Add cases and view orders" --iam-ids RedHat-55097289

Bug 2: iam user-policy-create

The MCP tool schema exposes USER_NAME as a named property. When called via MCP with:

{
  "USER_NAME": "rh-ee-acasanov",
  "roles": "Administrator,Manager",
  "service-name": "cloud-object-storage"
}

It fails with:

FAILED
Incorrect Usage: command accepts 1 arg(s)

Expected: The CLI should execute the equivalent of:

ibmcloud iam user-policy-create rh-ee-acasanov --roles Administrator,Manager --service-name cloud-object-storage

Root cause

It appears the MCP parameter-to-CLI mapping does not correctly distinguish between positional arguments and named flags. Positional args defined in the MCP schema (like GROUP_NAME and USER_NAME) are not being placed in the correct position when constructing the underlying CLI command.

Workaround

Use the ibmcloud CLI directly instead of the MCP transport for these commands.

Likely affected commands

Any MCP-exposed command that takes positional arguments alongside named flags is likely affected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions