copilot-cloud-agent-mcp
Provides tools to manage GitHub repositories, tasks, and organization permissions via the Copilot cloud agent API.
Enables AI agents to create and manage Copilot cloud agent tasks that can research, edit code, and open pull requests on GitHub repositories.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@copilot-cloud-agent-mcp Start a task on user/repo to add a README, wait and show PR URL."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
copilot-cloud-agent-mcp
MCP server that lets Claude (or any MCP client) drive the GitHub Copilot cloud agent via its REST API. You give it a prompt and a repo, it spins up a Copilot session in the cloud that researches, edits, and (optionally) opens a pull request — all without you touching github.com.
Built against the public-preview agent-tasks API (version 2026-03-10).
What it can do
Tool | Endpoint | Purpose |
|
| Kick off a new cloud-agent task |
|
| List tasks (repo-scoped or global) |
|
| Fetch one task + its sessions |
| (polls | Block until task hits a terminal state |
| — | Show model strings accepted by the API |
|
| Read org cloud-agent setting |
|
| Set |
|
| List repos with access |
|
| Replace selected-repos list |
|
| Add one repo |
|
| Remove one repo |
Related MCP server: GitHub MCP Server
Auth
The agent-tasks endpoints require a user-to-server token:
classic personal access token,
fine-grained PAT with Agent tasks: read & write repo permission, or
OAuth user token.
GitHub App installation tokens are not accepted.
Token resolution order at runtime:
GITHUB_TOKENenv varGH_TOKENenv vargh auth token(from theghCLI)
Org-permission endpoints additionally need admin:org scope.
Install (Claude Code)
One command — uvx fetches the latest commit from GitHub on every launch:
claude mcp add copilot-cloud-agent --scope user -- \
uvx --from git+https://github.com/fvegiard/copilot-cloud-agent-mcp.git \
copilot-cloud-agent-mcpVerify:
claude mcp list | grep copilot-cloud-agent
# → copilot-cloud-agent: uvx --from git+… - ✓ ConnectedInstall (Claude Desktop, Cursor, etc.)
Add to your client's mcpServers config:
{
"mcpServers": {
"copilot-cloud-agent": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/fvegiard/copilot-cloud-agent-mcp.git",
"copilot-cloud-agent-mcp"
]
}
}
}Quick example
Inside Claude, ask:
Using copilot-cloud-agent, start a task on
fvegiard/learn-mcpwith prompt "Add a CHANGELOG.md and update README to link to it", then wait for it to finish and tell me the PR URL.
Claude will call create_task, then wait_for_task, then pull artifacts[].data.global_id out of the final task object.
API reference
Available Tools
11 toolscreate_taskA
Start a new Copilot cloud-agent task on a repository.
POST /agents/repos/{owner}/{repo}/tasks
Args: owner: Repo owner (user or org login). repo: Repo name. prompt: Natural-language instruction for the agent. base_ref: Branch the agent should base work on (defaults to repo default). head_ref: Branch the agent should push work to (optional). model: Optional model override. Known values: claude-sonnet-4.6, claude-opus-4.6, gpt-5.2-codex, gpt-5.3-codex, gpt-5.4, claude-sonnet-4.5, claude-opus-4.5. Omit for auto-selection. create_pull_request: If true, the agent opens a PR when done.
Returns:
Task object including id, state, html_url, artifacts.
Inputs: repo (required), owner (required), prompt (required), model, +3 more.
disable_repo_for_orgA
Remove one repo from the org's selected cloud-agent list.
DELETE /orgs/{org}/copilot/coding-agent/permissions/repositories/{repository_id}
Requires admin:org scope.
Inputs: org (required), repository_id (required).
enable_repo_for_orgC
Add one repo to the org's selected cloud-agent list.
PUT /orgs/{org}/copilot/coding-agent/permissions/repositories/{repository_id}
Requires admin:org scope.
Inputs: org (required), repository_id (required).
get_org_permissionsA
Get an org's Copilot coding-agent repo-access setting.
GET /orgs/{org}/copilot/coding-agent/permissions
Returns: {enabled_repositories: all|selected|none, selected_repositories_url}
Requires admin:org scope.
Inputs: org (required).
get_taskA
Get a single task (with its sessions) by ID.
Prefers the repo-scoped endpoint when owner+repo are provided: GET /agents/repos/{owner}/{repo}/tasks/{task_id} Otherwise: GET /agents/tasks/{task_id}
The response includes a sessions array — each session has its own state,
model, prompt, head_ref/base_ref, and any error.message.
Inputs: task_id (required), repo, owner.
list_known_modelsA
Return the model strings accepted by create_task as of API v2026-03-10.
Omit model from create_task to let GitHub pick the default.
Inputs: no named parameters. Returns: result
list_org_enabled_reposA
List repos in an org that have cloud-agent access enabled.
GET /orgs/{org}/copilot/coding-agent/permissions/repositories
Requires admin:org scope.
Inputs: org (required), page, per_page.
list_tasksA
List Copilot cloud-agent tasks.
If both owner and repo are provided, scopes to that repo:
GET /agents/repos/{owner}/{repo}/tasks
Otherwise lists tasks visible to the caller across all repos:
GET /agents/tasks
Args: owner: Optional repo owner. repo: Optional repo name. state: Filter by states (any of queued, in_progress, completed, failed, idle, waiting_for_user, timed_out, cancelled). is_archived: Include archived tasks. since: ISO 8601 timestamp; only tasks updated after this. sort: updated_at or created_at. direction: asc or desc. per_page: 1–100, default 30. page: page number, default 1. creator_id: Repo-scoped only — filter by creator user IDs.
Inputs: page, repo, sort, owner, +6 more.
set_org_permissionsA
Set whether all, selected, or no repos in an org can use the cloud agent.
PUT /orgs/{org}/copilot/coding-agent/permissions
Requires admin:org scope.
Inputs: org (required), enabled_repositories (required).
set_org_selected_reposB
Replace the org's selected-repos list for cloud-agent access.
PUT /orgs/{org}/copilot/coding-agent/permissions/repositories
Only meaningful when enabled_repositories=selected.
Requires admin:org scope.
Inputs: org (required), selected_repository_ids (required).
wait_for_taskA
Poll a task until it reaches a terminal state, or timeout.
Terminal states: completed, failed, timed_out, cancelled. Non-terminal (will keep polling): queued, in_progress, idle, waiting_for_user.
Args:
task_id: Task ID returned by create_task.
owner: Optional repo owner (preferred — faster path).
repo: Optional repo name.
timeout_seconds: Hard ceiling on total wait. Default 30 min.
poll_interval_seconds: Sleep between polls. Default 15s.
Returns:
Final task object plus _meta.elapsed_seconds and _meta.polls.
Inputs: task_id (required), repo, owner, timeout_seconds, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
The tools cleanly separate into task management (create, get, list, wait) and org permission management (enable, disable, get, set, list). No overlapping purposes; each tool targets a distinct API operation.
All tool names follow a consistent verb_noun pattern in snake_case (e.g., create_task, get_org_permissions). No mixing of conventions or vague verbs.
11 tools cover two focused domains (task lifecycle and org permissions) without redundancy or bloat. The scope is appropriate for a Copilot cloud-agent server.
Task management is well-covered (create, get, list, wait) but lacks a cancel/stop tool, which is a noticeable gap given that `cancelled` is a terminal state. Org permissions are fully covered.
Maintenance
Related MCP Connectors
GitHub Copilot MCP: code, repo, PR, workflow tools for AI assistants.
Operate GitHub from your AI assistant: repos, PRs, issues, Actions. Previews and read-only mode.
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Connect ChatGPT and Claude to your Mac, Windows or Linux with secure MCP remote access.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables claude.ai to connect to GitHub MCP using OAuth, providing full toolset for repository, issue, PR, Actions, and gist operations.-
- FlicenseAqualityDmaintenanceConnects Claude to the GitHub REST API, enabling repository listing, issue management, file content retrieval, and code search through natural language tool calls.6-
- AlicenseNot gradedqualityCmaintenanceEnables Claude and other MCP clients to read and write GitHub repositories, pull requests, issues, files, branches, commits, releases, and more using a personal access token without OAuth.MIT
- FlicenseNot gradedqualityCmaintenanceEnables headless Claude to review pull requests and triage CI failures on a real GitHub repository, routing all GitHub write actions through the MCP server.-