Connect Claude Code To A GitHub MCP Server
Before we get into the abstract details about what MCP is, let's take a look at it working.
I'm a developer and my audience is mostly developers, so let's look at a developer use case.
Let's connect up a GitHub MCP server to Claude Code. Claude Code is a really powerful terminal app for using an LLM to modify a codebase.
I'll walk through the whole demo in the video above, but here are the steps I followed:
-
Install Claude Code.
-
Get a GitHub API Key and copy it into my clipboard.
-
Run this command:
claude mcp add
-
Add
github-server
as the name of the MCP server. -
Scope it to the project.
-
Add
npx
as the command. -
Add
-y @modelcontextprotocol/server-github@latest
as the args. -
Add
GITHUB_PERSONAL_ACCESS_TOKEN=your-token-here
for the env. -
Your MCP server should now be ready to use.