Skip to content

fix: don't add args or env to mcp.json file if args or env is empty #1453

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 28, 2025

Conversation

chungjac
Copy link
Contributor

Problem

  • if a user does not include args or env fields when adding mcp server, it will be empty in the mcp.json
  • user can input environment variable with a name but no value, and also a value but no name

Solution

  • do not add args or env fields in mcp.json if fields are empty
  • field validation for env variables: must have both name and value, or neither
Screen.Recording.2025-05-27.at.6.08.50.PM.mov

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@chungjac chungjac requested a review from a team as a code owner May 28, 2025 01:25
@bywang56 bywang56 merged commit edf7b5a into aws:agentic-mcp May 28, 2025
@chungjac chungjac deleted the envFIx branch June 4, 2025 01:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants