pankajkoti opened a new pull request, #74500: URL: https://github.com/apache/airflow/pull/74500
The `mcp` connection form stores the Arguments field as a string, and its description tells users to enter a JSON array. `MCPHook.get_conn` wrapped any string into a one-item list, so a value like `["-m", "my_server"]` reached the stdio transport as a single bogus argv entry and the server failed to start. A string starting with `[` is now parsed as a JSON array of strings. A malformed array or non-string items raise a `ValueError` naming the connection, without echoing the value since args can carry tokens. Any other string is still treated as a single argument, so existing connections that use a bare string keep working. The connection docs describe both forms. A single literal argument that starts with `[` must now be written as a one-item array, for example `["[::1]"]`. This touches the same lines as #74451, which validates `args` and `timeout`. The parsing lives in a small helper so the two should merge cleanly. After both land, the list-of-strings check from #74451 still applies to non-string, non-list values. --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes (Claude Code) Generated-by: Claude Code following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) --- * Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)** for more information. Note: commit author/co-author name and email in commits become permanently public when merged. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
