Skip to content

Unable to access file via get_file_contents in private repository (404 error) – organization with IP allow list #1285

Closed

Description

@piotr-m-bielski

Describe the bug

We are experiencing an issue when trying to access a file in our private repository in our organization using the get_file_contents tool.

The file exists in the repository and is accessible via the GitHub web interface, but the API returns a 404 error when using get_file_contents.

Our organization has an IP allow list configured. Please advise if this restriction could be causing the issue, and how we can resolve it or work around it.

Image

Additional information:
When running the MCP server locally in Docker, this problem does not occur and the file is accessible via the tool.

Steps to reproduce the behavior

Steps to reproduce:

Try to access the file via the get_file_contents (as above).
Observe the 404 response on every repository in our organization. Traversing directory works

Activity

  1. rubensilvapipedrive commented on Nov 6, 2025

    @rubensilvapipedrive

    Same bug
    #864
    I guess it didn't truely get fixed. only happens for enterprise.

  2. self-assigned this
    on Nov 10, 2025
  3. tonytrg commented on Nov 10, 2025

    @tonytrg
    Contributor

    @piotr-m-bielski
    Hello 👋

    If you are experiencing this issue only for that specific tool, then it should not be an ip allow list problem.
    What kind of authorization are you using? A personal access token or a github app?

  4. piotr-m-bielski commented on Nov 10, 2025

    @piotr-m-bielski
    Author

    @tonytrg I use github app. Only get_file_contents tool :/ Searching narrowed to our organization, creating issues, details about action runs, and PR details all work fine.

  5. tonytrg commented on Nov 14, 2025

    @tonytrg
    Contributor

    @piotr-m-bielski
    Ok to confirm, same input params for the tool, same token. This only happens for the remote version of mcp.
    The same call succeeds on the local version?

  6. piotr-m-bielski commented on Nov 14, 2025

    @piotr-m-bielski
    Author

    I switched to token authorization for the remote version and then checked it. (The token was authorized for the organization.) There is still the same error for get_file_contents. (Searches and other tools work.)

    Summary: The get_file_contents function is not working for remote access, but it is working locally.

  7. tonytrg commented on Nov 19, 2025

    @tonytrg
    Contributor

    @piotr-m-bielski the 404s should hopefully be fixed now. Please reopen with a bug description, if the problem keeps happening for you.

    Thanks for reporting it.

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions