Skip to content

Editing default MCP on Copilot Agent #812

@wklimowicz

Description

@wklimowicz

I want to edit the default Github MCP Server configuration on Copilot Agent mode, to give it write access to the repo. The documentation describes how to do this in principle, but it's a bit unclear how to actually get it working. I've set up a COPILOT_MCP_GITHUB_PERSONAL_ACCESS_TOKEN with the extra scope I want, and put it into the copilot environment. I've tried to use this from #439 (comment):

// Remove all comments when you paste this into the MCP config input
{
  "mcpServers": {
    "github-mcp-server": {
      // Leave this blank and we will overwrite it automatically with the correct command
      "command": "",
      // Optionally allow read-write tools by removing the `--read-only` arg
      "args": ["stdio", "--read-only"],
      // Use the GitHub access token provided by Copilot coding agent with read access to the current repo 
      "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "GITHUB_PERSONAL_ACCESS_TOKEN" },
     // Customize the tools exposed to the agent
      "tools": ["*"]
    }
  }
}

However that setup currently breaks (it demands a "type" attribute), and this doesn't seem to work either:

{
  "mcpServers": {
    "github-mcp-server": {
      "type": "local",
      "command": "",
      "args": ["stdio"],
      "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "COPILOT_MCP_GITHUB_PERSONAL_ACCESS_TOKEN" },
      "tools": ["*"]
    }
  }
}

I might be missing something obvious, but I can't seem to get this working. Any example configs would be appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions