Github Connector

Feature Request: GitHub Connector - read_file Support

Problem

The GitHub Connector can currently only read commits (list_commits, get_commit), but cannot directly access current files in the repository.

This makes code reviews extremely cumbersome:

  • You have to search through commit history
  • Cannot read the current state of a file directly
  • Workspace integration had read_file for local files – this is now missing

Use Case

As a developer, I want to:

  • Read current files in the repo (e.g., src/lib/components/DialogMessage.svelte)
  • Do code reviews without searching commit history
  • Inspect live code like with the old Workspace file system

Solution

Add read_file tool for GitHub Connector:

{
  "tool": "read_file",
  "arguments": {
    "owner": "MY_NAME",
    "repo": "MY_REPO",
    "path": "PATH-TO-REPO"
  }
}

Priority

HEssential for code-based assistance.

Context

This feature existed in the Workspace (formerly “Space”) file system and was crucial for code reviews. The GitHub Connector is a cost-saving replacement for Workspace, but lacks this critical functionality.

Hi Gregor,

Thanks for the detailed request. The tool you want I believe already exists, and there are two ways to read the current state of a file.

1. Connector only. The GitHub connector exposes additional tools. One of them is get_file_contents. It takes owner, repo, and path (plus an optional ref) and returns the current file, or a directory listing if path points to a folder.

You can see the full tool set by making a request with only the connector and reading the mcp_list_tools item in the output.

2. Connector plus sandbox. If you add the sandbox tool using {"type": "sandbox"} to the same request and leave allowed_tools off, then the agent gets git and gh inside a Linux container, already authenticated with the connector’s credentials. It can clone the repo and read src/lib/components/DialogMessage.svelte directly, diff branches, run gh api repos/{owner}/{repo}/contents/{path}, and open a pull request. You will see sandbox_results items in the output instead of mcp_call items. Access is scoped to whatever the connected GitHub account can reach.

Docs: Connectors and Sandbox.

Andrew