Skip to content

Add CODEOWNERS file for repository ownership#2929

Open
pathum25 wants to merge 1 commit into
github:mainfrom
pathum25:patch-2
Open

Add CODEOWNERS file for repository ownership#2929
pathum25 wants to merge 1 commit into
github:mainfrom
pathum25:patch-2

Conversation

@pathum25

@pathum25 pathum25 commented Jul 22, 2026

Copy link
Copy Markdown

Summary

Why

Fixes #

What changed

MCP impact

  • No tool or API changes
  • Tool schema or behavior changed
  • New tool added

Prompts tested (tool changes only)

Security / limits

  • No security or limits impact
  • Auth / permissions considered
  • Data exposure, filtering, or token/size limits considered

Tool renaming

  • I am renaming tools as part of this PR (e.g. a part of a consolidation effort)
    • I have added the new tool aliases in deprecated_tool_aliases.go
  • I am not renaming tools as part of this PR

Note: if you're renaming tools, you must add the tool aliases. For more information on how to do so, please refer to the [# Install GitHub MCP Server in Copilot CLI

The GitHub MCP server comes pre-installed in Copilot CLI, with read-only tools enabled by default.

Built-in Server

To verify the server is available, from an active Copilot CLI session:

/mcp show github-mcp-server

Per-Session Customization

Use CLI flags to customize the server for a session:

# Enable an additional toolset
copilot --add-github-mcp-toolset discussions

# Enable multiple additional toolsets
copilot --add-github-mcp-toolset discussions --add-github-mcp-toolset stargazers

# Enable all toolsets
copilot --enable-all-github-mcp-tools

# Enable a specific tool
copilot --add-github-mcp-tool list_discussions

# Disable the built-in server entirely
copilot --disable-builtin-mcps

Run copilot --help for all available flags. For the list of toolsets, see Available toolsets; for the list of tools, see Tools.

Custom Configuration

You can configure the GitHub MCP server in Copilot CLI using either the interactive command or by manually editing the configuration file.

Server naming: Name your server github-mcp-server to replace the built-in server, or use a different name (e.g., github) to run alongside it.

Prerequisites

  1. GitHub Personal Access Token with appropriate scopes
  2. For local server: Docker installed and running
Storing Your PAT Securely

To set your PAT as an environment variable:

# Add to your shell profile (~/.bashrc, ~/.zshrc, etc.)
export GITHUB_PERSONAL_ACCESS_TOKEN=your_token_here

Method 1: Interactive Setup (Recommended)

From an active Copilot CLI session, run the interactive command:

/mcp add

Follow the prompts to configure the server.

Method 2: Manual Setup

Create or edit the configuration file ~/.copilot/mcp-config.json and add one of the following configurations:

Remote Server

Connect to the hosted MCP server:

{
  "mcpServers": {
    "github": {
      "type": "http",
      "url": "https://api.githubcopilot.com/mcp/",
      "headers": {
        "Authorization": "Bearer ${GITHUB_PERSONAL_ACCESS_TOKEN}"
      }
    }
  }
}

For additional options like toolsets and read-only mode, see the remote server documentation.

Local Docker

With Docker running, you can run the GitHub MCP server in a container:

Log in with OAuth instead of a token. On github.com the official image already includes the app credentials, so you provide none yourself — the server opens a browser login on first use and keeps the token in memory only. In Docker, publish a fixed callback port to loopback:

{
  "mcpServers": {
    "github": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-p",
        "127.0.0.1:8085:8085",
        "-e",
        "GITHUB_OAUTH_CALLBACK_PORT",
        "ghcr.io/github/github-mcp-server"
      ],
      "env": {
        "GITHUB_OAUTH_CALLBACK_PORT": "8085"
      }
    }
  }
}

See Local Server OAuth Login for the native-binary flow (no fixed port), headless/device-code fallback, GitHub Enterprise, and bringing your own OAuth or GitHub App.

To authenticate with a Personal Access Token instead (it takes precedence over OAuth):

{
  "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_PERSONAL_ACCESS_TOKEN}"
      }
    }
  }
}

Binary

You can download the latest binary release from the GitHub releases page or build it from source by running:

go build -o github-mcp-server ./cmd/github-mcp-server

Then configure (replace /path/to/binary with the actual path):

{
  "mcpServers": {
    "github": {
      "command": "/path/to/binary",
      "args": ["stdio"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_PERSONAL_ACCESS_TOKEN}"
      }
    }
  }
}

Verification

  1. Restart Copilot CLI
  2. Run /mcp show to list configured servers
  3. Try: "List my GitHub repositories"

Troubleshooting

Local Server Issues

  • Docker errors: Ensure Docker Desktop is running
  • Image pull failures: Try docker logout ghcr.io then retry

Authentication Issues

  • Invalid PAT: Verify your GitHub PAT has correct scopes:
    • repo - Repository operations
    • read:packages - Docker image access (if using Docker)
  • Token expired: Generate a new GitHub PAT

Configuration Issues

  • Invalid JSON: Validate your configuration:
    cat ~/.copilot/mcp-config.json | jq .

References

Lint & tests

  • Linted locally with ./script/lint
  • Tested locally with ./script/test

Docs

  • Not needed
  • Updated (README / docs / examples)

@pathum25
pathum25 requested a review from a team as a code owner July 22, 2026 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant