GitHub Repo Extractor

GitHub Repo Extractor

kazuph

Extracts code from GitHub repositories and makes it available for analysis through natural language queries in Claude.

6711 views9Local (stdio)

What it does

  • Retrieve entire repository codebases as single files
  • Filter code by specific directories or file extensions
  • Extract individual files from repositories
  • Show repository structure and README files
  • Access specific branches beyond main/master

Best for

Developers analyzing unfamiliar codebasesCode reviews and architectural analysisLearning from open source projects
No GitHub API key requiredWorks with any public repositoryFlexible filtering options

Tools (1)

github_get_code

Retrieves code from a GitHub repository URL and combines it into a single file. The URL must start with "https://". Query Parameters: - dir: Filter files by directory paths (comma-separated) Example: ?dir=src/components,tests/unit - ext: Filter files by extensions (comma-separated) Example: ?ext=ts,tsx,js - mode: Display mode Example: ?mode=tree (Shows directory structure and README files only) - branch: Specify the branch to fetch from (optional) Example: ?branch=feature/new-feature - file: Specify a single file to retrieve (optional) Example: ?file=src/components/Button.tsx Examples: 1. For GitHub tree URLs with branch: https://github.com/kazuph/pera1/tree/feature/great-branch This URL will be automatically parsed to extract the branch information. 2. For specific directory in a branch: url: https://github.com/modelcontextprotocol/servers dir: src/fetch branch: develop 3. For a single file: url: https://github.com/username/repository file: src/components/Button.tsx 4. For directory structure with README files only: url: https://github.com/username/repository mode: tree The tool will correctly parse the repository structure and fetch the files from the specified branch.

Alternatives