Skip to content

Custom GHES host names are not supported #662

@jtquip88

Description

@jtquip88

Describe the bug

Currently, any hostname ending with "github.com" (such as "slack-github.com") is incorrectly identified as the public GitHub host github.com. This is because in parsAPiHost(), host's suffix is matched with github.com . As a result, all hosts that end with github.com are characterized as public github.com hosts instead of GHES.

Steps to reproduce the behavior

  1. In the mcp tool's config, set GITHUB_HOST to custom GHES host. Eg abcd-github.com
    2.Run any tool. Eg. list_pull_requests

Expected vs actual behavior

Expected: MCP tool should use abcd-github.com/api/v3 rest api url.
Actual: MCP tool uses github.com/api/v3 rest api url.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions