GitHub MCP Server
MCP (Model Context Protocol) server implementation for GitHub API.
Tools
This server provides the following tools:
-
create_issue
- Create a new issue in a GitHub repository
- Inputs:
repository
(object): Repository information
owner
(string): Repository owner
repo
(string): Repository name
title
(string): Issue title
description
(optional string): Issue body/content
labels
(optional string[]): Labels to apply
assignees
(optional string[]): Users to assign
- Returns: Created issue details
-
create_comment
- Add a comment to an existing issue or pull request
- Inputs:
repository
(object): Repository information
owner
(string): Repository owner
repo
(string): Repository name
issue_number
(number): Issue or PR number
comment
(string): Comment text
- Returns: Created comment details
-
get_issue
- Retrieve information about a specific issue
- Inputs:
repository
(object): Repository information
owner
(string): Repository owner
repo
(string): Repository name
issue_number
(number): Issue number
- Returns: Issue details
-
lock_issue
- Lock an issue to prevent further comments
- Inputs:
repository
(object): Repository information
owner
(string): Repository owner
repo
(string): Repository name
issue_number
(number): Issue number
lock_reason
(optional string): Reason for locking ('off-topic', 'too heated', 'resolved', 'spam')
- Returns: Lock operation result
-
unlock_issue
- Remove the lock from an issue
- Inputs:
repository
(object): Repository information
owner
(string): Repository owner
repo
(string): Repository name
issue_number
(number): Issue number
- Returns: Unlock operation result
-
raw_graphql
- Execute a custom GraphQL query
- Inputs:
query
(string): GraphQL query string
variables
(optional object): Query variables
- Returns: GraphQL query results
Environment Variables
The following environment variables are required:
GITHUB_ACCESS_TOKEN
: Personal access token for GitHub API authentication with required permissions (repo, admin:repo_hook, admin:org)
License
This project is licensed under the MIT License - see the LICENSE file for details.