GitHub MCP Server

get_file_contents

Get the contents of a file or directory from a GitHub repository

Input Schema

NameRequiredDescriptionDefault
branchNoBranch to get contents from
ownerYesRepository owner (username or organization)
pathYesPath to the file or directory
repoYesRepository name

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "branch": { "description": "Branch to get contents from", "type": "string" }, "owner": { "description": "Repository owner (username or organization)", "type": "string" }, "path": { "description": "Path to the file or directory", "type": "string" }, "repo": { "description": "Repository name", "type": "string" } }, "required": [ "owner", "repo", "path" ], "type": "object" }