Home / Servers / Public Knowledge / github_file

Github file

An MCP tool from the Public Knowledge server, hosted on mcp.hjlabs.in.

Read one file from a public GitHub repository by path (raw contents, up to 60 KB, text only), e.g. package.json, a source file or a docs page. Pass `start` to read further into a large file.

Name on the gateway: knowledge__github_file · read-only.

Parameters

NameTypeDescription
repo requiredstring"owner/name" or a github.com URL.
path requiredstringPath within the repo, e.g. "src/index.ts".
refstringBranch, tag or commit. Default HEAD.
startintegerCharacter offset to start from (for long files). Default 0.

How to call it

Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:

call_tool arguments
{
  "name": "knowledge__github_file",
  "arguments": {
    "repo": "…",
    "path": "…"
  }
}

Or connect the Public Knowledge server directly, which lists 47 tools including this one:

Run in your terminal
claude mcp add --transport http hj-knowledge https://mcp.hjlabs.in/mcp/knowledge \
  --header "Authorization: Bearer YOUR_API_KEY"

Try asking

Use the github file tool with repo set to ….

More from Public Knowledge