Skip to content

fix: preserve empty MCP environment variables - #3863

Open
tandede wants to merge 1 commit into
chatboxai:mainfrom
tandede:fix/preserve-empty-mcp-env
Open

fix: preserve empty MCP environment variables#3863
tandede wants to merge 1 commit into
chatboxai:mainfrom
tandede:fix/preserve-empty-mcp-env

Conversation

@tandede

@tandede tandede commented Aug 22, 2026

Copy link
Copy Markdown

Description

Preserve MCP stdio environment variables whose values are empty strings when editing an existing server configuration.

The environment parser previously required both the key and value to be non-empty after trimming. As a result, a valid entry such as EMPTY= disappeared after the configuration was converted to form values and saved again.

The parser now accepts any entry with a non-empty key while preserving an empty value. A regression test verifies that configurations containing both empty and non-empty environment variables survive a complete form conversion round trip.

Additional Notes

Validation completed:

  • targeted Vitest suite: 3 tests passed
  • Biome checks for both changed files
  • TypeScript type checking

Screenshots

Not applicable; this change corrects configuration serialization behavior without changing the interface.

Contributor Agreement

By submitting this Pull Request, I confirm that I have read and agree to the following terms:

  • I agree to contribute all code submitted in this PR to the open-source community edition licensed under GPLv3 and the proprietary official edition without compensation.

  • I grant the official edition development team the rights to freely use, modify, and distribute this code, including for commercial purposes.

  • I confirm that this code is my original work, or I have obtained the appropriate authorization from the copyright holder to submit this code under these terms.

  • I understand that the submitted code will be publicly released under the GPLv3 license, and may also be used in the proprietary official edition.

  • I have read and agree with the above statement.

@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: dfdcda86-4dd1-4188-b278-5e3caa70c0cf

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant