-
Notifications
You must be signed in to change notification settings - Fork 156
Description
Motivation
When configuring local Model Context Protocol (MCP) servers, users need to provide environment variables that may contain sensitive credentials like API keys. Some services, particularly Atlassian, generate API keys that include the '=' character as part of the key value. Currently, the environment variable parser incorrectly handles these cases, truncating the value at the first '=' character after the initial key-value separator. This prevents users from successfully authenticating with services that use '=' in their credentials, making certain MCP integrations completely unusable.
Current Behavior
The environment variable parser uses split('=') to separate keys from values, which splits on every occurrence of the '=' character in the line. When an environment variable value contains '=' (such as API_KEY=abc123=def456), the parser only captures the portion before the second '=' character, effectively truncating the value.
Reproduction Steps:
- Navigate to the MCP settings configuration in the application
- Add a local MCP server configuration
- In the environment variables section, enter a variable with '=' in its value, for example:
ATLASSIAN_API_KEY=dGVzdDEyMzQ1Njc4OTA= - Save the configuration
- Observe: The stored value is truncated to
dGVzdDEyMzQ1Njc4OTA(the part after the second '=' is removed)
Expected Behavior
The environment variable parser should correctly handle '=' characters within values, treating only the first '=' as the delimiter between key and value. All subsequent '=' characters should be preserved as part of the value.
Acceptance Criteria:
- Environment variables with '=' in their values are parsed correctly, preserving the entire value after the first '='
Steps To Test
- Open the MCP settings configuration
- Add the following environment variable
API_KEY=abc123=def456=ghi789
- Save and verify value is stored correctly
Submission
Download https://cap.so/ to record your screen (use Studio mode). Export as an mp4, and drag and drop into an issue comment below.
Guide to submitting pull requests: https://hackmd.io/@timothy1ee/Hky8kV3hlx