Skip to main content
Glama

PyGithub MCP Server

by AstroMined

get_file_contents

Retrieve file contents from a GitHub repository by specifying owner, repo, path, and optional branch. Ideal for accessing and managing code or document data directly.

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