Skip to content

Cannot fetch file content using get_file_contents tool with GitHub MCP integrated into Chainlit #782

@Akshata990418

Description

@Akshata990418

I'm using the GitHub MCP integration inside a Chainlit application. However, I'm consistently unable to fetch the contents of any file from any public or private repository.

Affected version

URL : https://api.githubcopilot.com/mcp/

Steps to reproduce the behavior

input : read one of the jenkinsfiles from the github repo github.com/jenkinsci/docker-agent analyse it's stages and give me file content

output: The user wants to read a Jenkinsfile from a GitHub repository, analyze its stages, and get information about them. I don't have direct access to external websites to fetch files, but I can guide on what to do to get this information.

Expected vs actual behavior

I expect to receive the full content of the requested file (e.g., README.md or jenkinsfiles) as a TextResourceContents or similar response.

The file and repo exist (manually verified on GitHub).
owner, repo, path, and ref are correctly passed.
MCP server able to fetch the repo issues and pull request from the repo but not able to fetch file content

Metadata

Metadata

Assignees

No one assigned

    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