github-mcp-server icon indicating copy to clipboard operation
github-mcp-server copied to clipboard

Remote MCP OAuth + Gemini CLI Errors Out

Open googleSandy opened this issue 1 year ago • 7 comments

Describe the bug

Unable to use remote MCP with OAuth. I just get: [Error: Could not parse tool response]

Affected version

Using the remote MCP config:

  "mcpServers": {
    "github-remote": {
      "httpUrl": "https://api.githubcopilot.com/mcp/",
      "oauth": {
        "enabled": true,
        "clientId": "<Client ID from OAuth app>",
        "clientSecret": "<Client secret from OAuth app>"
      }
    },

I have also confirmed I can see the tools list and are authenticated with OAuth: 🟢 github-remote - Ready (OAuth authenticated) (91 tools, 2 prompts)

Steps to reproduce the behavior

  1. Type this 'Create a repository called "detection-as-code" and initialize it with a README'
  2. See error above.

Expected vs actual behavior

I would expect it to use the MCP tool create_repository to create a new repo in my Github.

Logs

I have also seen it output:

MCP tool `create_repository` reported tool error for function call: {"name": "create_repository", "args":{"name": "detection-as-code"}} with response: https://api.github.com/user/repos: 404 Not Found []"}],"isError":true}}}}]

googleSandy avatar Sep 10 '25 17:09 googleSandy

Hi 👋 Can you share some additional info on your app:

  1. Is it Oauth App or GitHub App?
  2. What are the scopes/permissions granted to your app?
  3. If it is a GitHub App - is it installed on the org/user that you're trying to create repository in?

almaleksia avatar Sep 22 '25 11:09 almaleksia

My tocken

rusly2002ms-cmd avatar Sep 22 '25 11:09 rusly2002ms-cmd

Hi 👋 Can you share some additional info on your app:

  1. Is it Oauth App or GitHub App?
  2. What are the scopes/permissions granted to your app?
  3. If it is a GitHub App - is it installed on the org/user that you're trying to create repository in?
  1. OAuth App
  2. None are defined or unable to define within the OAuth App. The only sense of ownership/permissions I see are that I am the owner of the application
  3. N/A - not a GitHub App

googleSandy avatar Sep 22 '25 18:09 googleSandy

Thanks for the details. I think the problem here is in the lacking scopes. In order to create a private repo your token needs to have a repo scope, and public_repo - to create a public repo, see https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#create-a-repository-for-the-authenticated-user

Oauth is not officially supported for GitHub MCP in Gemini CLI and I'm not sure whether if there's a way in this configuration to define scopes that need to be requested.

I'd advise to use personal access tokens for now.

almaleksia avatar Sep 25 '25 11:09 almaleksia

This issue is stale because it has been open for 30 days with no activity. Leave a comment to avoid closing this issue in 60 days.

github-actions[bot] avatar Jun 01 '26 10:06 github-actions[bot]

This issue was closed because it has been inactive for 60 days since being marked as stale.

github-actions[bot] avatar Aug 01 '26 09:08 github-actions[bot]