Skip to content

Instantly share code, notes, and snippets.

@sagara-gunathunga
Created May 6, 2025 07:56
Show Gist options
  • Save sagara-gunathunga/4b87a5ff02f98e8982766757d4fd1cc3 to your computer and use it in GitHub Desktop.
Save sagara-gunathunga/4b87a5ff02f98e8982766757d4fd1cc3 to your computer and use it in GitHub Desktop.
Connecting GitHub MCP Server with MCP Inspector
- Last updated: 6th May 2025
Prerequests:
---------------
1. GitHub PAT token
2. Docker runtime
Steps:
-----------------
1.) Create a file called config.json and save it somewhere with the following content.
{
"mcpServers": {
"github": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"GITHUB_PERSONAL_ACCESS_TOKEN",
"ghcr.io/github/github-mcp-server"
],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "GitHub PAT Token"
}
}
}
}
2.) Replace the <PAT Token> with the token you generated.
3.) Run MCP Inspector with the following command.
npx @modelcontextprotocol/inspector --config config.json --server github
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment