-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Background
The Copilot SDK v0.1.25 (Feb 18, 2026) includes important MCP (Model Context Protocol) environment variable improvements in PR #484 authored by Steve Sanderson. The change fixes MCP environment variable handling by sending envValueMode: direct across all SDK implementations.
Key changes:
- Updated
@github/copilotto 0.0.411-1 with MCP env var fixes - CLI now supports direct environment variable mode for MCP servers
- Ensures environment variables are properly passed to MCP tools
Related SDK commits:
Proposal
Add support for configuring MCP environment variables when creating Copilot agent sessions in Planeteer. This would allow users to:
- Specify environment variables needed by MCP tools (e.g., API keys, database URLs, service endpoints) in the plan definition or a configuration file
- Pass these environment variables to agent sessions via
SessionConfigwhen executing tasks - Support both global environment variables (apply to all tasks) and task-specific environment variables
Implementation approach:
- Extend the
Taskmodel to include optionalenvfield (key-value pairs) - Update
src/services/executor.tsto merge global and task-specific env vars when creating sessions - Add UI in the refine screen for users to configure environment variables for tasks
- Store environment variables in the persisted plan JSON (with warnings about sensitive data)
Benefit
This enhancement enables Planeteer to work with Copilot agents that rely on MCP tools requiring configuration:
- MCP tool support: Many MCP servers need API keys, database credentials, or service endpoints passed as environment variables
- Task customization: Different tasks can use different configurations (e.g., dev vs. prod database URLs)
- Professional workflows: Supports real-world scenarios where agents need access to external services (databases, APIs, cloud providers)
- SDK alignment: Takes advantage of the recent SDK fixes ensuring environment variables are properly propagated
Acceptance Criteria
- Add
env?: Record<string, string>field to theTaskinterface insrc/models/plan.ts - Update
src/services/executor.tsto accept environment variables in session configuration when creating agent sessions - Display environment variables in the refine screen task editor (with masking for sensitive values)
- Save environment variables to plan JSON with a warning comment about not committing secrets
- Add a settings file (
.planeteer/settings.json) for global environment variables that apply to all plans - Update SDK dependency to
^0.1.25inpackage.jsonto ensure MCP env var fixes are available - Document environment variable configuration in README with examples
- Add validation to warn users when environment variables look like secrets (contain "key", "token", "password", etc.)
AI generated by Weekly Enhancement Suggestions
Reactions are currently unavailable