-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Background
SDK v0.1.25 (released Feb 18, 2026) includes a critical fix for MCP server environment variables: "Fix MCP env vars: send envValueMode direct across all SDKs" (PR #484 by Steve Sanderson).
Key SDK change:
- Previously, MCP environment variable handling (
envValueMode) was inconsistent across SDK languages - v0.1.25 standardizes how env vars are passed to MCP servers
- Ensures that environment variables set in
Task.envorSettings.globalEnvare correctly propagated to MCP tools
Why this matters for Planeteer:
- According to the custom instructions, Planeteer supports MCP tools via
Task.envandSettings.globalEnv(mentioned in repository memories) - Environment variables are merged in
executor.tsand set inprocess.envbefore session creation - Incorrect env handling could cause MCP servers to fail silently or use wrong credentials/config
Related commits:
- 2f2bcf7 - v0.1.25 release including MCP env var fix
Proposal
Audit and update Planeteer's MCP environment variable handling to align with SDK v0.1.25+ guarantees:
- Review
src/services/executor.ts:- Verify that
Task.envandSettings.globalEnvare correctly merged - Ensure
process.envis set beforecreateSession()is called - Confirm that sensitive env vars (tokens, keys) are properly masked in logs/UI
- Verify that
- Update
src/models/plan.ts(if needed):- Ensure
Task.envandSettings.globalEnvtypes support string values (no complex objects) - Add validation for env var names (no spaces, follow POSIX conventions)
- Ensure
- Add tests for MCP env var scenarios:
- Test that env vars flow from plan → executor → session → MCP server
- Verify sensitive var masking (existing pattern from
src/utils/env-validation.ts)
- Upgrade to SDK ^0.1.25:
- Update
package.jsondependency - Run
npm installand verify no breaking changes incopilot.ts
- Update
- Document MCP env var usage:
- Add a section to README explaining how to configure MCP servers with env vars
- Provide example showing
Task.envorSettings.globalEnvusage
Benefit
- MCP reliability: Environment variables will be correctly passed to MCP servers, preventing configuration failures
- Cross-platform consistency: Aligns with SDK's standardized env handling across Node.js, Python, Go, .NET
- Security: Ensures sensitive env vars are masked in UI/logs (already implemented per memories)
- Up-to-date SDK: Takes advantage of latest bug fixes and features
Acceptance Criteria
-
package.jsonupdated to@github/copilot-sdk: ^0.1.25 -
src/services/executor.tscorrectly mergesTask.envandSettings.globalEnvbefore session creation - Environment variables are set in
process.envprior to callingcreateSession() - Tests verify env vars are available to MCP tools during execution
- Sensitive env var masking is preserved (tokens, keys, passwords, secrets)
- README includes MCP environment variable configuration examples
- No regressions in existing task execution flows
AI generated by Weekly Enhancement Suggestions
Reactions are currently unavailable