Skip to content

list_copilot_spaces / get_copilot_space tools don't return any results in Android Studio #1496

@ViktorSamusenko-TomTom

Description

@ViktorSamusenko-TomTom

Describe the bug

When using GitHub MCP with enabled list_copilot_spaces and get_copilot_space tools in Android studio, they do not return any output or errors despite everything is configured properly (my account has created Copilot Spaces, my PAT is correct and has necessary permissions, see more context below). Everything works perfectly for my account / PAT in VS Code (using OAuth) and in our internal web-based agent (using the same PAT).

Affected version

I have Android Studio Otter | 2025.2.1 Patch 1
Build #AI-252.25557.131.2521.14432022, built on November 13, 2025

Steps to reproduce the behavior

  1. Create a new Copilot Space in https://github.com/copilot/spaces.
  2. Optionally, add context from another repository (files).
  3. Configure GitHub MCP in Android studio with the following configuration:
"github": {
      "url": "https://api.githubcopilot.com/mcp/",
      "requestInit": {
        "headers": {
          "Authorization": "Bearer myGitHubPat", // apparently, redacted for security
          "X-MCP-Toolsets":"context,repos,issues,pull_requests,actions,copilot_spaces"
        }
      }
    }

Note: the X-MCP-Toolsets header is needed to enable the list_copilot_spaces and get_copilot_space tools to be able to query my Copilot Spaces.

  1. Restart Android Studio.
  2. In Android Studio, go to Copilot chat -> select Agent mode -> Configure tools and verify that GitHub MCP is available and list_copilot_spaces and get_copilot_space tools are there.
  3. Ask Copilot to call list_copilot_spaces and get_copilot_space tools.

Expected vs actual behavior

Expected:
Both tools should return the Copilot Spaces data:

  • list_copilot_spaces should return all my Copilot Spaces I have access to.
  • get_copilot_space with the proper owner and Space name parameters should return the context of that space (general instructions, files added to its context, etc.).

Actual:

  • Copilot sees both tools, calls them correctly but they return nothing, also no errors. So, Copilot keeps saying that my account do not have any Copilot Spaces created or do not have enough permissions.

To validate the latter, I performed 2 extra checks:

  • replicated the same flow in VS Code, and got correct results: all my Copilot spaces from the list_copilot_spaces and could fetch a specific Copilot space via the get_copilot_space tool. However, the VS Code MCP configuration uses OAuth, so I didn't stop there and wanted to verify that my PAT also works.
  • I used our in-house web-based agent and connected GitHub MCP to it using the same https://api.githubcopilot.com/mcp/ URL and the same headers {"Authorization": "Bearer myGitHubPat","X-MCP-Toolsets":"context,repos,issues,pull_requests,actions,copilot_spaces"}. The web-based agent was able to connect to the GitHub MCO, discover it's tools including list_copilot_spacesandget_copilot_space`, call them and get correct data in return for both. So, I think I verified that my account, MCP configuration or my PAT are not a problem. It's something in Android Studio that causes this.

However, we cannot use VS Code or web-based agent because our department is all Android developers, and we must use Android Studio. So, VS Code is not a good workaround.

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions