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
| Name | Type | Description |
|---|---|---|
repo required | string | "owner/name" or a github.com URL. |
path required | string | Path within the repo, e.g. "src/index.ts". |
ref | string | Branch, tag or commit. Default HEAD. |
start | integer | Character 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:
{
"name": "knowledge__github_file",
"arguments": {
"repo": "…",
"path": "…"
}
}Or connect the Public Knowledge server directly, which lists 47 tools including this one:
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 ….