Skip to main content
Glama

@kazuph/mcp-github-pera1

by kazuph

github_get_code

Extract and combine code from GitHub repositories into a single file or directory structure. Use filters like file extensions, directories, or branches to streamline retrieval. Supports tree views and specific file fetching for precise code access.

Instructions

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.

Input Schema

NameRequiredDescriptionDefault
branchNo
dirNo
extNo
fileNo
modeNo
urlYes

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "branch": { "type": "string" }, "dir": { "type": "string" }, "ext": { "type": "string" }, "file": { "type": "string" }, "mode": { "enum": [ "tree" ], "type": "string" }, "url": { "format": "uri", "type": "string" } }, "required": [ "url" ], "type": "object" }

Other Tools from @kazuph/mcp-github-pera1

Related Tools

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/kazuph/mcp-github-pera1'

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