Labsco
MCP SERVER

Github MCP Server Java

by parthloglogn

The GitHub API as 38 MCP tools over HTTP/SSE — repositories, issues, pull requests, search and users, from a Spring AI server.

Git Hosting & Code Review
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: `success` with data, or `success: false` with an error code such as `REPO_NOT_FOUND` and a message
  • Scope controls as environment variables — `GITHUB_READ_ONLY`, `GITHUB_TOOLSETS`, `GITHUB_TOOLS`, `GITHUB_EXCLUDE_TOOLS` — so the 38 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`.