# Connect VS Code

Visual Studio Code with GitHub Copilot in agent mode. These steps connect it to the Main Team MCP server at `https://mcp.main-team.org/mcp`.

## Connect

1. Open one of these links on the computer where VS Code is installed. VS Code shows the server and asks you to install it.

   [Install in VS Code](vscode:mcp/install?%7B%22name%22%3A%22main-team%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fmcp.main-team.org%2Fmcp%22%7D)[Install in VS Code Insiders](vscode-insiders:mcp/install?%7B%22name%22%3A%22main-team%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fmcp.main-team.org%2Fmcp%22%7D)
2. Or from a terminal:

   Terminal

   ```
   code --add-mcp '{"name":"main-team","type":"http","url":"https://mcp.main-team.org/mcp"}'
   ```
3. Or for one workspace, in `.vscode/mcp.json`:

   .vscode/mcp.json

   ```
   {
     "servers": {
       "main-team": {
         "type": "http",
         "url": "https://mcp.main-team.org/mcp"
       }
     }
   }
   ```
4. Start the server from **MCP: List Servers** in the Command Palette and sign in when VS Code asks. Your browser opens Main Team’s sign-in page.

Main Team’s sign-in page opens at `auth.main-team.org`. Sign in the way you always do, tick the olympiads the connection should cover, and decide whether the app may change anything — reading only is the default. [How a connection works](https://hub.main-team.org/api/mcp).

## Add the skills

The Main Team skills teach your agent how the server works: to say whose account it is on, to read before it changes anything, to preview and confirm, and never to help with an exam in progress. [Agent skills](https://hub.main-team.org/api/skills) lists them and how to add them to VS Code.

## Verify

Ask your agent:

Which Main Team account am I connected to, and may you change anything?

It answers with your own name and role, the olympiads the connection covers and whether it may change anything. If any of that is not what you expected, disconnect and connect again.

## Troubleshooting

- **VS Code ignores the file**: In VS Code the top-level key is `servers`, not `mcpServers` as in other apps.
- **Sign-in says this app is not allowed**: A student account may connect only the verified apps: Claude apps, Claude Code, ChatGPT, Codex and VS Code. Teachers and partners may connect the others too.
- **The app asks you to sign in again**: A connection ends after a time without use, at the end of its lifetime, when you disconnect it and whenever your password changes. Sign in again from the app.
- **A tool is refused and names your panel**: Something that cannot be undone needs your app to ask you directly. When it cannot, the answer carries a link into your panel; do it there.
