Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions pkg/workflow/mcp_setup_generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,14 @@ func (c *Compiler) generateMCPSetup(yaml *strings.Builder, tools map[string]any,
if toolValue == false {
continue
}
// When cli-proxy is enabled, agents use the pre-authenticated gh CLI for GitHub
// reads instead of the GitHub MCP server. Skip so it is not configured with the gateway.
if toolName == "github" && isFeatureEnabled(constants.CliProxyFeatureFlag, workflowData) {
mcpSetupGeneratorLog.Print("Skipping GitHub MCP server registration: cli-proxy feature flag is enabled")
continue
}
// Standard MCP tools
if toolName == "github" || toolName == "playwright" || toolName == "cache-memory" || toolName == "agentic-workflows" {
// When cli-proxy is enabled, agents use the pre-authenticated gh CLI for GitHub
// reads instead of the GitHub MCP server. Skip registering the GitHub MCP server
// so it is not configured with the gateway.
if toolName == "github" && isFeatureEnabled(constants.CliProxyFeatureFlag, workflowData) {
mcpSetupGeneratorLog.Print("Skipping GitHub MCP server registration: cli-proxy feature flag is enabled")
continue
}
mcpTools = append(mcpTools, toolName)
} else if mcpConfig, ok := toolValue.(map[string]any); ok {
// Check if it's explicitly marked as MCP type in the new format
Expand Down
4 changes: 2 additions & 2 deletions pkg/workflow/unified_prompt_step.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ func (c *Compiler) collectPromptSections(data *WorkflowData) []PromptSection {
}
}

// 9b. GitHub tool-use guidance: directs the model to the correct mechanism for
// 10. GitHub tool-use guidance: directs the model to the correct mechanism for
// GitHub reads (and writes when safe-outputs is also enabled).
// When cli-proxy is enabled, the agent uses the pre-authenticated gh CLI for reads
// instead of a GitHub MCP server (which is not registered). Otherwise, the GitHub
Expand Down Expand Up @@ -255,7 +255,7 @@ func (c *Compiler) collectPromptSections(data *WorkflowData) []PromptSection {
})
}

// 10. PR context (if comment-related triggers and checkout is needed)
// 11. PR context (if comment-related triggers and checkout is needed)
hasCommentTriggers := c.hasCommentRelatedTriggers(data)
needsCheckout := c.shouldAddCheckoutStep(data)
permParser := NewPermissionsParser(data.Permissions)
Expand Down
Loading