github.com
github.com logo

GitHub

Integrates with GitHub's API to enable repository management, issue tracking, pull request handling, and code manipulati...

Created byApr 22, 2025

GitHub MCP Server

This project implements a Model Context Protocol (MCP) server for GitHub API access. It provides a set of tools that allow LLM agents to interact with GitHub repositories, issues, pull requests, and other GitHub resources.

Features

The server provides the following GitHub operations:
  • Repository Management
  • Issue Management
  • Pull Request Management
  • Branch Management
  • Commit Management
  • Content Management
These operations are exposed as tools for Large Language Models using the Model Context Protocol (MCP), allowing AI systems to safely interact with GitHub through its API.

Claude Desktop

DevoxxGenie IDEA plugin

Getting Started

Prerequisites

  • Java 17 or higher
  • Maven 3.6+
  • Spring Boot 3.3.6
  • Spring AI MCP Server components
  • A GitHub account and personal access token

Building the Project

Build the project using Maven:

Running the Server

Run the server using the following command:
The server can use STDIO for communication with MCP clients or can be run as a web server.

Environment Variables

The GitHub MCP server supports the following environment variables for authentication:
  • GITHUB_TOKEN or GITHUB_PERSONAL_ACCESS_TOKEN: Your GitHub personal access token
  • GITHUB_HOST: The base URL of your GitHub instance (e.g., github.com or github.mycompany.com for GitHub Enterprise)
  • GITHUB_REPOSITORY: Default repository to use if not specified in API calls (e.g., owner/repo)
You can set these environment variables when launching the MCP server, and the GitHub services will use them as default values. This allows you to avoid having to provide authentication details with every API call.

Usage with MCP Clients

Using with Claude Desktop

Edit your claude_desktop_config.json file with the following:

Using with DevoxxGenie or similar MCP clients

  1. In your MCP client, access the MCP Server configuration screen
  1. Configure the server with the following settings:

Security Considerations

When using this server, be aware that:
  • You need to provide a GitHub personal access token for authentication
  • The LLM agent will have access to create, read, and modify GitHub resources
  • Consider running the server with appropriate permissions and in a controlled environment
  • Ensure your token has only the minimum required permissions for your use case

Example Usage

With Environment Variables

If you've configured the MCP server with environment variables, you can simply ask:
Claude will use the GitHub services with the pre-configured authentication details to fetch the open issues from your GitHub repository and summarize them.

With Explicit Repository

You can override the default repository by specifying it in your request:
The GitHub service will use your authentication token but query the specified repository instead of the default one.

Available Services

The GitHub MCP server is organized into several service classes, each providing different functionality:
  1. RepositoryService
  1. IssueService
  1. PullRequestService
  1. BranchService
  1. CommitService
  1. ContentService
Each service provides methods that can be called by LLM agents through the MCP protocol, allowing them to interact with GitHub in a structured and controlled manner.

Enterprise GitHub Support

This MCP server supports both GitHub.com and GitHub Enterprise instances. To use with GitHub Enterprise, set the GITHUB_HOST environment variable to your enterprise GitHub URL.

Limitations

  • The server requires a valid GitHub personal access token with appropriate permissions
  • Rate limiting is subject to GitHub API limits
  • Some operations may require specific permissions on the token
  • Large repositories or files may encounter performance limitations

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

GitHub MCP Server

This project implements a Model Context Protocol (MCP) server for GitHub API access. It provides a set of tools that allow LLM agents to interact with GitHub repositories, issues, pull requests, and other GitHub resources.

Features

The server provides the following GitHub operations:
  • Repository Management
  • Issue Management
  • Pull Request Management
  • Branch Management
  • Commit Management
  • Content Management
These operations are exposed as tools for Large Language Models using the Model Context Protocol (MCP), allowing AI systems to safely interact with GitHub through its API.

Claude Desktop

DevoxxGenie IDEA plugin

Getting Started

Prerequisites

  • Java 17 or higher
  • Maven 3.6+
  • Spring Boot 3.3.6
  • Spring AI MCP Server components
  • A GitHub account and personal access token

Building the Project

Build the project using Maven:

Running the Server

Run the server using the following command:
The server can use STDIO for communication with MCP clients or can be run as a web server.

Environment Variables

The GitHub MCP server supports the following environment variables for authentication:
  • GITHUB_TOKEN or GITHUB_PERSONAL_ACCESS_TOKEN: Your GitHub personal access token
  • GITHUB_HOST: The base URL of your GitHub instance (e.g., github.com or github.mycompany.com for GitHub Enterprise)
  • GITHUB_REPOSITORY: Default repository to use if not specified in API calls (e.g., owner/repo)
You can set these environment variables when launching the MCP server, and the GitHub services will use them as default values. This allows you to avoid having to provide authentication details with every API call.

Usage with MCP Clients

Using with Claude Desktop

Edit your claude_desktop_config.json file with the following:

Using with DevoxxGenie or similar MCP clients

  1. In your MCP client, access the MCP Server configuration screen
  1. Configure the server with the following settings:

Security Considerations

When using this server, be aware that:
  • You need to provide a GitHub personal access token for authentication
  • The LLM agent will have access to create, read, and modify GitHub resources
  • Consider running the server with appropriate permissions and in a controlled environment
  • Ensure your token has only the minimum required permissions for your use case

Example Usage

With Environment Variables

If you've configured the MCP server with environment variables, you can simply ask:
Claude will use the GitHub services with the pre-configured authentication details to fetch the open issues from your GitHub repository and summarize them.

With Explicit Repository

You can override the default repository by specifying it in your request:
The GitHub service will use your authentication token but query the specified repository instead of the default one.

Available Services

The GitHub MCP server is organized into several service classes, each providing different functionality:
  1. RepositoryService
  1. IssueService
  1. PullRequestService
  1. BranchService
  1. CommitService
  1. ContentService
Each service provides methods that can be called by LLM agents through the MCP protocol, allowing them to interact with GitHub in a structured and controlled manner.

Enterprise GitHub Support

This MCP server supports both GitHub.com and GitHub Enterprise instances. To use with GitHub Enterprise, set the GITHUB_HOST environment variable to your enterprise GitHub URL.

Limitations

  • The server requires a valid GitHub personal access token with appropriate permissions
  • Rate limiting is subject to GitHub API limits
  • Some operations may require specific permissions on the token
  • Large repositories or files may encounter performance limitations

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.