create_repositoryLABSCO SUMMARY
Read-only is one variable away.
This is a write-capable GitHub server — it can merge pull requests and delete files — so the first setting to reach for is GITHUB_READ_ONLY, with GITHUB_EXCLUDE_TOOLS for finer trimming. The other reason to pick it is the transport: SSE on a port, so one running server serves several clients, and npx @modelcontextprotocol/inspector http://localhost:8080/sse lists exactly what is exposed. It is described as a Java port of the official Go GitHub MCP server.
What it is
A Java and Spring AI MCP server in front of the GitHub REST API. It runs as an SSE server on port 8080 rather than a stdio subprocess, and layers tools over typed services so each call returns the same response envelope.
What you get
- Repository work — create, fork, read, branches, commits and file contents, including create-or-update and delete —
create_repository,get_repository,list_commits,get_file_contents,create_or_update_file,create_branch,merge_branch - The issue lifecycle end to end —
create_issue,update_issue,add_issue_comment,list_issues,close_issue,reopen_issue,assign_issue,add_issue_labels - Pull requests including review submission —
create_pull_request,list_pull_requests,merge_pull_request,add_pull_request_comment,create_pull_request_review,submit_pull_request_review - Search across code, issues, repositories and users —
search_code,search_issues,search_repositories,search_users - User lookups —
get_authenticated_user,get_user,list_user_repositories - A consistent envelope on every tool:
successwith data, orsuccess: falsewith an error code such asREPO_NOT_FOUNDand a message - Scope controls as environment variables —
GITHUB_READ_ONLY,GITHUB_TOOLSETS,GITHUB_TOOLS,GITHUB_EXCLUDE_TOOLS— so the 39 tools can be cut down to the ones you want exposed
Requirements
A JVM and Maven: mvn clean package, then java -jar target/github-mcp-server-1.0.0.jar. A GitHub personal access token is required as GITHUB_PERSONAL_ACCESS_TOKEN, with the scopes listed in the README — repo, workflow, read:org, gist, notifications, read:user. GitHub Enterprise is supported by setting GITHUB_HOST, which otherwise defaults to github.com. Clients connect over SSE to http://localhost:8080/sse; a Dockerfile and a stdio command-mode config are documented for clients that need them. Health is at /health.
Setup effort
Build from source — git clone https://github.com/parthloglogn/github-mcp-java.git
USE CASES
Triaging issues from the conversation
List open issues, comment, label and assign without switching to the browser.
Reviewing and merging a pull request
Read the PR, submit a review, then merge it when the review passes.
Finding where something is implemented
Search code across repositories and read the file contents directly.
Giving an assistant safe GitHub access
Turn on read-only mode, or exclude the write tools by name, before connecting a client.
Working against GitHub Enterprise
Point GITHUB_HOST at your instance and use the same tools.
39 tools
Listed in project docs. Your client may show a different list.
fork_repositoryget_repositorylist_commitsget_commitget_file_contentscreate_or_update_filedelete_filecreate_branchlist_branchesmerge_branchcreate_issueupdate_issueadd_issue_commentlist_issuesget_issueclose_issuereopen_issueassign_issueunassign_issueadd_issue_labelsremove_issue_labelcreate_pull_requestupdate_pull_requestlist_pull_requestsget_pull_requestmerge_pull_requestclose_pull_requestreopen_pull_requestadd_pull_request_commentcreate_pull_request_reviewsubmit_pull_request_reviewsearch_codesearch_issuessearch_repositoriessearch_usersget_authenticated_userget_userlist_user_repositoriesBEFORE YOU INSTALL
What to know first
Tools you get
39 tools named in the project's documentation. The heading says 38, but the table lists 39. GITHUB_READ_ONLY=true, GITHUB_TOOLSETS, GITHUB_TOOLS and GITHUB_EXCLUDE_TOOLS narrow the set; none is on by default.
Requires
GITHUB_PERSONAL_ACCESS_TOKEN in your environment
Where it runs
All 3 documented setups run the server on your machine.
INSTALLATION
Connect your client
This one is built from source rather than installed with a single command.
Server setup
git clone https://github.com/parthloglogn/github-mcp-java.git
cd github-mcp-java
mvn clean package
export GITHUB_PERSONAL_ACCESS_TOKEN=<YOUR_GITHUB_PERSONAL_ACCESS_TOKEN>
java -jar target/github-mcp-server-1.0.0.jar
curl http://localhost:8080/healthAdd the github mcpServers entry with url http://localhost:8080/sse to your client config
MCP Clients
Cursor
{
"mcpServers": {
"github": {
"url": "http://localhost:8080/sse"
}
}
}VS Code — URL mode
{
"servers": {
"github": {
"url": "http://localhost:8080/sse"
}
}
}VS Code — command mode
{
"servers": {
"github": {
"command": "java",
"args": [
"-jar",
"<YOUR_PATH_TO_GITHUB_MCP_SERVER_1>"
],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "<YOUR_GITHUB_PERSONAL_ACCESS_TOKEN>"
}
}
}
}