GitHub MCP Server

get_file_contents

Retrieve file or directory contents from a GitHub repository by specifying the owner, repository name, and path. Use this tool to access specific resources within a repository for integration, analysis, or other workflows.

Instructions

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" }

You must be authenticated.

Other Tools from GitHub MCP Server

Related Tools

ID: 782x50kvuh