Skip to content

Enable setting custom GitHub Host for GitHub MCP#15

Open
dongdong867 wants to merge 2 commits intoLoamStudios:mainfrom
dongdong867:custom-github-host
Open

Enable setting custom GitHub Host for GitHub MCP#15
dongdong867 wants to merge 2 commits intoLoamStudios:mainfrom
dongdong867:custom-github-host

Conversation

@dongdong867
Copy link

This pull request adds support for specifying a custom GitHub host URL, which is useful for users working with GitHub Enterprise Server or custom GitHub deployments.
The changes update configuration options, documentation, and environment variable handling to accommodate the new github_host setting.

Support for custom GitHub host:

  • Added an optional github_host field to the GitHubContextServerSettings struct in src/mcp_server_github.rs to allow specifying a custom GitHub URL.
  • Updated the environment variable setup in the GitHubModelContextExtension implementation to include GITHUB_HOST when github_host is provided and non-empty.

Configuration and documentation updates:

  • Added commented example for github_host in configuration/default_settings.jsonc to guide users on how to specify a custom GitHub host.
  • Updated configuration/installation_instructions.md to document the new github_host option and provide a link to further instructions for GitHub Enterprise Server.

@jeffreyguenther
Copy link
Member

Taking a look now.

@Malix-Labs
Copy link
Contributor

@jeffreyguenther have you finished taking a look?

@jeffreyguenther
Copy link
Member

jeffreyguenther commented Feb 8, 2026

It's fallen off my radar as I mostly use gh with my agents for interacting with GitHub. This project is on my list to return to given the list of issues and PRs.

Feel free to dig in and open PRs that address issues.

@Malix-Labs
Copy link
Contributor

Malix-Labs commented Feb 8, 2026

I also tell my agents to use gh now since #27 makes that MCP unusable, but I reliably felt that it was working better using your extension

Also I think that PR original idea is good, BUT might not work correctly with the (probably most common) use case :

I use the default github host for most of my project, but SOME projects use a different github host

Might have to test it

If it works with that use-case, it looks good

@dongdong867 ^

@jeffreyguenther
Copy link
Member

The true solution to all these issues is to get the Zed team to provide a way to get the full shell env that Zed uses in the context server. Currently, we don't have a way to do this without putting the ENV values in your Zed config. Not an awesome place to put PATs.

That's the root issue. We don't have access to the ENV in the extension. Zed does some fancy stuff to ensure there's a login shell regardless of how its started. It's quite smart. I don't want to be in the business of handing that in this extension.

This extension has one primary purpose: provide a button for someone to click to have Zed take over the installation and updating of the MCP executable and forward your settings to it.

We can extend the settings passthrough from the Zed settings. I'm good with that as a workaround until either we can upstream a change to the context server extension API or they make the needed change. Hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants