[WIP] Fix MCP server permission denied error for testing#14183
Closed
[WIP] Fix MCP server permission denied error for testing#14183
Conversation
- Add AgenticWorkflowsMCPServerID constant - Update mcp_config_builtin.go to use constant - Update mcp_renderer.go TOML rendering - Update all test expectations - Add constants imports to test files This aligns with built-in MCP server naming convention: - safeoutputs (not safe_outputs) - safeinputs (not safe_inputs) - agenticworkflows (not agentic_workflows) Fixes permission denied errors in Copilot agent workflows Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Investigation Plan: MCP Server Permission Denied Error
Root Cause & Resolution
The Problem:
The Daily CLI Tools Exploratory Tester and other workflows were failing with "Permission denied and could not request permission from user" errors when attempting to use the agentic-workflows MCP server.
Root Cause:
Built-in MCP server identifiers in gh-aw follow a single-word lowercase naming convention:
safeoutputs(notsafe_outputs)safeinputs(notsafe_inputs)agenticworkflows(notagentic_workflows)The compiled workflow lock files were incorrectly generating
"agentic_workflows"(with underscore), but the Copilot agent expected"agenticworkflows"(no separator). This mismatch caused permission validation to fail.The Fix:
AgenticWorkflowsMCPServerID = "agenticworkflows"constant topkg/constants/constants.gopkg/workflow/mcp_config_builtin.goto use the constantpkg/workflow/mcp_renderer.goTOML renderingagentic_workflows(underscore) remains in any lock fileImpact:
This fix resolves the permission denied errors and allows workflows to properly access the agentic-workflows MCP server for audit, logs, and compile functionality.
Original prompt
This section details on the original issue you should resolve
<issue_title>[cli-tools-test] MCP Server Permission Denied Error Blocking All Testing</issue_title>
<issue_description>## Problem Description
The Daily CLI Tools Exploratory Tester is unable to perform any testing due to a "Permission denied and could not request permission from user" error when attempting to use MCP server tools, including the agentic-workflows server.
Impact
This completely blocks the automated testing workflow, preventing:
auditcommand functionalitylogscommand functionalitycompilecommand functionalitySteps to Reproduce
agentic_workflows-status)Expected Behavior
MCP server tools should be accessible and return responses based on tool invocation.
Actual Behavior
All tool calls return:
Permission denied and could not request permission from userEnvironment
Diagnostics
MCP Server Status (from logs)
MCP Gateway: ✅ Healthy and running
MCP Configuration (
/home/runner/.copilot/mcp-config.json):{ "mcpServers": { "agentic_workflows": { "type": "http", "url": "(host.docker.internal/redacted) "tools": ["*"] }, "github": { ... }, "safeoutputs": { ... } } } ``` **Agentic Workflows MCP Server**: ✅ Initialized successfully ``` [2026-02-06T16:32:04Z] [INFO] [backend] Successfully launched MCP backend server: agentic_workflows [2026-02-06T16:32:04Z] [INFO] [backend] [stderr] mcp:server MCP server ready on stdio [2026-02-06T16:32:04Z] [INFO] [backend] Successfully registered tools from agentic_workflowsError Details
Failed Tool Calls:
agentic_workflows-status→ Permission deniedbashcommands → Permission denied (some commands succeed, others fail)Gateway Logs: No errors or authentication failures logged. All requests show status 200 or 202.
Analysis
The MCP infrastructure (gateway, backend servers, configuration) is functioning correctly. The "Permission denied" error appears to originate from the Copilot agent environment itself, not from the MCP servers or gateway.
Possible causes:
Recommendations
Additional Context
This is a blocker for the entire Daily CLI Tools Exploratory Testing workflow. Without MCP tool access, no testing phases can be executed. The workflow instructions explicitly state "DO NOT USE
gh awit is not authenticated. Only use tools."The workflow appears to be caught in a permissions deadlock where:
Comments on the Issue (you are @copilot in this section)
@pelikhan Investigate gateway.log and agent logs to determine why this mcp fails.💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.