Skip to content

Publish server as a GitHub cli extension #215

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
gillisandrew opened this issue Apr 10, 2025 · 9 comments
Open

Publish server as a GitHub cli extension #215

gillisandrew opened this issue Apr 10, 2025 · 9 comments
Labels

Comments

@gillisandrew
Copy link

gillisandrew commented Apr 10, 2025

Describe the feature or problem you’d like to solve

Provide a simplified installation and configuration experience to users with the GitHub cli already installed and configured.

Proposed solution

Publish the stdio server as a github extension that reuses the cli's token to authorize api actions. Installation instructions would be something like:

  1. Run gh extension install github/gh-github-mcp-server
  2. Add the following in VS Code User Settings (JSON):
{
  "mcp": {
    "servers": {
      "github": {
        "command": "gh",
        "args": [
          "github-mcp-server",
          "stdio"
        ]
      }
    }
  }
}

Additional context

https://docs.github.com/en/github-cli/github-cli/creating-github-cli-extensions

@gillisandrew gillisandrew added the enhancement New feature or request label Apr 10, 2025
@williammartin
Copy link
Collaborator

We're already looking into doing this, so thanks for the feedback on the direction!

@gillisandrew
Copy link
Author

@williammartin Great happy to add to the discussion. Piggybacking off of the CLI's OAuth token would be particularly interesting since provisioning PATs with long lifetimes is a non-starter for many enterprise users. Thanks for looking into it!

@MayorFaj
Copy link
Contributor

@williammartin I have built something for this already, how do we make it available for users

@williammartin
Copy link
Collaborator

Happy for you to share it here and we can talk about it, thanks. However, it's likely that if we did ship an extension, we would want to take ownership over the maintenance and release cycle.

@MayorFaj
Copy link
Contributor

@williammartin would you rather I raise a PR for that here, or a paste here a repo link containing the code?

@williammartin
Copy link
Collaborator

Go ahead and link it here for the moment, thank you.

@MayorFaj
Copy link
Contributor

MayorFaj commented Apr 11, 2025

@williammartin Here you go gh-github-mcp-server

Image

@williammartin
Copy link
Collaborator

williammartin commented Apr 14, 2025

Thanks @MayorFaj, I think the decision we need to make here is how to ship the extension so that it is installable on various supported platforms. This requires having the executable artifacts attached to a release, which means we either:

  • Pull in built artifacts from this repository
  • Export the application logic in a way that can be called from a main.go in gh-github-mcp-server, and use gh-extension-precompile there
  • Relax some requirements in gh (e.g. gh prefix) so that extensions can be installed directly from this repository

With each of those we then need to make a decision on how best to do releases of the extension.

@MayorFaj
Copy link
Contributor

MayorFaj commented Apr 14, 2025

Thanks @williammartin I believe option 2 would be great, but would need restructuring of the github-mcp-server codebase. Option 1 is more like what we have currently (but needs some refactoring)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants