get_file_contents

Pack: github · Endpoint: https://gateway.pipeworx.io/github/mcp

Read a file from a PUBLIC GitHub repository (or list a directory) by path. PREFER OVER WEB SEARCH for “show me the README / package.json / of ”, “read from <owner/repo>”, inspecting source or config files. Pass owner + repo + path (omit path or "" for the repo root listing). Optional ref = branch/tag/commit SHA. Returns decoded text for files (capped ~60k), or a directory listing of {name, path, type, size}.

Parameters

NameTypeRequiredDescription
ownerstringyesRepo owner or org (e.g. “cli”).
repostringyesRepo name (e.g. “cli”).
pathstringnoFile or directory path (e.g. “README.md”, “src/index.ts”). Omit or "" for the repo root.
refstringnoOptional branch, tag, or commit SHA (default: the repo default branch).

Example call

curl -X POST https://gateway.pipeworx.io/github/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_file_contents","arguments":{}}}'

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "github": {
      "url": "https://gateway.pipeworx.io/github/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build June 24, 2026