← Back to GitHub MCP Server

Install GitHub MCP Server

Pick your client, copy the command, done.

1

Add it to Claude Code

claude mcp add -e "GITHUB_ACCESS_TOKEN=${GITHUB_ACCESS_TOKEN}" -e "OWNER_NAME=${OWNER_NAME}" github-mcp-server -- uv run gitHubMcpServer.py
Required:GITHUB_ACCESS_TOKENOWNER_NAME

Environment Variables

Set these before running GitHub MCP Server.

VariableDescriptionRequired
GITHUB_ACCESS_TOKENYour GitHub Personal Access TokenYes
OWNER_NAMEYour GitHub username (repository owner)Yes

Available Tools (2)

Once configured, GitHub MCP Server gives your AI agent access to:

getUserRepoRetrieves detailed information for a specific GitHub repository.
repoName
updateRepoUpdates settings for an existing repository.
repoNamenamedescriptionhomepageprivatevisibilityhas_issueshas_projectshas_wikidefault_branch

Try It Out

After setup, try these prompts with your AI agent:

Get the repository information for my project 'GitHubMcpServer'.
Update the description of my repository 'my-project' to 'An AI-managed repository'.
Change the visibility of my repository 'test-repo' to private.
Check the current settings and default branch for my repository 'my-repo'.
Prerequisites & system requirements
  • An MCP-compatible client (Claude Code, Cursor, Windsurf, Claude Desktop, or Codex)
  • Python 3.8+ with pip installed
  • GITHUB_ACCESS_TOKEN — Your GitHub Personal Access Token
  • OWNER_NAME — Your GitHub username (repository owner)
Alternative installation methods

pip

pip install "fastmcp>=3.1.1" httpx pydantic-settings

Keep this setup from going cold

Save the docs, env vars, and workflow around GitHub MCP Server in Conare so Claude Code, Codex, and Cursor remember it next time.

Remember this setup