Skip to main content
Glama

PyGithub MCP Server

by AstroMined

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

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AstroMined/pygithub-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server