iamtheShadow712/github-mcp-server
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.
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
- Clone this repository
- Install dependencies:
npm install
Usage
- Set up your environment variables (see below)
- 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 tohttps://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.0dotenv: ^17.2.2node-fetch: ^3.3.2