github-mcp-server

iamtheShadow712/github-mcp-server

3.1

If you are the rightful owner of github-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

This is a Model Context Protocol (MCP) server built with Node.js to interact with GitHub.

Tools
1
Resources
0
Prompts
0

GitHub MCP Server

A Model Context Protocol (MCP) server built with Node.js that provides tools for interacting with GitHub.

Description

This server implements the MCP protocol to offer GitHub-related functionality. It currently provides a tool to retrieve a list of repositories for a given GitHub user.

Features

  • get_user_repos: Fetch all public repositories for a specified GitHub username

Installation

  1. Clone this repository
  2. Install dependencies:
    npm install
    

Usage

  1. Set up your environment variables (see below)
  2. Run the server:
    node server.js
    

The server communicates via stdio and is designed to be used with MCP-compatible clients.

Environment Variables

Create a .env file in the root directory with the following variables:

  • GITHUB_PERSONAL_ACCESS_TOKEN: Your GitHub Personal Access Token (required for API access)
  • GITHUB_API_BASE_URL: GitHub API base URL (defaults to https://api.github.com)

Tools

get_user_repos

Retrieves a list of public repositories for a given GitHub user.

Input:

  • owner (string, required): GitHub username

Output:

  • A comma-separated list of repository names

Example:

Input

{
  "owner": "octocat"
}

Output

"repo1, repo2, repo3"

Dependencies

  • @modelcontextprotocol/sdk: ^1.18.0
  • dotenv: ^17.2.2
  • node-fetch: ^3.3.2