# GitHub (MCP Server)

> Manage repos, issues, pull requests and Actions from your AI agent

- Type: MCP server
- Publisher: GitHub (official)
- Categories: Development, DevOps & Cloud
- Website: https://github.com/github/github-mcp-server
- Source: https://github.com/github/github-mcp-server
- Transport: streamable-http
- Server URL: https://api.githubcopilot.com/mcp/
- Launch command: docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server
- Sign-in: oauth
- Environment variables: GITHUB_PERSONAL_ACCESS_TOKEN
- GitHub stars: 33300
- Listed: 2025-04-04

## About

GitHub's official MCP server connects AI tools to repositories, issues, pull requests, Actions, code security alerts and more. It is available as a hosted remote server with OAuth or as a local Docker/binary server using a personal access token. Toolsets can be enabled selectively to limit the exposed tools.

## Install

1. **Connect it in ChatGPT** Turn on Developer mode in ChatGPT (Settings → Security and login), open Plugins, select + and paste https://api.githubcopilot.com/mcp/ as the MCP server URL, then sign in with OAuth. Add it to a chat from the composer's tools menu.

2. **Or add it to Codex or the API**

   Codex CLI:

   ```bash
   codex mcp add github --url https://api.githubcopilot.com/mcp/
   codex mcp login github
   ```

   config.toml:

   ```toml
   [mcp_servers.github]
   url = "https://api.githubcopilot.com/mcp/"
   ```

   Responses API:

   ```python
   import os
   from openai import OpenAI
   
   client = OpenAI()
   
   response = client.responses.create(
       model="gpt-6-astra",
       tools=[{
           "type": "mcp",
           "server_label": "github",
           "server_url": "https://api.githubcopilot.com/mcp/",
           "authorization": os.environ["GITHUB_PERSONAL_ACCESS_TOKEN"],
           "require_approval": "never",
       }],
       input="List the open issues assigned to me in my-org/api",
   )
   print(response.output_text)
   ```

## Tools

- `get_me`
- `get_file_contents`
- `list_issues`
- `search_issues`
- `issue_write`
- `create_pull_request`
- `pull_request_read`
- `merge_pull_request`
- `create_branch`
- `actions_list`
- `list_code_scanning_alerts`
- `projects_write`

## Example prompts

- "List the open issues assigned to me in my-org/api"
- "Open a pull request from feature/login into main with a summary of the changes"
- "Why did the latest GitHub Actions run on main fail?"
- "Show code scanning alerts for this repository"

## Also available as

- plugin: [GitHub](https://chatgptplugins.directory/plugins/github.md)
- app: [GitHub](https://chatgptplugins.directory/apps/github.md)

## Related

- [Chrome DevTools MCP](https://chatgptplugins.directory/mcp/chrome-devtools.md): Let coding agents control and debug a live Chrome browser
- [Playwright MCP](https://chatgptplugins.directory/mcp/playwright.md): Browser automation for agents via Playwright accessibility snapshots
- [Context7](https://chatgptplugins.directory/mcp/context7.md): Pull up-to-date, version-specific library docs into your coding agent
- [Supabase](https://chatgptplugins.directory/mcp/supabase.md): Manage Supabase databases, migrations, edge functions and logs
- [Stripe](https://chatgptplugins.directory/mcp/stripe.md): Query and act on your Stripe account and search Stripe docs from any agent
- [Atlassian Rovo (Jira & Confluence)](https://chatgptplugins.directory/mcp/atlassian-rovo.md): Work with Jira issues and Confluence pages through Atlassian's hosted MCP

---
Source: https://chatgptplugins.directory/mcp/github · Index: https://chatgptplugins.directory/llms.txt · Independent and community-run. Not affiliated with or endorsed by OpenAI. ChatGPT is a trademark of OpenAI.
