📘 Introduction

GitHub is where many development teams store code, issues, pull requests, and release workflows. Claude Desktop becomes much more useful when it can safely connect to that context.

In this tutorial, you will learn how to connect Claude Desktop to GitHub with MCP. MCP, short for Model Context Protocol, lets Claude Desktop connect to external tools and services in a structured way.

We will use GitHub's official MCP server, configure it for Claude Desktop, and test the connection with a real GitHub repository.

💡 What are we implementing?

We will set up this workflow:

Claude Desktop -> GitHub MCP Server -> GitHub repositories, issues, and pull requests

The GitHub MCP server gives Claude access to GitHub tools such as repository search, file inspection, issues, pull requests, and workflow information, depending on your token permissions.

For Claude Desktop, GitHub currently documents a local Docker-based setup. That means Claude Desktop starts a local MCP server process, and the server connects to GitHub using your GitHub Personal Access Token.

✅ Prerequisites

Before we start, you should have:

☑️ Claude Desktop installed
☑️ Docker Desktop installed and running
☑️ A GitHub account
☑️ A GitHub Personal Access Token
☑️ Permission to edit Claude Desktop settings

🔐1️⃣ Create a GitHub Personal Access Token

Claude Desktop needs a GitHub token so the MCP server can authenticate with GitHub. Never paste a real token into a blog post, screenshot, public repository, or shared document.

In GitHub, create a Personal Access Token with the smallest permissions you need. For a beginner setup, start with read-only access to a test repository if possible.

If you use a classic token and want access to private repositories, GitHub's MCP documentation mentions the repo scope for repository access. If you use a fine-grained token, limit it to the repositories and permissions you actually need.

Copy the token once and store it securely. We will use the placeholder YOUR_GITHUB_PAT in the examples below.

🐳2️⃣ Install Docker Desktop

GitHub's Claude Desktop setup uses the official Docker image for the GitHub MCP server.

Install Docker Desktop from the official Docker website and make sure it is running before you continue.

You can check Docker from your terminal:

docker --version

You can also pull the GitHub MCP server image manually:

docker pull ghcr.io/github/github-mcp-server

If this command works, your computer can download the official GitHub MCP server image.

In the Academy section, we continue with the Claude Desktop configuration, restart the app, test the GitHub tools, and review the most important security practices.

You can view this post with the tier: Academy Membership

Join academy now to read the post and get access to the full library of premium posts for academy members only.

Join Academy Already have an account? Sign In