GitHub MCP Server and Claude Desktop
Let’s see how to use GitHub MCP Server using Claude Desktop in the following steps:
Prerequisite
- Docker Desktop
- MCP Toolkit Enabled
- GitHub Account
- Claude Desktop installed on your system
Step 1: Create a GitHub Personal Access Token (PAT)
- Go to GitHub.com and sign in to your account
- Click your profile picture in the top-right corner
- Select "Settings"
- Scroll down to "Developer settings" in the left sidebar
- Click on "Personal access tokens" → "Tokens (classic)"
- Click "Generate new token" → "Generate new token (classic)"
- Give your token a descriptive name like "Docker MCP GitHub Access"
- Select the following scopes (permissions):
- repo (Full control of private repositories)
- workflow (if you need workflow actions)
- read:org (if you need organization access)
- Click "Generate token"
Step 2: Configure the GitHub MCP Server in Docker
- Open Docker Desktop
- Navigate to the MCP Server
- Find the GitHub (official) card and click on it to expand details.
Alternatively, you can even set it up using docker mcp
CLI as shown below:
In your terminal, set up the GitHub token as a secret:
docker mcp secret set GITHUB.PERSONAL_ACCESS_TOKEN=github_pat_YOUR_TOKEN_HERE
For example:
docker mcp secret set GITHUB.PERSONAL_ACCESS_TOKEN=github_pat_XXXXMRCAXXXXXXxEp_QRZW43Wo1k6KYWwDXXXXXXXXGPXLZ7EGEnse82YM
Info: No policy specified, using default policy
Step 3. Configure Claude Desktop
Open MCP Client > Click "Connect"
Step 4. Restart the Claude Desktop
{
"mcpServers":{
"MCP_DOCKER":
{
"command":
"docker",
"args":["mcp","gateway","run"]
}
}
}