A favicon of GitHub Repository Scanner

GitHub Repository Scanner

A service that scans GitHub repositories and provides structured access to their file trees and contents. Users provide their own GitHub tokens for secure access to public and private repositories.

Installation

Installing for Claude Desktop

Manual Configuration Required

This MCP server requires manual configuration. Run the command below to open your configuration file:

npx mcpbar@latest edit -c claude

This will open your configuration file where you can add the GitHub Repository Scanner MCP server manually.

GitHub Repository Scanner MCP

A Cloudflare Worker that scans GitHub repositories and provides a structured view of the repository files, directories, and contents. Perfect for integrating with Smithery and other MCP tools.

Features

  • 📁 Scans any public or private GitHub repository (with appropriate token)
  • 🧠 Creates a structured tree view of repository files and directories
  • 📝 Shows file contents for easy viewing
  • 🚀 Caches repository data for 24 hours to improve performance
  • 🔄 Provides both HTML and JSON output formats
  • 🔒 Secure - users provide their own GitHub tokens

API Usage

Web Interface

Visit the deployed worker URL in your browser to access the web interface.

Programmatic Access

Make a GET request to the /scan endpoint with the following parameters:

/scan?url=REPO_URL&token=YOUR_GITHUB_TOKEN&format=json

Parameters:

  • url: GitHub repository URL (e.g., https://github.com/username/repo)
  • token: Your GitHub personal access token with repo or public_repo scope
  • format: (optional) Response format, use json for machine-readable output

Example:

/scan?url=https://github.com/username/repo&token=ghp_xxxx&format=json

Response Format

The JSON response includes:

{
  "success": true,
  "data": {
    "name": "repository-name",
    "owner": "owner-name",
    "projectStructure": {
      "files": ["root-level-file1", "root-level-file2"],
      "directories": {
        "dir1": {
          "files": ["file-in-dir1"],
          "directories": {}
        }
      }
    },
    "fileContents": {
      "file-path": "file content",
      "dir1/file-in-dir1": "content of file in dir1"
    },
    "timestamp": 1679000000000
  },
  "cached": false,
  "timestamp": 1679000000000
}

Deployment

Cloudflare Workers

  1. Clone this repository
  2. Install dependencies with npm install
  3. Deploy with npm run deploy

Docker

A Dockerfile is included for deployment on platforms that support Docker containers:

docker build -t github-repo-scanner .
docker run -p 8787:8787 github-repo-scanner

Smithery Integration

This worker is designed to be easily integrated with Smithery. When deploying on Smithery:

  1. Fork or clone this repository
  2. Deploy using the Smithery platform
  3. Users will need to provide their own GitHub tokens when using the tool

GitHub Token

A GitHub Personal Access Token with the following scopes is required:

  • repo scope for private repositories
  • public_repo scope for public repositories

Create a token at: https://github.com/settings/tokens

License

MIT

Share:
Details:
  • Stars


    0
  • Forks


    0
  • Last commit


    3 months ago
  • Repository age


    3 months
View Repository

Auto-fetched from GitHub .

MCP servers similar to GitHub Repository Scanner:

 

 
 
  • Stars


  • Forks


  • Last commit


 

 
 
  • Stars


  • Forks


  • Last commit


 

 
 
  • Stars


  • Forks


  • Last commit