Skip to content

[BUG] [v0.0.7] cortex mcp add success message joins space-containing args into flat string — "Args: -m my server module arg with spaces" instead of quoting each argument #48499

@Grizouforever

Description

@Grizouforever

Project

ide

Description

When adding a stdio MCP server whose arguments contain spaces, the success confirmation message joins all arguments with a single space, making it impossible to distinguish individual arguments from one another.

For example, after running cortex mcp add myserver -- python3 -m "my server module" "arg with spaces", the success output says:

Args: -m my server module arg with spaces

This displays 3 arguments as if they were 7 separate words. In contrast, cortex mcp get myserver correctly quotes space-containing arguments: Args: -m "my server module" "arg with spaces".

This is misleading because a user reading the add confirmation cannot verify whether their arguments were parsed correctly. The get command applies quoting logic to args containing spaces, but the add success path simply calls .join(" ") without any quoting.

Error Message

N/A

Debug Logs

N/A

System Information

  • Cortex TUI v0.0.7
  • OS: Linux x86_64

Screenshots

screenshot

Steps to Reproduce

  1. Run cortex mcp add myserver -- python3 -m "my server module" "arg with spaces"
  2. Read the success confirmation output
  3. Compare with cortex mcp get myserver

Expected Behavior

The add success message should quote arguments containing spaces, matching the format used by cortex mcp get. Expected output: Args: -m "my server module" "arg with spaces".

Actual Behavior

The add success message joins all arguments with a flat space: Args: -m my server module arg with spaces. This makes it look like 7 separate single-word arguments instead of the 3 that were actually stored.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ideIssues related to IDEvalidValid issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions