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

404 error with IP-restricted Organization.

Open hrsuzuki opened this issue 8 months ago • 6 comments

Describe the bug

The following error occurs when used with an IP-restricted Organization.

The following is the output from the chat when the ISSUE is created from the CopilotAgent.

I attempted to create an issue, but encountered a "404 Not Found" error. This typically occurs if the repository name or owner name is incorrect, or if you lack sufficient access permissions. Please verify the existence of the repository and your access permissions, then try again. Let me know if you need further assistance.

Affected version

Steps to reproduce the behavior

  1. Create a GitHub Personal Access Token (PAT)
    1.1. Open your GitHub Settings › Developer settings › Personal access tokens page.
    1.2. Click Generate new token and choose either Fine‑grained or Classic.
    1.3. Grant the scopes required for the MCP server to access the GitHub API (see GitHub docs for details).
    1.4. Copy the generated PAT; you will need it in Step 3.

  2. Install the MCP Server (One‑Click Install — Recommended)
    2.1. In the repository README, click the Install with Docker in VS Code button.
    2.2. Follow the on‑screen prompts to start the automated setup inside VS Code.

  3. Configure Your PAT
    3.1. During installation—or right after it finishes—paste the PAT from Step 1 when prompted.
    3.2. Save the settings to ensure the server can authenticate with GitHub.

  4. Prepare VS Code
    4.1. Reload VS Code so the new configuration is applied.
    - Windows / Linux: Press Ctrl + Shift + P, type Reload Window, and press Enter.
    - macOS: Press Cmd + Shift + P, type Reload Window, and press Return.

  5. Run in Copilot Agent Mode
    5.1. Start VS Code in Copilot Agent mode (insert any project‑specific commands or extensions here if applicable).
    5.2. Verify that the MCP server integrates correctly with the Copilot Agent environment. 5.3. In the currently active repository, instruct the Copilot Agent to create a new GitHub Issue

Expected vs actual behavior

Organization without IP restrictions worked normally.

Logs

hrsuzuki avatar Apr 18 '25 05:04 hrsuzuki

Hi, I am very curious if this issue is to do with the IP address reported somehow differently from inside Docker. Perhaps you could add the flag -network=host to the docker run command, to see if that resolves your issue?

SamMorrowDrums avatar Apr 23 '25 13:04 SamMorrowDrums

@SamMorrowDrums

Sorry for the late reply. RemoteMCP server was used instead of setting up Docker.

In this case, the GitHub repository server may not be able to communicate from the Remote MCP Server due to IP restrictions.

Therefore, it may not be a problem with the tool. Should I contact GitHub Inc. side/support etc. for this?

  • https://github.com/github/github-mcp-server/issues/748

taku333 avatar Jul 28 '25 06:07 taku333

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 Oct 30 '25 08:10 github-actions[bot]

I recently got it working without any issues.I recently got it working without any issues.

taku333 avatar Oct 30 '25 10:10 taku333

Please close.

taku333 avatar Oct 30 '25 10:10 taku333

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 Dec 01 '25 08:12 github-actions[bot]