Skip to main content
Glama
copilot-cloud-agent-mcp

copilot-cloud-agent-mcp

by fvegiard

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

create_task

POST /agents/repos/{owner}/{repo}/tasks

Kick off a new cloud-agent task

list_tasks

GET /agents/[repos/.../]tasks

List tasks (repo-scoped or global)

get_task

GET /agents/[repos/.../]tasks/{task_id}

Fetch one task + its sessions

wait_for_task

(polls get_task)

Block until task hits a terminal state

list_known_models

—

Show model strings accepted by the API

get_org_permissions

GET /orgs/{org}/copilot/coding-agent/permissions

Read org cloud-agent setting

set_org_permissions

PUT …/permissions

Set all | selected | none

list_org_enabled_repos

GET …/permissions/repositories

List repos with access

set_org_selected_repos

PUT …/permissions/repositories

Replace selected-repos list

enable_repo_for_org

PUT …/permissions/repositories/{id}

Add one repo

disable_repo_for_org

DELETE …/permissions/repositories/{id}

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:

  1. GITHUB_TOKEN env var

  2. GH_TOKEN env var

  3. gh auth token (from the gh CLI)

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-mcp

Verify:

claude mcp list | grep copilot-cloud-agent
# → copilot-cloud-agent: uvx --from git+… - ✓ Connected

Install (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-mcp with 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 tools
create_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

    A3.8/5.0

    Scored across 11 tools

    Disambiguation5/5

    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.

    Naming Consistency5/5

    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.

    Tool Count5/5

    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.

    Completeness4/5

    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

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      A
      quality
      D
      maintenance
      Connects Claude to the GitHub REST API, enabling repository listing, issue management, file content retrieval, and code search through natural language tool calls.
      6
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables 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