Track MCP LogoTrack MCP
Track MCP LogoTrack MCP

The world's largest repository of Model Context Protocol servers. Discover, explore, and submit MCP tools.

Product

  • Categories
  • Top MCP
  • New & Updated
  • Submit MCP

Company

  • About

Legal

  • Privacy Policy
  • Terms of Service
  • Cookie Policy

© 2026 TrackMCP. All rights reserved.

Built with ❤️ by Krishna Goyal

    Mcp Server Github Repo

    MCP server for interacting with a github repo

    5 stars
    JavaScript
    Updated May 27, 2025

    Table of Contents

    • Demo
    • Features
    • Resources
    • Resource URIs
    • Configuration
    • Development
    • Installation
    • Config Location
    • API Implementation
    • Authentication
    • Error Handling
    • Debugging
    • Security Notes
    • License

    Table of Contents

    • Demo
    • Features
    • Resources
    • Resource URIs
    • Configuration
    • Development
    • Installation
    • Config Location
    • API Implementation
    • Authentication
    • Error Handling
    • Debugging
    • Security Notes
    • License

    Documentation

    MCP GitHub Repository Server

    An MCP (Model Context Protocol) server that provides access to GitHub repository contents. This server allows AI assistants to browse and read files from specified GitHub repositories.

    Demo

    demo

    Features

    Resources

    • Access any file in a GitHub repository via URI
    • List repository contents and navigate directories
    • Support for branch-specific file access
    • File contents are served as plain text

    Resource URIs

    • Base URL format: https://api.github.com/repos/{owner}/{repo}/contents/{path}
    • Supports both files and directories
    • Files are served with text/plain MIME type
    • Directories are served with application/x-directory MIME type

    Configuration

    The server requires the following environment variables:

    bash
    GITHUB_PERSONAL_ACCESS_TOKEN=your_github_token
    GITHUB_OWNER=repository_owner
    GITHUB_REPO=repository_name
    GITHUB_BRANCH=branch_name  # Optional

    Development

    Install dependencies:

    bash
    npm install

    Build the server:

    bash
    npm run build

    For development with auto-rebuild:

    bash
    npm run watch

    Installation

    To use with Claude Desktop, add the server configuration:

    Config Location

    • MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%/Claude/claude_desktop_config.json
    json
    {
      "mcpServers": {
        "mcp-server-github-repo": {
          "command": "/path/to/mcp-server-github-repo/build/index.js"
        }
      }
    }

    API Implementation

    The server implements three main MCP endpoints:

    1. ListResources - Lists files and directories in the repository

    2. ReadResource - Retrieves contents of a specific file

    Authentication

    The server uses GitHub Personal Access Token for authentication. Make sure your token has appropriate permissions to access the repository contents.

    Error Handling

    The server includes error handling for:

    • Missing environment variables
    • GitHub API errors
    • Invalid paths (e.g., trying to read a directory as a file)
    • Authentication failures

    Debugging

    Since MCP servers communicate over stdio, debugging can be challenging. Use the MCP Inspector for debugging:

    bash
    npm run inspector

    This will provide a URL to access debugging tools in your browser.

    Security Notes

    • Keep your GitHub Personal Access Token secure
    • Consider using tokens with minimal required permissions
    • Be aware of repository size limitations when accessing large repositories

    License

    MIT

    Similar MCP

    Based on tags & features

    • WA

      Waha Mcp

      JavaScript00
    • WI

      Wizzy Mcp Tmdb

      JavaScript00
    • RI

      Rijksmuseum Mcp

      JavaScript·
      59
    • MC

      Mcp Server Playwright

      JavaScript·
      262

    Trending MCP

    Most active this week

    • PL

      Playwright Mcp

      TypeScript·
      22.1k
    • SE

      Serena

      Python·
      14.5k
    • MC

      Mcp Playwright

      TypeScript·
      4.9k
    • MC

      Mcp Server Cloudflare

      TypeScript·
      3.0k
    View All MCP Servers

    Similar MCP

    Based on tags & features

    • WA

      Waha Mcp

      JavaScript00
    • WI

      Wizzy Mcp Tmdb

      JavaScript00
    • RI

      Rijksmuseum Mcp

      JavaScript·
      59
    • MC

      Mcp Server Playwright

      JavaScript·
      262

    Trending MCP

    Most active this week

    • PL

      Playwright Mcp

      TypeScript·
      22.1k
    • SE

      Serena

      Python·
      14.5k
    • MC

      Mcp Playwright

      TypeScript·
      4.9k
    • MC

      Mcp Server Cloudflare

      TypeScript·
      3.0k