Skip to content

MCP error 0: failed to get copilot space - HTTP 415 "Unsupported Media Type" #1286

@jhidalgo3

Description

@jhidalgo3

Describe the bug

When attempting to retrieve the GitHub Copilot Space configuration via the MCP (Model Context Protocol), the CLI fails with a twirp error unknown. The error specifically points to an intermediary returning an HTTP 415 "Unsupported Media Type" status code during the "getting custom copilot config" phase.

Affected version

v0.0.402

Steps to reproduce the behavior

Open a terminal where github-copilot-cli (with MCP integration) is active.

Run a command or workflow that triggers the retrieval of the Copilot Space/Workspace context.

Observe the error output after the initial workspace path is obtained.

Expected behavior

The CLI should successfully communicate with the GitHub MCP intermediary, parse the media types correctly, and retrieve the Copilot Space configuration without errors.

Additional context

Environment: GitHub Copilot CLI using Github MCP.

Observations: The failure occurs specifically when calling the intermediary service. The "Unsupported Media Type" error suggests a mismatch in the Content-Type or Accept headers (or the payload format) expected by the Twirp-based backend service.

The previous step (pwd / obtaining workspace path) completes successfully, suggesting the issue is specific to the Copilot Space configuration request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions