-
Notifications
You must be signed in to change notification settings - Fork 562
Support the ability to have multiple instances running at the same time #206
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
Comments
The github MCP server already has the code to support multiple instances as shown in codebase:
// Create GH client
token := os.Getenv("GITHUB_PERSONAL_ACCESS_TOKEN")
if token == "" {
cfg.logger.Fatal("GITHUB_PERSONAL_ACCESS_TOKEN not set")
}
ghClient := gogithub.NewClient(nil).WithAuthToken(token)
ghClient.UserAgent = fmt.Sprintf("github-mcp-server/%s", version)
// Check GH_HOST env var first, then fall back to viper config
host := os.Getenv("GH_HOST")
if host == "" {
host = viper.GetString("gh-host")
}
if host != "" {
var err error
ghClient, err = ghClient.WithEnterpriseURLs(host, host)
if err != nil {
return fmt.Errorf("failed to create GitHub client with host: %w", err)
}
}
func NewServer(client *github.Client, version string, readOnly bool, t translations.TranslationHelperFunc) *server.MCPServer {
s := server.NewMCPServer(
"github-mcp-server",
version,
server.WithResourceCapabilities(true, true),
server.WithLogging()) As previously shown, the server already supports:
The issue appears to be more related to vscode agent implementation rather than a limitation in the GitHub MCP server itself. |
I would love to hear back if overriding tool descriptions works. Definitely also share this use case with vscode. |
Feature I am tracking for client-side controls/customizations; as I heard the same use case before: microsoft/vscode#243940 |
Hi.
My organization is currently slowing migrating from a hosted Github Enterprise Server instance to Github Enterprise Cloud. When I try to use VS Code's Agent support, I can configure two distinct tools with different names and different configurations. Something like this:
The problem is that the Agent is confused and seems to pin itself to only the set of tools exposed by one of the servers, hence I cannot navigate between the repos hosted on both Github instances. I can't seem to "prompt" engineer my way out of this.
The Github MCP server docs show how to overwrite individual tool descriptions. I haven't tried, but I guess I could override the tool descriptions for both servers, explicitly call out one set is for GHEC, one for GHES, and see if I can then adjust the prompt to force it to use one set of tools, so one server, or the other. But I'm hoping there's a better way to do this.
This may be more of a VS Code issue, but maybe there's something in how the server is actually implemented that could help facilitate this use case.
Thank you!
The text was updated successfully, but these errors were encountered: