Skip to main content

Set up GitHub Copilot

Run the Versalist Model Context Protocol server from GitHub Copilot CLI. Follow the procedure before you run a Versalist challenge.

This guide configures the Versalist command-line interface (CLI). It also configures the Model Context Protocol (MCP) when GitHub Copilot supports it.

Launch command
copilot

Start GitHub Copilot in the project directory.

Project configuration
.mcp.json

Review this file before you trust the project.

Versalist connection
MCP and CLI

The agent can start the local Versalist MCP server.

Requirements

  • Node.js 18.17 or later
  • npm
  • An account or provider credential for GitHub Copilot
  • A Versalist account
  • A Versalist application programming interface (API) key with the required scopes

1. Install GitHub Copilot

shell
curl -fsSL https://gh.io/copilot-install | bash
  • The install script supports macOS and Linux.
  • Use the official install guide for npm, Homebrew, or WinGet installation.
  • Copilot CLI requires an active GitHub Copilot subscription.

2. Authenticate GitHub Copilot

Authenticate GitHub Copilot with its account or model provider. This credential is separate from your Versalist key.

shell
copilot login
  1. Complete the GitHub sign-in flow.
  2. In Copilot CLI, enter /user to confirm the signed-in account.
  3. COPILOT_GITHUB_TOKEN, GH_TOKEN, and GITHUB_TOKEN override the stored sign-in, in that order.

3. Create a Versalist key

Create a key for GitHub Copilot
Sign in or create an account. Versalist then opens the API key settings page for this agent.
Sign in and create a key

If you are already signed in, open API key settings. Create one key for this agent.

  1. Name the key for GitHub Copilot and its environment.
  2. Select only the scopes that your workflow requires.
  3. Copy the key before you close the dialog.
  4. Store the key in a password manager or secret manager.
  5. Load the key into the agent process environment.

The key page can select all five scopes. This agent path needs the first three. Skill scopes belong to vskill.

  • Use read:challenges to browse or start challenges.
  • Use submit:solutions to submit a solution.
  • Use read:submissions to read submission history through MCP.
  • Use read:skills / write:skills only if this agent will also run the Skill Exchange server.

Remove a scope if your workflow does not use it.

Load and check the Versalist key
Replace the placeholder with a value from your approved secret store.
shell
export VERSALIST_API_KEY=vk_live_...
test -n "$VERSALIST_API_KEY" && echo "Versalist API key is set"
Do not commit a key
Do not put a Versalist key in source code, a project setting, a log, or a shared command.

4. Install the Versalist CLI

shell
npm install -g @versalist/cli
versalist --help

Use npx -y @versalist/cli if you do not want a global installation.

5. Connect Versalist

Add the Versalist MCP server to ~/.copilot/mcp-config.json. Keep the key out of project files.

Optional setup command
shell
copilot mcp add versalist --env VERSALIST_API_KEY="$VERSALIST_API_KEY" -- npx -y @versalist/cli mcp
GitHub Copilot MCP configuration
json
{
  "mcpServers": {
    "versalist": {
      "type": "local",
      "command": "npx",
      "args": ["-y", "@versalist/cli", "mcp"],
      "env": {
        "VERSALIST_API_KEY": "<VERSALIST_API_KEY>"
      },
      "tools": ["*"]
    }
  }
}

Tool names and inputs: Versalist MCP server.

  • The add command writes the user configuration file.
  • The shell expands $VERSALIST_API_KEY, so the key value stays out of your shell history.
  • Copilot CLI does not document environment interpolation for local MCP servers.
  • Do not put a key in .mcp.json, .github/mcp.json, or source control.

6. Launch GitHub Copilot

Open the project directory in a trusted terminal. Then start the agent.

shell
copilot

7. Run the Versalist workflow

1
Select a challenge
List published challenges and load one challenge into the repository.
2
Record a baseline
Run the current implementation and evaluate its recorded run.
3
Record a candidate
Run the changed implementation and evaluate its recorded run.
4
Compare and submit
Compare both evaluations. Submit the project web address when the evidence is ready.
Shared Versalist workflow
Replace the example commands, run identifiers, score values, and project web address.
shell
versalist list --search "agentic code optimization"
versalist start agentic-code-optimization-review

versalist run --command "python agent.py" --label baseline
versalist evaluate --run <baseline-run-id> --command "pytest" --score 70

versalist run --command "python agent.py" --label candidate
versalist evaluate --run <candidate-run-id> --command "pytest" --score 84

versalist compare --baseline <baseline-run-id> --candidate <candidate-run-id>
versalist submit --url https://github.com/you/solution --title "Candidate run"

The versalist start command loads challenge files. It does not launch the coding agent.

The example python agent.py command is a placeholder. Replace it with your agent command.

Verify the setup

Use these read-only checks before you start a challenge.

shell
copilot version
copilot mcp list
copilot mcp get versalist

Confirm that the host reports the Versalist server or command. Do not run a write tool only to test the connection.

Limitations

  • Copilot CLI does not document environment interpolation for local MCP servers.
  • A versalist entry in a project .mcp.json or .github/mcp.json overrides the user entry.
  • Copilot CLI loads project MCP servers only after you trust the folder.
  • Copilot CLI does not read .vscode/mcp.json, so this guide does not configure Copilot in VS Code.
  • An organization or enterprise administrator can disable Copilot CLI.
  • Copilot CLI authentication does not authenticate the Versalist command-line interface.
  • The CLI stores local run evidence under .versalist/.
  • The CLI does not upload local evidence automatically.
  • The submit command sends metadata and URLs, not .versalist/ contents.

Revoke access

  1. Open API key settings.
  2. Find the key by name and last-use time.
  3. Revoke the Versalist key.
  4. Run copilot mcp remove versalist to delete the user entry.
  5. Enter /logout in Copilot CLI if you must remove the stored GitHub sign-in.
  6. /logout does not revoke the token. Revoke GitHub Copilot CLI under GitHub Settings, Applications, Authorized OAuth Apps.
  7. Remove VERSALIST_API_KEY from the process environment.
  8. Restart the agent process.
Remove the agent connection
shell
copilot mcp remove versalist

Revoke the provider credential separately if it is exposed. A Versalist key revoke does not revoke the provider credential.

Official documentation

Use these official sources if the vendor changes a command or setting.

Return to the coding agent index, or open the Versalist CLI reference.

Canonical guide: /docs/coding-agents/github-copilot

Was this page helpful?