Get Copilot cloud agent configuration for a repository
[!NOTE] This endpoint is in public preview and is subject to change.
Gets the Copilot cloud agent configuration for a repository, including MCP server configuration, enabled review tools, Actions workflow approval settings, and firewall configuration.
OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The account owner of the repository. The name is not case sensitive.
The name of the repository without the .git extension. The name is not case sensitive.
Responses
Section titled “ Responses ”Response
object
The user-supplied MCP server configuration for the repository, as a free-form JSON object. This will be set to null if no configuration has been set.
The shape of a valid MCP configuration may evolve over time, so this property is intentionally not strictly typed. Clients should not assume a fixed schema.
object
The enabled review tools for Copilot cloud agent.
object
Whether the CodeQL tool is enabled for the Copilot cloud agent.
Whether the Copilot code review tool is enabled for the Copilot cloud agent.
Whether the secret scanning tool is enabled for the Copilot cloud agent.
Whether the dependency vulnerability checks tool is enabled for the Copilot cloud agent.
Whether Actions workflow approval is required for Copilot cloud agent pull requests.
Whether the firewall is enabled.
Whether the firewall recommended allowlist is enabled.
A list of custom allowlist entries, as hosts or URLs, that the firewall will allow the Copilot cloud agent to access.
Whether automations are enabled in this repository. When true, users can create automations that automatically run agents on a schedule or in response to events like new issues or updated pull requests.
Whether write access is required for automation triggers. When true, automations will only run if the user triggering the event has write access to the repository. When false, users can create automations that listen for events triggered by users without write access.
Examples
Default configuration
{ "mcp_configuration": null, "enabled_tools": { "codeql": true, "copilot_code_review": true, "secret_scanning": true, "dependency_vulnerability_checks": true }, "require_actions_workflow_approval": true, "is_firewall_enabled": true, "is_firewall_recommended_allowlist_enabled": true, "custom_allowlist": [], "is_automations_enabled": true, "require_write_access_for_automation_triggers": true}Configuration with an MCP server and a custom firewall allowlist
{ "mcp_configuration": { "mcpServers": { "sentry": { "type": "local", "command": "npx", "args": [ "@sentry/mcp-server@latest", "--host=$SENTRY_HOST" ], "env": { "SENTRY_HOST": "https://octo-org.sentry.io", "SENTRY_ACCESS_TOKEN": "$COPILOT_MCP_SENTRY_ACCESS_TOKEN" }, "tools": [ "search_issues", "get_issue_details" ] } } }, "enabled_tools": { "codeql": true, "copilot_code_review": true, "secret_scanning": true, "dependency_vulnerability_checks": true }, "require_actions_workflow_approval": false, "is_firewall_enabled": true, "is_firewall_recommended_allowlist_enabled": true, "custom_allowlist": [ "sentry.io", "https://api.example.com" ], "is_automations_enabled": true, "require_write_access_for_automation_triggers": false}Requires authentication
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Forbidden
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Resource not found
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Internal Error
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}