PyGithub MCP Server

get_file_contents

Retrieve the contents of a specific file or directory from a GitHub repository by specifying the owner, repository, path, and optional branch. Returns file data in MCP response format.

Instructions

Get contents of a file in a GitHub repository.

Args: params: Dictionary with file parameters - owner: Repository owner (username or organization) - repo: Repository name - path: Path to file/directory - branch: Branch to get contents from (optional) Returns: MCP response with file content data

Input Schema

NameRequiredDescriptionDefault
paramsYes

Input Schema (JSON Schema)

{ "properties": { "params": { "title": "Params", "type": "object" } }, "required": [ "params" ], "title": "get_file_contentsArguments", "type": "object" }
ID: orj9keaji9